feat: add supplementary insurance select to patient record info form
The «اطلاعات پرونده» form only exposed basic insurance («نوع بیمه»). Add a
«بیمه تکمیلی» select next to it, wired to the supplementary insurances from
insurance-pricing. Backend PATCH /api/v1/patient/{uuid} already accepts
supplementary_insurance_id (UserProfile entity + controller) — frontend-only:
schema field, form select, profileToFormValues/formValuesToPayload mapping,
PatientProfileUpdate type, and the supplementary option passed from both the
case-file info tab (PatientDetailPage) and MyPatientsPage.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -49,7 +49,7 @@ describe('formValuesToPayload', () => {
|
||||
const base: PatientFormValues = {
|
||||
name: 'ساغر', mobile: '', national_code: '0012345678', gender: 'female',
|
||||
birth_date: '2000-05-10', fathers_name: 'رضا', marital_status: 'single',
|
||||
basic_insurance_id: '3', field_of_study: 'نرمافزار', education: 'کارشناسی',
|
||||
basic_insurance_id: '3', supplementary_insurance_id: '5', field_of_study: 'نرمافزار', education: 'کارشناسی',
|
||||
job: 'مهندس', province_id: 8, city_id: '42', home_phone: '', address: 'یزد',
|
||||
postal_code: '8913746351', referral_source: 'اینستاگرام', description: '',
|
||||
};
|
||||
@@ -58,6 +58,7 @@ describe('formValuesToPayload', () => {
|
||||
const out = formValuesToPayload(base);
|
||||
expect(out.date_of_birth).toBe(dateStrToTs('2000-05-10'));
|
||||
expect(out.basic_insurance_id).toBe(3);
|
||||
expect(out.supplementary_insurance_id).toBe(5);
|
||||
expect(out.province_id).toBe(8);
|
||||
expect(out.city_id).toBe(42);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user