@kenyaemr/esm-patient-registration-app 7.0.3-pre.94 → 8.0.1-pre.101
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/.turbo/turbo-build.log +10 -10
- package/dist/{330.js → 108.js} +1 -1
- package/dist/{330.js.map → 108.js.map} +1 -1
- package/dist/574.js +1 -1
- package/dist/{59.js → 76.js} +1 -1
- package/dist/{59.js.map → 76.js.map} +1 -1
- package/dist/790.js +1 -0
- package/dist/790.js.map +1 -0
- package/dist/kenyaemr-esm-patient-registration-app.js +1 -1
- package/dist/kenyaemr-esm-patient-registration-app.js.buildmanifest.json +58 -58
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +2 -2
- package/src/client-registry/client-registry.component.tsx +22 -0
- package/src/client-registry/hie-client-registry/hie-client-registry.component.tsx +58 -0
- package/src/client-registry/hie-client-registry/hie-client-registry.scss +46 -0
- package/src/{patient-verification → client-registry/patient-verification}/patient-verification-hook.tsx +2 -2
- package/src/{patient-verification → client-registry/patient-verification}/patient-verification-utils.ts +1 -1
- package/src/{patient-verification → client-registry/patient-verification}/patient-verification.component.tsx +4 -1
- package/src/{patient-verification → client-registry/patient-verification}/patient-verification.scss +17 -1
- package/src/config-schema.ts +25 -0
- package/src/index.ts +2 -2
- package/src/patient-registration/field/obs/obs-field.component.tsx +1 -1
- package/src/patient-registration/patient-registration-hooks.ts +4 -1
- package/src/patient-registration/patient-registration.component.tsx +24 -17
- package/translations/en.json +6 -0
- package/dist/564.js +0 -1
- package/dist/564.js.map +0 -1
- /package/src/{patient-verification → client-registry/patient-verification}/assets/counties.json +0 -0
- /package/src/{patient-verification → client-registry/patient-verification}/assets/verification-assets.ts +0 -0
- /package/src/{patient-verification → client-registry/patient-verification}/verification-modal/confirm-prompt.component.tsx +0 -0
- /package/src/{patient-verification → client-registry/patient-verification}/verification-modal/empty-prompt.component.tsx +0 -0
- /package/src/{patient-verification → client-registry/patient-verification}/verification-types.ts +0 -0
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":"
|
|
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":"8.0.1-pre.101"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kenyaemr/esm-patient-registration-app",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.1-pre.101",
|
|
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",
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"webpack": "^5.74.0"
|
|
56
56
|
},
|
|
57
|
-
"stableVersion": "
|
|
57
|
+
"stableVersion": "8.0.0"
|
|
58
58
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type FormikProps } from 'formik';
|
|
2
|
+
import React, { type Dispatch } from 'react';
|
|
3
|
+
import { type FormValues } from '../patient-registration/patient-registration.types';
|
|
4
|
+
import { useFeatureFlag } from '@openmrs/esm-framework';
|
|
5
|
+
import PatientVerification from './patient-verification/patient-verification.component';
|
|
6
|
+
import HIEClientRegistry from './hie-client-registry/hie-client-registry.component';
|
|
7
|
+
|
|
8
|
+
type ClientRegistryProps = {
|
|
9
|
+
props: FormikProps<FormValues>;
|
|
10
|
+
setInitialFormValues: Dispatch<FormValues>;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const ClientRegistry: React.FC<ClientRegistryProps> = (clientRegistryProps) => {
|
|
14
|
+
const healthInformationExchangeFlag = useFeatureFlag('healthInformationExchange');
|
|
15
|
+
|
|
16
|
+
if (healthInformationExchangeFlag) {
|
|
17
|
+
return <HIEClientRegistry {...clientRegistryProps} />;
|
|
18
|
+
}
|
|
19
|
+
return <PatientVerification {...clientRegistryProps} />;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export default ClientRegistry;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import React, { type Dispatch } from 'react';
|
|
2
|
+
import styles from './hie-client-registry.scss';
|
|
3
|
+
import { type FormikProps } from 'formik';
|
|
4
|
+
import { type FormValues } from '../../patient-registration/patient-registration.types';
|
|
5
|
+
import { useTranslation } from 'react-i18next';
|
|
6
|
+
import { Tile, ComboBox, Button, TextInput } from '@carbon/react';
|
|
7
|
+
import { Search } from '@carbon/react/icons';
|
|
8
|
+
import { useConfig } from '@openmrs/esm-framework';
|
|
9
|
+
import { type RegistrationConfig } from '../../config-schema';
|
|
10
|
+
|
|
11
|
+
type HIEClientRegistryProps = {
|
|
12
|
+
props: FormikProps<FormValues>;
|
|
13
|
+
setInitialFormValues: Dispatch<FormValues>;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const HIEClientRegistry: React.FC<HIEClientRegistryProps> = () => {
|
|
17
|
+
const { t } = useTranslation();
|
|
18
|
+
const {
|
|
19
|
+
hieClientRegistry: { identifierTypes },
|
|
20
|
+
} = useConfig<RegistrationConfig>();
|
|
21
|
+
return (
|
|
22
|
+
<div className={styles.hieContainer}>
|
|
23
|
+
<h3 className={styles.productiveHeading02} style={{ color: '#161616' }}>
|
|
24
|
+
{t('patientVerificationFromHIE', 'Patient verification from HIE')}
|
|
25
|
+
</h3>
|
|
26
|
+
<span className={styles.label01}>
|
|
27
|
+
{t('allFieldsRequiredText', 'All fields are required unless marked optional')}
|
|
28
|
+
</span>
|
|
29
|
+
<Tile className={styles.grid}>
|
|
30
|
+
<ComboBox
|
|
31
|
+
light
|
|
32
|
+
onChange={() => {}}
|
|
33
|
+
id="identifier-combobox"
|
|
34
|
+
items={identifierTypes}
|
|
35
|
+
placeholder={t('selectIdentifierType', 'Select identifier type')}
|
|
36
|
+
itemToString={(item) => (item ? item.identifierType : '')}
|
|
37
|
+
titleText={t('identifierType', 'Identifier type')}
|
|
38
|
+
/>
|
|
39
|
+
<TextInput
|
|
40
|
+
light
|
|
41
|
+
id="identifier-search"
|
|
42
|
+
placeholder={t('enterIdentifierSearchValue', 'Enter identifier search value')}
|
|
43
|
+
type="text"
|
|
44
|
+
labelText={t('identifierSearch', 'Identifier search')}
|
|
45
|
+
/>
|
|
46
|
+
<Button
|
|
47
|
+
renderIcon={(props) => <Search size={24} {...props} />}
|
|
48
|
+
iconDescription={t('searchRegistry', 'Search registry')}
|
|
49
|
+
size="md"
|
|
50
|
+
kind="secondary">
|
|
51
|
+
{t('search', 'Search')}
|
|
52
|
+
</Button>
|
|
53
|
+
</Tile>
|
|
54
|
+
</div>
|
|
55
|
+
);
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export default HIEClientRegistry;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
@use '@carbon/type';
|
|
2
|
+
@use '@carbon/layout';
|
|
3
|
+
@use '@carbon/colors';
|
|
4
|
+
|
|
5
|
+
.hieContainer {
|
|
6
|
+
margin-bottom: layout.$layout-01;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.productiveHeading02 {
|
|
10
|
+
@include type.type-style('heading-compact-02');
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.label01 {
|
|
14
|
+
@include type.type-style('label-01');
|
|
15
|
+
margin-top: layout.$spacing-05;
|
|
16
|
+
margin-bottom: layout.$spacing-05;
|
|
17
|
+
color: colors.$gray-50;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* Tablet viewport */
|
|
21
|
+
:global(.omrs-breakpoint-lt-desktop) {
|
|
22
|
+
.grid {
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
row-gap: layout.$spacing-05;
|
|
26
|
+
margin: layout.$spacing-01 0;
|
|
27
|
+
padding-bottom: layout.$layout-02;
|
|
28
|
+
column-gap: layout.$spacing-05;
|
|
29
|
+
|
|
30
|
+
& > button {
|
|
31
|
+
width: 50%;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* Desktop viewport */
|
|
37
|
+
:global(.omrs-breakpoint-gt-tablet) {
|
|
38
|
+
.grid {
|
|
39
|
+
margin: layout.$spacing-01 0;
|
|
40
|
+
padding-bottom: layout.$layout-02;
|
|
41
|
+
display: grid;
|
|
42
|
+
grid-template-columns: 1fr 1fr 0.5fr;
|
|
43
|
+
column-gap: layout.$spacing-05;
|
|
44
|
+
align-items: flex-end;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
type ConceptAnswers,
|
|
7
7
|
type ConceptResponse,
|
|
8
8
|
type FormValues,
|
|
9
|
-
} from '
|
|
9
|
+
} from '../../patient-registration/patient-registration.types';
|
|
10
10
|
|
|
11
11
|
export function searchClientRegistry(
|
|
12
12
|
identifierType: string,
|
|
@@ -108,7 +108,7 @@ export function useGlobalProperties() {
|
|
|
108
108
|
const { data, isLoading, error } = useSWRImmutable(
|
|
109
109
|
`https://afyakenyaidentityapi.health.go.ke/connect/token`,
|
|
110
110
|
swrFetcher,
|
|
111
|
-
{ refreshInterval: 864000 },
|
|
111
|
+
{ refreshInterval: 864000, errorRetryCount: 0 },
|
|
112
112
|
);
|
|
113
113
|
return { data: data, isLoading, error };
|
|
114
114
|
}
|
|
@@ -2,7 +2,7 @@ import { showModal } from '@openmrs/esm-framework';
|
|
|
2
2
|
import { type FormikProps } from 'formik';
|
|
3
3
|
import { type ClientRegistryPatient, type RegistryPatient } from './verification-types';
|
|
4
4
|
import counties from './assets/counties.json';
|
|
5
|
-
import { type FormValues } from '
|
|
5
|
+
import { type FormValues } from '../../patient-registration/patient-registration.types';
|
|
6
6
|
import { capitalize } from 'lodash-es';
|
|
7
7
|
|
|
8
8
|
export function handleClientRegistryResponse(
|
|
@@ -7,7 +7,7 @@ import { searchClientRegistry, useGlobalProperties } from './patient-verificatio
|
|
|
7
7
|
import { showSnackbar, showToast } from '@openmrs/esm-framework';
|
|
8
8
|
import { handleClientRegistryResponse } from './patient-verification-utils';
|
|
9
9
|
import { type FormikProps } from 'formik';
|
|
10
|
-
import { type FormValues } from '
|
|
10
|
+
import { type FormValues } from '../../patient-registration/patient-registration.types';
|
|
11
11
|
|
|
12
12
|
interface PatientVerificationProps {
|
|
13
13
|
props: FormikProps<FormValues>;
|
|
@@ -58,6 +58,9 @@ const PatientVerification: React.FC<PatientVerificationProps> = ({ props }) => {
|
|
|
58
58
|
<h3 className={styles.productiveHeading02} style={{ color: '#161616' }}>
|
|
59
59
|
{t('clientVerificationWithClientRegistry', 'Client verification with client registry')}
|
|
60
60
|
</h3>
|
|
61
|
+
<span className={styles.label01}>
|
|
62
|
+
{t('allFieldsRequiredText', 'All fields are required unless marked optional')}
|
|
63
|
+
</span>
|
|
61
64
|
<div style={{ margin: '1rem 0 1rem' }}>
|
|
62
65
|
<Layer>
|
|
63
66
|
{isLoading && <InlineLoading status="active" iconDescription="Loading" description="Loading data..." />}
|
package/src/{patient-verification → client-registry/patient-verification}/patient-verification.scss
RENAMED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
@use '@carbon/colors';
|
|
2
|
-
@
|
|
2
|
+
@use '@carbon/layout';
|
|
3
|
+
@use '@carbon/type';
|
|
4
|
+
@use '@openmrs/esm-styleguide/src/vars' as *;
|
|
5
|
+
@use '../../patient-registration/patient-registration.scss' as *;
|
|
3
6
|
|
|
4
7
|
/* Desktop */
|
|
5
8
|
:global(.omrs-breakpoint-gt-tablet) {
|
|
@@ -23,3 +26,16 @@
|
|
|
23
26
|
.errorWrapper {
|
|
24
27
|
margin: 0 0 1rem 0;
|
|
25
28
|
}
|
|
29
|
+
|
|
30
|
+
.label01 {
|
|
31
|
+
@include type.type-style('label-01');
|
|
32
|
+
margin-top: layout.$spacing-05;
|
|
33
|
+
margin-bottom: layout.$spacing-05;
|
|
34
|
+
color: $ui-04;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.productiveHeading02 {
|
|
38
|
+
@include type.type-style('heading-compact-02');
|
|
39
|
+
color: $ui-04;
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
}
|
package/src/config-schema.ts
CHANGED
|
@@ -83,6 +83,9 @@ export interface RegistrationConfig {
|
|
|
83
83
|
encounterProviderRoleUuid: string;
|
|
84
84
|
registrationFormUuid: string | null;
|
|
85
85
|
};
|
|
86
|
+
hieClientRegistry: {
|
|
87
|
+
identifierTypes: Array<{ identifierType: string; identifierValue: string }>;
|
|
88
|
+
};
|
|
86
89
|
}
|
|
87
90
|
|
|
88
91
|
export const builtInSections: Array<SectionDefinition> = [
|
|
@@ -364,6 +367,28 @@ export const esmPatientRegistrationSchema = {
|
|
|
364
367
|
'The form UUID to associate with the registration encounter. By default no form will be associated.',
|
|
365
368
|
},
|
|
366
369
|
},
|
|
370
|
+
hieClientRegistry: {
|
|
371
|
+
identifierTypes: {
|
|
372
|
+
_type: Type.Array,
|
|
373
|
+
_elements: {
|
|
374
|
+
identifierType: {
|
|
375
|
+
_type: Type.String,
|
|
376
|
+
_description: 'The label of the identifier type',
|
|
377
|
+
},
|
|
378
|
+
identifierValue: {
|
|
379
|
+
_type: Type.String,
|
|
380
|
+
_description: 'The value of the identifier type',
|
|
381
|
+
},
|
|
382
|
+
},
|
|
383
|
+
_default: [
|
|
384
|
+
{ identifierType: 'National ID', identifierValue: 'national-id' },
|
|
385
|
+
{ identifierType: 'Passport Number', identifierValue: 'passport number' },
|
|
386
|
+
{ identifierType: 'Birth Certificate Number', identifierValue: 'birth-certificate-number' },
|
|
387
|
+
{ identifierType: 'Alien ID Number', identifierValue: 'alien-id-number' },
|
|
388
|
+
{ identifierType: 'Refugee ID Number', identifierValue: 'refugee-number' },
|
|
389
|
+
],
|
|
390
|
+
},
|
|
391
|
+
},
|
|
367
392
|
_validators: [
|
|
368
393
|
validator(
|
|
369
394
|
(config: RegistrationConfig) =>
|
package/src/index.ts
CHANGED
|
@@ -68,11 +68,11 @@ export const deleteIdentifierConfirmationModal = getAsyncLifecycle(
|
|
|
68
68
|
);
|
|
69
69
|
|
|
70
70
|
export const confirmClientRegistryModal = getAsyncLifecycle(
|
|
71
|
-
() => import('./patient-verification/verification-modal/confirm-prompt.component'),
|
|
71
|
+
() => import('./client-registry/patient-verification/verification-modal/confirm-prompt.component'),
|
|
72
72
|
options,
|
|
73
73
|
);
|
|
74
74
|
|
|
75
75
|
export const emptyClientRegistryModal = getAsyncLifecycle(
|
|
76
|
-
() => import('./patient-verification/verification-modal/empty-prompt.component'),
|
|
76
|
+
() => import('./client-registry/patient-verification/verification-modal/empty-prompt.component'),
|
|
77
77
|
options,
|
|
78
78
|
);
|
|
@@ -14,7 +14,10 @@ import useSWR from 'swr';
|
|
|
14
14
|
import { v4 } from 'uuid';
|
|
15
15
|
import { type RegistrationConfig } from '../config-schema';
|
|
16
16
|
import { patientRegistration } from '../constants';
|
|
17
|
-
import {
|
|
17
|
+
import {
|
|
18
|
+
useConceptAnswers,
|
|
19
|
+
useGlobalProperties,
|
|
20
|
+
} from '../client-registry/patient-verification/patient-verification-hook';
|
|
18
21
|
import {
|
|
19
22
|
type FormValues,
|
|
20
23
|
type PatientRegistration,
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
interpolateUrl,
|
|
13
13
|
usePatient,
|
|
14
14
|
usePatientPhoto,
|
|
15
|
+
useFeatureFlag,
|
|
15
16
|
} from '@openmrs/esm-framework';
|
|
16
17
|
import { getValidationSchema } from './validation/patient-registration-validation';
|
|
17
18
|
import { type FormValues, type CapturePhotoProps } from './patient-registration.types';
|
|
@@ -19,14 +20,15 @@ import { PatientRegistrationContext } from './patient-registration-context';
|
|
|
19
20
|
import { type SavePatientForm, SavePatientTransactionManager } from './form-manager';
|
|
20
21
|
import { DummyDataInput } from './input/dummy-data/dummy-data-input.component';
|
|
21
22
|
import { cancelRegistration, filterOutUndefinedPatientIdentifiers, scrollIntoView } from './patient-registration-utils';
|
|
22
|
-
import { useInitialAddressFieldValues, useInitialFormValues, usePatientUuidMap
|
|
23
|
+
import { useInitialAddressFieldValues, useInitialFormValues, usePatientUuidMap } from './patient-registration-hooks';
|
|
23
24
|
import { ResourcesContext } from '../offline.resources';
|
|
24
25
|
import { builtInSections, type RegistrationConfig, type SectionDefinition } from '../config-schema';
|
|
25
26
|
import { SectionWrapper } from './section/section-wrapper.component';
|
|
26
27
|
import BeforeSavePrompt from './before-save-prompt';
|
|
27
28
|
import styles from './patient-registration.scss';
|
|
28
|
-
import PatientVerification from '../patient-verification/patient-verification.component';
|
|
29
|
-
import { handleSavePatientToClientRegistry } from '../patient-verification/patient-verification-hook';
|
|
29
|
+
import PatientVerification from '../client-registry/patient-verification/patient-verification.component';
|
|
30
|
+
import { handleSavePatientToClientRegistry } from '../client-registry/patient-verification/patient-verification-hook';
|
|
31
|
+
import ClientRegistry from '../client-registry/client-registry.component';
|
|
30
32
|
|
|
31
33
|
let exportedInitialFormValuesForTesting = {} as FormValues;
|
|
32
34
|
|
|
@@ -36,6 +38,7 @@ export interface PatientRegistrationProps {
|
|
|
36
38
|
}
|
|
37
39
|
|
|
38
40
|
export const PatientRegistration: React.FC<PatientRegistrationProps> = ({ savePatientForm, isOffline }) => {
|
|
41
|
+
const healthInformationExchangeFlag = useFeatureFlag('healthInformationExchange');
|
|
39
42
|
const { currentSession, identifierTypes } = useContext(ResourcesContext);
|
|
40
43
|
const { search } = useLocation();
|
|
41
44
|
const config = useConfig() as RegistrationConfig;
|
|
@@ -158,6 +161,8 @@ export const PatientRegistration: React.FC<PatientRegistrationProps> = ({ savePa
|
|
|
158
161
|
}
|
|
159
162
|
};
|
|
160
163
|
|
|
164
|
+
const enableRegistryButton = healthInformationExchangeFlag ? false : !enableClientRegistry;
|
|
165
|
+
|
|
161
166
|
const displayErrors = (errors) => {
|
|
162
167
|
if (errors && typeof errors === 'object' && !!Object.keys(errors).length) {
|
|
163
168
|
Object.keys(errors).forEach((error) => {
|
|
@@ -198,18 +203,20 @@ export const PatientRegistration: React.FC<PatientRegistrationProps> = ({ savePa
|
|
|
198
203
|
</Link>
|
|
199
204
|
</div>
|
|
200
205
|
))}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
206
|
+
{!healthInformationExchangeFlag && (
|
|
207
|
+
<Button
|
|
208
|
+
renderIcon={ShareKnowledge}
|
|
209
|
+
disabled={!currentSession || !identifierTypes}
|
|
210
|
+
onClick={() => {
|
|
211
|
+
setEnableClientRegistry(true);
|
|
212
|
+
props.isValid
|
|
213
|
+
? handleSavePatientToClientRegistry(props.values, props.setValues, inEditMode)
|
|
214
|
+
: props.validateForm().then((errors) => displayErrors(errors));
|
|
215
|
+
}}
|
|
216
|
+
className={styles.submitButton}>
|
|
217
|
+
{t('postToRegistry', 'Post to registry')}
|
|
218
|
+
</Button>
|
|
219
|
+
)}
|
|
213
220
|
<Button
|
|
214
221
|
className={styles.submitButton}
|
|
215
222
|
type="submit"
|
|
@@ -217,7 +224,7 @@ export const PatientRegistration: React.FC<PatientRegistrationProps> = ({ savePa
|
|
|
217
224
|
// Current session and identifiers are required for patient registration.
|
|
218
225
|
// If currentSession or identifierTypes are not available, then the
|
|
219
226
|
// user should be blocked to register the patient.
|
|
220
|
-
disabled={!currentSession || !identifierTypes || props.isSubmitting ||
|
|
227
|
+
disabled={!currentSession || !identifierTypes || props.isSubmitting || enableRegistryButton}>
|
|
221
228
|
{props.isSubmitting ? (
|
|
222
229
|
<InlineLoading
|
|
223
230
|
className={styles.spinner}
|
|
@@ -249,7 +256,7 @@ export const PatientRegistration: React.FC<PatientRegistrationProps> = ({ savePa
|
|
|
249
256
|
initialFormValues: props.initialValues,
|
|
250
257
|
setInitialFormValues,
|
|
251
258
|
}}>
|
|
252
|
-
<
|
|
259
|
+
<ClientRegistry props={props} setInitialFormValues={setInitialFormValues} />
|
|
253
260
|
{sections.map((section, index) => (
|
|
254
261
|
<SectionWrapper
|
|
255
262
|
key={`registration-section-${section.id}`}
|
package/translations/en.json
CHANGED
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"editIdentifierTooltip": "Edit",
|
|
41
41
|
"editPatientDetails": "Edit patient details",
|
|
42
42
|
"editPatientDetailsBreadcrumb": "Edit patient details",
|
|
43
|
+
"enterIdentifierSearchValue": "Enter identifier search value",
|
|
43
44
|
"error": "Error",
|
|
44
45
|
"errorFetchingOrderedFields": "Error occured fetching ordered fields for address hierarchy",
|
|
45
46
|
"estimatedAgeInMonthsLabelText": "Estimated age in months",
|
|
@@ -54,6 +55,8 @@
|
|
|
54
55
|
"genderUnspecified": "Gender is not specified",
|
|
55
56
|
"givenNameLabelText": "First Name",
|
|
56
57
|
"givenNameRequired": "Given name is required",
|
|
58
|
+
"identifierSearch": "Identifier search",
|
|
59
|
+
"identifierType": "Identifier type",
|
|
57
60
|
"identifierValueRequired": "Identifier value is required",
|
|
58
61
|
"idFieldLabelText": "Identifiers",
|
|
59
62
|
"IDInstructions": "Select the identifiers you'd like to add for this patient:",
|
|
@@ -78,6 +81,7 @@
|
|
|
78
81
|
"patientNameKnown": "Patient's Name is Known?",
|
|
79
82
|
"patientNotFound": "The patient records could not be found in Client registry, do you want to continue to create and post patient to registry",
|
|
80
83
|
"patientRegistrationBreadcrumb": "Patient Registration",
|
|
84
|
+
"patientVerificationFromHIE": "Patient verification from HIE",
|
|
81
85
|
"postToRegistry": "Post to registry",
|
|
82
86
|
"registerPatient": "Register Patient",
|
|
83
87
|
"registerPatientSuccessSnackbarSubtitle": "The patient can now be found by searching for them using their name or ID number",
|
|
@@ -94,9 +98,11 @@
|
|
|
94
98
|
"removeIdentifierButton": "Remove Identifier",
|
|
95
99
|
"resetIdentifierTooltip": "Reset",
|
|
96
100
|
"restoreRelationshipActionButton": "Undo",
|
|
101
|
+
"search": "Search",
|
|
97
102
|
"searchAddress": "Search address",
|
|
98
103
|
"searchClientRegistry": "Search client registry",
|
|
99
104
|
"searchIdentifierPlaceholder": "Search identifier",
|
|
105
|
+
"searchRegistry": "Search registry",
|
|
100
106
|
"selectAnOption": "Select an option",
|
|
101
107
|
"selectCountry": "Select country",
|
|
102
108
|
"selectIdentifierType": "Select identifier type",
|