update: add new field maximal_liability to patient guarantor
This commit is contained in:
@ -186,6 +186,7 @@ export class PatientGuarantorController {
|
|||||||
agreement_desc: Joi.string().max(512).optional().label('Agreement Description'),
|
agreement_desc: Joi.string().max(512).optional().label('Agreement Description'),
|
||||||
patient_group_id: Joi.string().guid({ version: 'uuidv4' }).required().label('Patient Group'),
|
patient_group_id: Joi.string().guid({ version: 'uuidv4' }).required().label('Patient Group'),
|
||||||
faretype: Joi.string().guid({ version: 'uuidv4' }).required().label('Fare Type'),
|
faretype: Joi.string().guid({ version: 'uuidv4' }).required().label('Fare Type'),
|
||||||
|
maximalliability: Joi.number().optional().label('Maximal Liability'),
|
||||||
});
|
});
|
||||||
|
|
||||||
const param: any = await schema.validateAsync(req.body);
|
const param: any = await schema.validateAsync(req.body);
|
||||||
@ -200,6 +201,7 @@ export class PatientGuarantorController {
|
|||||||
data.agreement_desc = param.agreement_desc;
|
data.agreement_desc = param.agreement_desc;
|
||||||
data.patient_group = param.patient_group_id;
|
data.patient_group = param.patient_group_id;
|
||||||
data.faretype = param.faretype;
|
data.faretype = param.faretype;
|
||||||
|
data.maximal_liability = param.maximalliability;
|
||||||
data.created_by = req.auth.data.name;
|
data.created_by = req.auth.data.name;
|
||||||
data.updated_by = req.auth.data.name;
|
data.updated_by = req.auth.data.name;
|
||||||
|
|
||||||
@ -251,6 +253,7 @@ export class PatientGuarantorController {
|
|||||||
agreement_desc: Joi.string().max(512).optional().label('Agreement Description'),
|
agreement_desc: Joi.string().max(512).optional().label('Agreement Description'),
|
||||||
patient_group_id: Joi.string().guid({ version: 'uuidv4' }).required().label('Patient Group'),
|
patient_group_id: Joi.string().guid({ version: 'uuidv4' }).required().label('Patient Group'),
|
||||||
faretype: Joi.string().guid({ version: 'uuidv4' }).required().label('Fare Type'),
|
faretype: Joi.string().guid({ version: 'uuidv4' }).required().label('Fare Type'),
|
||||||
|
maximalliability: Joi.number().optional().label('Maximal Liability'),
|
||||||
});
|
});
|
||||||
|
|
||||||
req.body.id = req.params['id'];
|
req.body.id = req.params['id'];
|
||||||
@ -271,6 +274,7 @@ export class PatientGuarantorController {
|
|||||||
data.agreement_desc = param.agreement_desc;
|
data.agreement_desc = param.agreement_desc;
|
||||||
data.patient_group = param.patient_group_id;
|
data.patient_group = param.patient_group_id;
|
||||||
data.faretype = param.faretype;
|
data.faretype = param.faretype;
|
||||||
|
data.maximal_liability = param.maximalliability;
|
||||||
data.created_by = req.auth.data.name;
|
data.created_by = req.auth.data.name;
|
||||||
data.updated_by = req.auth.data.name;
|
data.updated_by = req.auth.data.name;
|
||||||
|
|
||||||
|
|||||||
@ -352,6 +352,7 @@ const doc = {
|
|||||||
$agreement_desc: "Health Insurance Agreement", // Deskripsi Perjanjian (opsional)
|
$agreement_desc: "Health Insurance Agreement", // Deskripsi Perjanjian (opsional)
|
||||||
$patient_group_id: "2e1a1b33-bbb2-4f33-b2c4-cff5976f3f95", // Patient Group (UUID)
|
$patient_group_id: "2e1a1b33-bbb2-4f33-b2c4-cff5976f3f95", // Patient Group (UUID)
|
||||||
$faretype: "3f1a1b33-bbb2-4f33-b2c4-cff5976f3f95", // Fare Type (UUID)
|
$faretype: "3f1a1b33-bbb2-4f33-b2c4-cff5976f3f95", // Fare Type (UUID)
|
||||||
|
$maximalliability: 1000000, // Maximal Liability (opsional)
|
||||||
},
|
},
|
||||||
refferal_hospital: {
|
refferal_hospital: {
|
||||||
$refferal_hospital_name: "RefferalHospital name",
|
$refferal_hospital_name: "RefferalHospital name",
|
||||||
|
|||||||
Reference in New Issue
Block a user