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'),
|
||||
patient_group_id: Joi.string().guid({ version: 'uuidv4' }).required().label('Patient Group'),
|
||||
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);
|
||||
@ -200,6 +201,7 @@ export class PatientGuarantorController {
|
||||
data.agreement_desc = param.agreement_desc;
|
||||
data.patient_group = param.patient_group_id;
|
||||
data.faretype = param.faretype;
|
||||
data.maximal_liability = param.maximalliability;
|
||||
data.created_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'),
|
||||
patient_group_id: Joi.string().guid({ version: 'uuidv4' }).required().label('Patient Group'),
|
||||
faretype: Joi.string().guid({ version: 'uuidv4' }).required().label('Fare Type'),
|
||||
maximalliability: Joi.number().optional().label('Maximal Liability'),
|
||||
});
|
||||
|
||||
req.body.id = req.params['id'];
|
||||
@ -271,6 +274,7 @@ export class PatientGuarantorController {
|
||||
data.agreement_desc = param.agreement_desc;
|
||||
data.patient_group = param.patient_group_id;
|
||||
data.faretype = param.faretype;
|
||||
data.maximal_liability = param.maximalliability;
|
||||
data.created_by = req.auth.data.name;
|
||||
data.updated_by = req.auth.data.name;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user