@ampath/esm-patient-registration-app 6.0.1-pre.84 → 6.0.1-pre.89

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/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":"patientPhotoExtension","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.84"}
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":"patientPhotoExtension","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.89"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ampath/esm-patient-registration-app",
3
- "version": "6.0.1-pre.84",
3
+ "version": "6.0.1-pre.89",
4
4
  "description": "Patient registration microfrontend for the OpenMRS SPA",
5
5
  "browser": "dist/ampath-esm-patient-registration-app.js",
6
6
  "main": "src/index.ts",
@@ -36,7 +36,7 @@ import { useInitialPatientRelationships } from './section/patient-relationships/
36
36
  import dayjs from 'dayjs';
37
37
 
38
38
  export function useInitialFormValues(patientUuid: string): [FormValues, Dispatch<FormValues>] {
39
- const { martialStatus, education, occupation, educationLoad, occupationLoad } = useConcepts();
39
+ const { martialStatus, education, occupation, educationLoad } = useConcepts();
40
40
  const { isLoading: isLoadingPatientToEdit, patient: patientToEdit } = usePatient(patientUuid);
41
41
  const { data: attributes, isLoading: isLoadingAttributes } = useInitialPersonAttributes(patientUuid);
42
42
  const { data: identifiers, isLoading: isLoadingIdentifiers } = useInitialPatientIdentifiers(patientUuid);
@@ -326,6 +326,10 @@ function useConcepts() {
326
326
  const config = useConfig<RegistrationConfig>();
327
327
  const { data: education, isLoading: educationLoad } = useConceptAnswers('a89e48ae-1350-11df-a1f1-0026b9348838');
328
328
  const { data: occupation, isLoading: occupationLoad } = useConceptAnswers('a8a0a00e-1350-11df-a1f1-0026b9348838');
329
+ const { data: martialStatus, isLoading: martialStatusLoad } = useConceptAnswers(
330
+ 'a899a9f2-1350-11df-a1f1-0026b9348838',
331
+ );
332
+
329
333
  /* const occupation: Array<ConceptAnswers> = [
330
334
  {
331
335
  uuid: '1538AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
@@ -356,7 +360,7 @@ function useConcepts() {
356
360
  display: 'Other',
357
361
  },
358
362
  ]; */
359
- const martialStatus: Array<ConceptAnswers> = [
363
+ /* const martialStatus: Array<ConceptAnswers> = [
360
364
  {
361
365
  uuid: 'a8b03712-1350-11df-a1f1-0026b9348838',
362
366
  display: 'Married polygamous',
@@ -398,6 +402,7 @@ function useConcepts() {
398
402
  display: 'Other Non-Coded',
399
403
  },
400
404
  ];
405
+ */
401
406
  //const martialStatus: Array<ConceptAnswers> = config.fieldDefinitions
402
407
  // .find((fieldDefinition) => fieldDefinition.id === 'maritalStatus')
403
408
  // .customConceptAnswers.map((concept) => ({ uuid: concept.uuid, display: concept.label }));
@@ -148,8 +148,8 @@ async function postToRegistry(
148
148
  ...formValues,
149
149
  attributes: {
150
150
  ...formValues.attributes,
151
- ['869f623a-f78e-4ace-9202-0bed481822f5']: 'Failed validation',
152
- ['752a0331-5293-4aa5-bf46-4d51aaf2cdc5']: 'Failed',
151
+ ['5553d509-f03a-4982-8e16-0d6f3d70fb8b']: 'Failed validation',
152
+ ['d8f4d295-3f31-47ec-b377-825bd38820b2']: 'Failed',
153
153
  },
154
154
  });
155
155
  showNotification({
@@ -88,9 +88,9 @@ export function handleClientRegistryResponse(
88
88
  birthdate: new Date(dateOfBirth),
89
89
  isDead: !isAlive,
90
90
  attributes: {
91
- 'b2c38640-2603-4629-aebd-3b54f33f1e3a': contact?.primaryPhone,
92
- '94614350-84c8-41e0-ac29-86bc107069be': contact?.secondaryPhone,
93
- 'b8d0b331-1d2d-4a9a-b741-1816f498bdb6': contact?.emailAddress ?? '',
91
+ '72a759a8-1359-11df-a1f1-0026b9348838': contact?.primaryPhone,
92
+ 'b0a08406-09c0-4f8b-8cb5-b22b6d4a8e46': contact?.secondaryPhone,
93
+ '2f65dbcb-3e58-45a3-8be7-fd1dc9aa0faa': contact?.emailAddress ?? '',
94
94
  },
95
95
  address: {
96
96
  address1: residence?.address,
@@ -104,7 +104,7 @@ export function handleClientRegistryResponse(
104
104
  },
105
105
  identifiers: { ...props.values.identifiers, ...nupiIdentifiers },
106
106
  obs: {
107
- '1054AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA':
107
+ 'a899a9f2-1350-11df-a1f1-0026b9348838':
108
108
  props.values.concepts.find((concept) =>
109
109
  concept.display?.toLowerCase()?.includes(clientResponse.client.maritalStatus?.toLowerCase()),
110
110
  )?.uuid ?? '',
@@ -112,12 +112,12 @@ export function handleClientRegistryResponse(
112
112
  props.values.concepts.find((concept) =>
113
113
  concept.display?.toLowerCase()?.includes(clientResponse.client.educationLevel?.toLowerCase()),
114
114
  )?.uuid ?? '',
115
- '1542AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA':
115
+ 'a8a0a00e-1350-11df-a1f1-0026b9348838':
116
116
  clientResponse.client.occupation === undefined || clientResponse.client.occupation === null
117
- ? '1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'
117
+ ? 'a899e0ac-1350-11df-a1f1-0026b9348838'
118
118
  : props.values.concepts.find(
119
119
  (concept) => concept.display?.toLowerCase() === clientResponse.client.occupation?.toLowerCase(),
120
- )?.uuid ?? '5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
120
+ )?.uuid ?? 'a8aaf3e2-1350-11df-a1f1-0026b9348838',
121
121
  },
122
122
  });
123
123
  dispose();
@@ -133,7 +133,7 @@ export function generateNUPIPayload(formValues: FormValues): RegistryPatient {
133
133
  (concept) => concept.uuid === formValues.obs['a89e48ae-1350-11df-a1f1-0026b9348838'],
134
134
  );
135
135
  const occupation = formValues.concepts.find(
136
- (concept) => concept.uuid === formValues.obs['1542AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'],
136
+ (concept) => concept.uuid === formValues.obs['a8a0a00e-1350-11df-a1f1-0026b9348838'],
137
137
  );
138
138
  const maritalStatus = formValues.concepts.find(
139
139
  (concept) => concept.uuid === formValues.obs['a899a9f2-1350-11df-a1f1-0026b9348838'],
@@ -156,9 +156,9 @@ export function generateNUPIPayload(formValues: FormValues): RegistryPatient {
156
156
  },
157
157
  nextOfKins: [],
158
158
  contact: {
159
- primaryPhone: formValues.attributes['b2c38640-2603-4629-aebd-3b54f33f1e3a'],
160
- secondaryPhone: formValues.attributes['94614350-84c8-41e0-ac29-86bc107069be'],
161
- emailAddress: formValues.attributes['b8d0b331-1d2d-4a9a-b741-1816f498bdb6'],
159
+ primaryPhone: formValues.attributes['72a759a8-1359-11df-a1f1-0026b9348838'],
160
+ secondaryPhone: formValues.attributes['b0a08406-09c0-4f8b-8cb5-b22b6d4a8e46'],
161
+ emailAddress: formValues.attributes['2f65dbcb-3e58-45a3-8be7-fd1dc9aa0faa'],
162
162
  },
163
163
  country: 'KE',
164
164
  countyOfBirth: `0${counties.find((county) => county.name.includes(formValues.address['countyDistrict']))?.code}`,