feat(medical-action-src): add type code selection with strict typing

- Add medicalActionTypeCode constants and type definition
- Update MedicalActionSrc interface to use strict type for type_code
- Implement select dropdown for type code in entry form
- Enable type code validation in schema
This commit is contained in:
Khafid Prayoga
2025-10-17 16:23:51 +07:00
parent 2b8bf55e8a
commit f4dadd67f8
4 changed files with 41 additions and 6 deletions
+10
View File
@@ -268,3 +268,13 @@ export const infraGroupCodesKeys: Record<string, string> = Object.keys(infraGrou
},
{} as Record<string, string>,
)
export const medicalActionTypeCode: Record<string, string> = {
chemo: 'Chemo',
hemo: 'Hemo',
thalasemia: 'Thalasemia',
echocardio: 'Echocardiography',
spirometry: 'Spirometry',
} as const
export type medicalActionTypeCodeKey = keyof typeof medicalActionTypeCode