@kenyaemr/esm-patient-registration-app 4.3.0 → 4.4.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.
Files changed (83) hide show
  1. package/dist/207.js +1 -1
  2. package/dist/207.js.map +1 -1
  3. package/dist/317.js +1 -1
  4. package/dist/317.js.map +1 -1
  5. package/dist/417.js +2 -0
  6. package/dist/417.js.map +1 -0
  7. package/dist/574.js +1 -1
  8. package/dist/591.js +1 -1
  9. package/dist/591.js.map +1 -1
  10. package/dist/62.js +1 -1
  11. package/dist/62.js.map +1 -1
  12. package/dist/635.js +1 -1
  13. package/dist/635.js.map +1 -1
  14. package/dist/68.js +1 -1
  15. package/dist/68.js.map +1 -1
  16. package/dist/698.js +1 -0
  17. package/dist/698.js.map +1 -0
  18. package/dist/735.js +1 -1
  19. package/dist/735.js.map +1 -1
  20. package/dist/757.js +1 -1
  21. package/dist/784.js +1 -1
  22. package/dist/784.js.map +1 -1
  23. package/dist/805.js +1 -1
  24. package/dist/805.js.map +1 -1
  25. package/dist/807.js +1 -1
  26. package/dist/858.js +1 -1
  27. package/dist/858.js.map +1 -1
  28. package/dist/887.js +1 -1
  29. package/dist/887.js.map +1 -1
  30. package/dist/9.js +1 -1
  31. package/dist/9.js.map +1 -1
  32. package/dist/909.js +1 -0
  33. package/dist/{821.js.map → 909.js.map} +1 -1
  34. package/dist/975.js +1 -1
  35. package/dist/975.js.map +1 -1
  36. package/dist/kenyaemr-esm-patient-registration-app.js +1 -0
  37. package/dist/{openmrs-esm-patient-registration-app.js.buildmanifest.json → kenyaemr-esm-patient-registration-app.js.buildmanifest.json} +112 -160
  38. package/dist/kenyaemr-esm-patient-registration-app.js.map +1 -0
  39. package/dist/kenyaemr-esm-patient-registration-app.old +1 -0
  40. package/dist/main.js +1 -1
  41. package/dist/main.js.map +1 -1
  42. package/package.json +3 -3
  43. package/src/constants.ts +1 -1
  44. package/src/index.ts +0 -18
  45. package/src/offline.resources.ts +8 -1
  46. package/src/patient-registration/field/address/address-field.component.tsx +0 -1
  47. package/src/patient-registration/field/person-attributes/coded-person-attribute-field.component.tsx +13 -11
  48. package/src/patient-registration/form-manager.ts +27 -10
  49. package/src/patient-registration/input/basic-input/input/input.test.tsx +47 -10
  50. package/src/patient-registration/input/basic-input/select/select-input.test.tsx +16 -3
  51. package/src/patient-registration/input/custom-input/autosuggest/autosuggest.test.tsx +25 -14
  52. package/src/patient-registration/patient-registration-hooks.ts +21 -75
  53. package/src/patient-registration/patient-registration-types.tsx +2 -8
  54. package/src/patient-registration/patient-registration.component.tsx +3 -26
  55. package/src/patient-registration/section/section-wrapper.component.tsx +1 -1
  56. package/src/root.component.tsx +1 -5
  57. package/translations/en.json +0 -15
  58. package/dist/144.js +0 -2
  59. package/dist/144.js.map +0 -1
  60. package/dist/330.js +0 -1
  61. package/dist/330.js.map +0 -1
  62. package/dist/59.js +0 -1
  63. package/dist/59.js.map +0 -1
  64. package/dist/821.js +0 -1
  65. package/dist/822.js +0 -1
  66. package/dist/822.js.map +0 -1
  67. package/dist/openmrs-esm-patient-registration-app.js +0 -1
  68. package/dist/openmrs-esm-patient-registration-app.js.map +0 -1
  69. package/dist/openmrs-esm-patient-registration-app.old +0 -1
  70. package/src/patient-registration/input/custom-input/estimated-age/estimated-age-input.component.tsx +0 -32
  71. package/src/patient-registration/input/custom-input/estimated-age/estimated-age-input.test.tsx +0 -36
  72. package/src/patient-registration/input/custom-input/unidentified-patient/unidentified-patient-input.component.tsx +0 -24
  73. package/src/patient-registration/input/custom-input/unidentified-patient/unidentified-patient-input.test.tsx +0 -39
  74. package/src/patient-verification/assets/counties.json +0 -236
  75. package/src/patient-verification/assets/verification-assets.ts +0 -11
  76. package/src/patient-verification/patient-verification-hook.tsx +0 -156
  77. package/src/patient-verification/patient-verification-utils.ts +0 -173
  78. package/src/patient-verification/patient-verification.component.tsx +0 -118
  79. package/src/patient-verification/patient-verification.scss +0 -30
  80. package/src/patient-verification/verification-modal/confirm-prompt.component.tsx +0 -69
  81. package/src/patient-verification/verification-modal/empty-prompt.component.tsx +0 -35
  82. package/src/patient-verification/verification-types.ts +0 -50
  83. /package/dist/{144.js.LICENSE.txt → 417.js.LICENSE.txt} +0 -0
@@ -1,30 +0,0 @@
1
- @use '@carbon/colors';
2
- @import '../patient-registration/patient-registration.scss';
3
-
4
- /* Desktop */
5
- :global(.omrs-breakpoint-gt-tablet) {
6
- .verificationWrapper {
7
- display: grid;
8
- grid-template-columns: 1fr 1fr 1fr 1fr;
9
- column-gap: 0.325rem;
10
- align-items: flex-end;
11
- }
12
- }
13
-
14
- /* Tablet */
15
- :global(.omrs-breakpoint-lt-desktop) {
16
- .verificationWrapper {
17
- row-gap: 0.5rem;
18
- display: flex;
19
- flex-direction: column;
20
-
21
- }
22
- }
23
-
24
- .errorWrapper {
25
- color: colors.$red-50;
26
- margin: 0 0 1rem 0;
27
- display: flex;
28
- justify-content: center;
29
- align-items: center;
30
- }
@@ -1,69 +0,0 @@
1
- import React from 'react';
2
- import { useTranslation } from 'react-i18next';
3
- import { Button } from '@carbon/react';
4
- import { age, ExtensionSlot, formatDate } from '@openmrs/esm-framework';
5
- import capitalize from 'lodash-es/capitalize';
6
-
7
- const PatientInfo: React.FC<{ label: string; value: string }> = ({ label, value }) => {
8
- return (
9
- <div style={{ display: 'grid', gridTemplateColumns: '0.25fr 0.75fr', margin: '0.25rem' }}>
10
- <span style={{ minWidth: '5rem', fontWeight: 'bold' }}>{label}</span>
11
- <span>{value}</span>
12
- </div>
13
- );
14
- };
15
-
16
- interface ConfirmPromptProps {
17
- onConfirm: void;
18
- close: void;
19
- patient: any;
20
- }
21
-
22
- const ConfirmPrompt: React.FC<ConfirmPromptProps> = ({ close, onConfirm, patient }) => {
23
- const { t } = useTranslation();
24
- return (
25
- <>
26
- <div className="cds--modal-header">
27
- <h3 className="cds--modal-header__heading">
28
- {t('clientRegistryEmpty', `Patient ${patient?.firstName} ${patient?.lastName} found`)}
29
- </h3>
30
- </div>
31
- <div className="cds--modal-content">
32
- <p>
33
- {t(
34
- 'patientDetailsFound',
35
- 'Patient information found in the registry, do you want to use the information to continue with registration?',
36
- )}
37
- </p>
38
- <div style={{ display: 'flex', margin: '1rem' }}>
39
- <ExtensionSlot
40
- style={{ display: 'flex', alignItems: 'center' }}
41
- extensionSlotName="patient-photo-slot"
42
- state={{ patientName: `${patient?.firstName} ${patient?.lastName}` }}
43
- />
44
- <div style={{ width: '100%', marginLeft: '0.625rem' }}>
45
- <PatientInfo
46
- label={t('patientName', 'Patient name')}
47
- value={`${patient?.firstName} ${patient?.lastName}`}
48
- />
49
- <PatientInfo
50
- label={t('nationalId', 'National ID')}
51
- value={patient?.identifications[0]?.identificationNumber}
52
- />
53
- <PatientInfo label={t('age', 'Age')} value={age(patient?.dateOfBirth)} />
54
- <PatientInfo label={t('dateOfBirth', 'Date of birth')} value={formatDate(new Date(patient?.dateOfBirth))} />
55
- <PatientInfo label={t('gender', 'Gender')} value={capitalize(patient?.gender)} />
56
- </div>
57
- </div>
58
- </div>
59
- <div className="cds--modal-footer">
60
- <Button kind="secondary" onClick={close}>
61
- {t('cancel', 'Cancel')}
62
- </Button>
63
- <Button onClick={onConfirm}>{t('useValues', 'Use values')}</Button>
64
- </div>
65
- </>
66
- );
67
- };
68
-
69
- export default ConfirmPrompt;
@@ -1,35 +0,0 @@
1
- import React from 'react';
2
- import { useTranslation } from 'react-i18next';
3
- import { Button } from '@carbon/react';
4
-
5
- interface EmptyPromptProps {
6
- onConfirm: void;
7
- close: void;
8
- }
9
-
10
- const EmptyPrompt: React.FC<EmptyPromptProps> = ({ close, onConfirm }) => {
11
- const { t } = useTranslation();
12
- return (
13
- <>
14
- <div className="cds--modal-header">
15
- <h3 className="cds--modal-header__heading">{t('clientRegistryEmpty', 'Create & Post Patient')}</h3>
16
- </div>
17
- <div className="cds--modal-content">
18
- <p>
19
- {t(
20
- 'patientNotFound',
21
- 'The patient records could not be found in Client registry, do you want to continue to create and post patient to registry',
22
- )}
23
- </p>
24
- </div>
25
- <div className="cds--modal-footer">
26
- <Button kind="secondary" onClick={close}>
27
- {t('cancel', 'Cancel')}
28
- </Button>
29
- <Button onClick={onConfirm}>{t('continue', 'Continue to registration')}</Button>
30
- </div>
31
- </>
32
- );
33
- };
34
-
35
- export default EmptyPrompt;
@@ -1,50 +0,0 @@
1
- export interface ClientIdentification {
2
- identificationType: string;
3
- identificationNumber: string;
4
- }
5
-
6
- interface ClientContact {
7
- primaryPhone: string;
8
- secondaryPhone?: string;
9
- emailAddress?: string;
10
- }
11
-
12
- export interface ClientRegistryPatient {
13
- clientExists: boolean;
14
- client?: RegistryPatient;
15
- }
16
-
17
- export interface RegistryPatient {
18
- clientNumber?: string;
19
- firstName: string;
20
- middleName: string;
21
- lastName: string;
22
- dateOfBirth: string;
23
- maritalStatus?: string;
24
- gender: string;
25
- occupation?: string;
26
- religion?: string;
27
- educationLevel?: string;
28
- country: string;
29
- countyOfBirth?: string;
30
- isAlive: boolean;
31
- originFacilityKmflCode?: string;
32
- isOnART?: string;
33
- nascopCCCNumber?: string;
34
- residence: {
35
- county: string;
36
- subCounty: string;
37
- ward: string;
38
- village: string;
39
- landmark: string;
40
- address: string;
41
- };
42
- identifications: Array<ClientIdentification>;
43
- contact: ClientContact;
44
- nextOfKins: Array<{
45
- name: string;
46
- relationship: string;
47
- residence: string;
48
- contact: ClientContact;
49
- }>;
50
- }
File without changes