@kenyaemr/esm-patient-registration-app 6.0.1-pre.1.0.0 → 6.0.1-pre.1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/574.js +1 -1
- package/dist/59.js +1 -1
- package/dist/59.js.map +1 -1
- package/dist/619.js +1 -1
- package/dist/619.js.map +1 -1
- package/dist/kenyaemr-esm-patient-registration-app.js.buildmanifest.json +12 -12
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +2 -3
- package/src/config-schema.ts +12 -0
- package/src/patient-registration/field/address/custom-address-field.component.tsx +1 -0
- package/src/patient-registration/field/phone/phone-field.component.tsx +1 -0
- package/src/patient-verification/verification-modal/confirm-prompt.component.tsx +1 -1
- package/translations/en.json +2 -2
package/dist/routes.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"webservices.rest":"^2.24.0"},"pages":[{"component":"root","route":"patient-registration","online":true,"offline":true},{"component":"editPatient","routeRegex":"patient\\/([a-zA-Z0-9\\-]+)\\/edit","online":true,"offline":true}],"extensions":[{"component":"addPatientLink","name":"add-patient-action","slot":"top-nav-actions-slot","online":true,"offline":true},{"component":"cancelPatientEditModal","name":"cancel-patient-edit-modal","online":true,"offline":true},{"component":"patientPhoto","name":"patient-photo-widget","slot":"patient-photo-slot","online":true,"offline":true},{"component":"editPatientDetailsButton","name":"edit-patient-details-button","slot":"patient-actions-slot","online":true,"offline":true},{"component":"editPatientDetailsButton","name":"edit-patient-details-button","slot":"patient-search-actions-slot","online":true,"offline":true},{"component":"deleteIdentifierConfirmationModal","name":"delete-identifier-confirmation-modal","online":true,"offline":true},{"component":"emptyClientRegistryModal","name":"empty-client-registry-modal","online":true,"offline":true},{"component":"confirmClientRegistryModal","name":"confirm-client-registry-modal","online":true,"offline":true}],"version":"6.0.1-pre.1.0.
|
|
1
|
+
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"webservices.rest":"^2.24.0"},"pages":[{"component":"root","route":"patient-registration","online":true,"offline":true},{"component":"editPatient","routeRegex":"patient\\/([a-zA-Z0-9\\-]+)\\/edit","online":true,"offline":true}],"extensions":[{"component":"addPatientLink","name":"add-patient-action","slot":"top-nav-actions-slot","online":true,"offline":true},{"component":"cancelPatientEditModal","name":"cancel-patient-edit-modal","online":true,"offline":true},{"component":"patientPhoto","name":"patient-photo-widget","slot":"patient-photo-slot","online":true,"offline":true},{"component":"editPatientDetailsButton","name":"edit-patient-details-button","slot":"patient-actions-slot","online":true,"offline":true},{"component":"editPatientDetailsButton","name":"edit-patient-details-button","slot":"patient-search-actions-slot","online":true,"offline":true},{"component":"deleteIdentifierConfirmationModal","name":"delete-identifier-confirmation-modal","online":true,"offline":true},{"component":"emptyClientRegistryModal","name":"empty-client-registry-modal","online":true,"offline":true},{"component":"confirmClientRegistryModal","name":"confirm-client-registry-modal","online":true,"offline":true}],"version":"6.0.1-pre.1.0.1"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kenyaemr/esm-patient-registration-app",
|
|
3
|
-
"version": "6.0.1-pre.1.0.
|
|
3
|
+
"version": "6.0.1-pre.1.0.1",
|
|
4
4
|
"description": "Patient registration microfrontend for the OpenMRS SPA",
|
|
5
5
|
"browser": "dist/kenyaemr-esm-patient-registration-app.js",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -56,6 +56,5 @@
|
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"webpack": "^5.74.0"
|
|
59
|
-
}
|
|
60
|
-
"stableVersion": "6.0.0"
|
|
59
|
+
}
|
|
61
60
|
}
|
package/src/config-schema.ts
CHANGED
|
@@ -60,6 +60,10 @@ export interface RegistrationConfig {
|
|
|
60
60
|
};
|
|
61
61
|
phone: {
|
|
62
62
|
personAttributeUuid: string;
|
|
63
|
+
validation: {
|
|
64
|
+
required: boolean;
|
|
65
|
+
matches: string;
|
|
66
|
+
};
|
|
63
67
|
};
|
|
64
68
|
};
|
|
65
69
|
links: {
|
|
@@ -312,6 +316,14 @@ export const esmPatientRegistrationSchema = {
|
|
|
312
316
|
_default: '14d4f066-15f5-102d-96e4-000c29c2a5d7',
|
|
313
317
|
_description: 'The UUID of the phone number person attribute type',
|
|
314
318
|
},
|
|
319
|
+
validation: {
|
|
320
|
+
required: { _type: Type.Boolean, _default: false },
|
|
321
|
+
matches: {
|
|
322
|
+
_type: Type.String,
|
|
323
|
+
_default: null,
|
|
324
|
+
_description: 'Optional RegEx for testing the validity of the input.',
|
|
325
|
+
},
|
|
326
|
+
},
|
|
315
327
|
},
|
|
316
328
|
},
|
|
317
329
|
links: {
|
|
@@ -22,6 +22,7 @@ export const AddressField: React.FC<AddressFieldProps> = ({ fieldDefinition }) =
|
|
|
22
22
|
id={fieldDefinition.id}
|
|
23
23
|
labelText={t(`${fieldDefinition.label}`, `${fieldDefinition.label}`)}
|
|
24
24
|
{...field}
|
|
25
|
+
required={fieldDefinition?.validation?.required}
|
|
25
26
|
/>
|
|
26
27
|
);
|
|
27
28
|
}}
|
|
@@ -11,6 +11,7 @@ export function PhoneField() {
|
|
|
11
11
|
type: 'person attribute',
|
|
12
12
|
uuid: config.fieldConfigurations.phone.personAttributeUuid,
|
|
13
13
|
showHeading: false,
|
|
14
|
+
validation: config.fieldConfigurations.phone?.validation,
|
|
14
15
|
};
|
|
15
16
|
return <PersonAttributeField fieldDefinition={fieldDefinition} />;
|
|
16
17
|
}
|
|
@@ -39,7 +39,7 @@ const ConfirmPrompt: React.FC<ConfirmPromptProps> = ({ close, onConfirm, patient
|
|
|
39
39
|
<div style={{ display: 'flex', margin: '1rem' }}>
|
|
40
40
|
<ExtensionSlot
|
|
41
41
|
style={{ display: 'flex', alignItems: 'center' }}
|
|
42
|
-
|
|
42
|
+
extensionSlotName="patient-photo-slot"
|
|
43
43
|
state={{ patientName: `${patient?.firstName} ${patient?.lastName}` }}
|
|
44
44
|
/>
|
|
45
45
|
<div style={{ width: '100%', marginLeft: '0.625rem' }}>
|
package/translations/en.json
CHANGED
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"negativeYears": "Negative years",
|
|
66
66
|
"no": "No",
|
|
67
67
|
"numberInNameDubious": "Number in name is dubious",
|
|
68
|
-
"
|
|
68
|
+
"nupiIdentification": "NUPI",
|
|
69
69
|
"obsFieldUnknownDatatype": "Concept for obs field '{{fieldDefinitionId}}' has unknown datatype '{{datatypeName}}'",
|
|
70
70
|
"optional": "optional",
|
|
71
71
|
"other": "Other",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"selectCountry": "Select country",
|
|
98
98
|
"selectIdentifierType": "Select identifier type",
|
|
99
99
|
"sexFieldLabelText": "Sex",
|
|
100
|
-
"
|
|
100
|
+
"shaNumber": "SHA Number",
|
|
101
101
|
"source": "Source",
|
|
102
102
|
"stroke": "Stroke",
|
|
103
103
|
"submitting": "Submitting",
|