@bahmni/registration-app 0.0.1-dev.100

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 (123) hide show
  1. package/LICENSE +9 -0
  2. package/README.md +7 -0
  3. package/dist/App.d.ts +4 -0
  4. package/dist/App.d.ts.map +1 -0
  5. package/dist/LNWAZHJI-BY_A0vjK.js +33 -0
  6. package/dist/MWZ6AO7Z-CdNPTGeF.js +42 -0
  7. package/dist/YPM2AS64-BSsKBsT9.js +8975 -0
  8. package/dist/components/common/PersonAttributeInput.d.ts +26 -0
  9. package/dist/components/common/PersonAttributeInput.d.ts.map +1 -0
  10. package/dist/components/common/personAttributeHelpers.d.ts +11 -0
  11. package/dist/components/common/personAttributeHelpers.d.ts.map +1 -0
  12. package/dist/components/common/personAttributeValidation.d.ts +20 -0
  13. package/dist/components/common/personAttributeValidation.d.ts.map +1 -0
  14. package/dist/components/forms/additionalIdentifiers/AdditionalIdentifiers.d.ts +15 -0
  15. package/dist/components/forms/additionalIdentifiers/AdditionalIdentifiers.d.ts.map +1 -0
  16. package/dist/components/forms/additionalInfo/AdditionalInfo.d.ts +15 -0
  17. package/dist/components/forms/additionalInfo/AdditionalInfo.d.ts.map +1 -0
  18. package/dist/components/forms/addressInfo/AddressAutocompleteField.d.ts +19 -0
  19. package/dist/components/forms/addressInfo/AddressAutocompleteField.d.ts.map +1 -0
  20. package/dist/components/forms/addressInfo/AddressInfo.d.ts +16 -0
  21. package/dist/components/forms/addressInfo/AddressInfo.d.ts.map +1 -0
  22. package/dist/components/forms/contactInfo/ContactInfo.d.ts +15 -0
  23. package/dist/components/forms/contactInfo/ContactInfo.d.ts.map +1 -0
  24. package/dist/components/forms/patientRelationships/PatientRelationships.d.ts +27 -0
  25. package/dist/components/forms/patientRelationships/PatientRelationships.d.ts.map +1 -0
  26. package/dist/components/forms/patientRelationships/RelationshipRow.d.ts +33 -0
  27. package/dist/components/forms/patientRelationships/RelationshipRow.d.ts.map +1 -0
  28. package/dist/components/forms/patientRelationships/index.d.ts +3 -0
  29. package/dist/components/forms/patientRelationships/index.d.ts.map +1 -0
  30. package/dist/components/forms/patientRelationships/usePatientRelationship.d.ts +26 -0
  31. package/dist/components/forms/patientRelationships/usePatientRelationship.d.ts.map +1 -0
  32. package/dist/components/forms/patientRelationships/useRelationshipManager.d.ts +26 -0
  33. package/dist/components/forms/patientRelationships/useRelationshipManager.d.ts.map +1 -0
  34. package/dist/components/forms/profile/Profile.d.ts +25 -0
  35. package/dist/components/forms/profile/Profile.d.ts.map +1 -0
  36. package/dist/components/forms/profile/dateAgeUtils.d.ts +46 -0
  37. package/dist/components/forms/profile/dateAgeUtils.d.ts.map +1 -0
  38. package/dist/components/patientPhotoUpload/PatientPhotoUpload.d.ts +8 -0
  39. package/dist/components/patientPhotoUpload/PatientPhotoUpload.d.ts.map +1 -0
  40. package/dist/components/registrationActions/RegistrationActions.d.ts +16 -0
  41. package/dist/components/registrationActions/RegistrationActions.d.ts.map +1 -0
  42. package/dist/components/registrationActions/index.d.ts +3 -0
  43. package/dist/components/registrationActions/index.d.ts.map +1 -0
  44. package/dist/config/tanstackQuery.d.ts +3 -0
  45. package/dist/config/tanstackQuery.d.ts.map +1 -0
  46. package/dist/constants/app.d.ts +6 -0
  47. package/dist/constants/app.d.ts.map +1 -0
  48. package/dist/contexts/PersonAttributesContext.d.ts +16 -0
  49. package/dist/contexts/PersonAttributesContext.d.ts.map +1 -0
  50. package/dist/contexts/RegistrationConfigContext.d.ts +3 -0
  51. package/dist/contexts/RegistrationConfigContext.d.ts.map +1 -0
  52. package/dist/hooks/useAdditionalIdentifiers.d.ts +11 -0
  53. package/dist/hooks/useAdditionalIdentifiers.d.ts.map +1 -0
  54. package/dist/hooks/useAddressFields.d.ts +46 -0
  55. package/dist/hooks/useAddressFields.d.ts.map +1 -0
  56. package/dist/hooks/useAddressFieldsWithConfig.d.ts +32 -0
  57. package/dist/hooks/useAddressFieldsWithConfig.d.ts.map +1 -0
  58. package/dist/hooks/useAddressSuggestions.d.ts +12 -0
  59. package/dist/hooks/useAddressSuggestions.d.ts.map +1 -0
  60. package/dist/hooks/useCreatePatient.d.ts +18 -0
  61. package/dist/hooks/useCreatePatient.d.ts.map +1 -0
  62. package/dist/hooks/useFilteredExtensions.d.ts +15 -0
  63. package/dist/hooks/useFilteredExtensions.d.ts.map +1 -0
  64. package/dist/hooks/usePatientDetails.d.ts +22 -0
  65. package/dist/hooks/usePatientDetails.d.ts.map +1 -0
  66. package/dist/hooks/usePatientPhoto.d.ts +9 -0
  67. package/dist/hooks/usePatientPhoto.d.ts.map +1 -0
  68. package/dist/hooks/usePatientSearch.d.ts +15 -0
  69. package/dist/hooks/usePatientSearch.d.ts.map +1 -0
  70. package/dist/hooks/usePersonAttributeFields.d.ts +35 -0
  71. package/dist/hooks/usePersonAttributeFields.d.ts.map +1 -0
  72. package/dist/hooks/usePersonAttributes.d.ts +8 -0
  73. package/dist/hooks/usePersonAttributes.d.ts.map +1 -0
  74. package/dist/hooks/useRegistrationConfig.d.ts +3 -0
  75. package/dist/hooks/useRegistrationConfig.d.ts.map +1 -0
  76. package/dist/hooks/useRelationshipValidation.d.ts +19 -0
  77. package/dist/hooks/useRelationshipValidation.d.ts.map +1 -0
  78. package/dist/hooks/useUpdatePatient.d.ts +20 -0
  79. package/dist/hooks/useUpdatePatient.d.ts.map +1 -0
  80. package/dist/hooks/useVisit.d.ts +13 -0
  81. package/dist/hooks/useVisit.d.ts.map +1 -0
  82. package/dist/index-CO_ty3tE.js +164388 -0
  83. package/dist/index.css +1 -0
  84. package/dist/index.d.ts +4 -0
  85. package/dist/index.d.ts.map +1 -0
  86. package/dist/index.js +6 -0
  87. package/dist/locales/locale_en.json +159 -0
  88. package/dist/locales/locale_es.json +159 -0
  89. package/dist/models/patient.d.ts +45 -0
  90. package/dist/models/patient.d.ts.map +1 -0
  91. package/dist/models/registrationConfig.d.ts +15 -0
  92. package/dist/models/registrationConfig.d.ts.map +1 -0
  93. package/dist/models/validation.d.ts +74 -0
  94. package/dist/models/validation.d.ts.map +1 -0
  95. package/dist/pages/PatientRegister/PatientRegister.d.ts +3 -0
  96. package/dist/pages/PatientRegister/PatientRegister.d.ts.map +1 -0
  97. package/dist/pages/PatientRegister/patientFormService.d.ts +41 -0
  98. package/dist/pages/PatientRegister/patientFormService.d.ts.map +1 -0
  99. package/dist/pages/PatientRegister/visitTypeSelector.d.ts +9 -0
  100. package/dist/pages/PatientRegister/visitTypeSelector.d.ts.map +1 -0
  101. package/dist/pages/patientSearchPage/appointmentSearchResultActionHandler.d.ts +13 -0
  102. package/dist/pages/patientSearchPage/appointmentSearchResultActionHandler.d.ts.map +1 -0
  103. package/dist/pages/patientSearchPage/index.d.ts +8 -0
  104. package/dist/pages/patientSearchPage/index.d.ts.map +1 -0
  105. package/dist/pages/patientSearchPage/utils.d.ts +15 -0
  106. package/dist/pages/patientSearchPage/utils.d.ts.map +1 -0
  107. package/dist/providers/PersonAttributesProvider.d.ts +9 -0
  108. package/dist/providers/PersonAttributesProvider.d.ts.map +1 -0
  109. package/dist/providers/RegistrationConfigProvider.d.ts +9 -0
  110. package/dist/providers/RegistrationConfigProvider.d.ts.map +1 -0
  111. package/dist/utils/ageUtils.d.ts +36 -0
  112. package/dist/utils/ageUtils.d.ts.map +1 -0
  113. package/dist/utils/extensionNavigation.d.ts +9 -0
  114. package/dist/utils/extensionNavigation.d.ts.map +1 -0
  115. package/dist/utils/identifierGenderUtils.d.ts +10 -0
  116. package/dist/utils/identifierGenderUtils.d.ts.map +1 -0
  117. package/dist/utils/patientDataConverter.d.ts +10 -0
  118. package/dist/utils/patientDataConverter.d.ts.map +1 -0
  119. package/dist/utils/translation.d.ts +3 -0
  120. package/dist/utils/translation.d.ts.map +1 -0
  121. package/dist/utils/visitUtils.d.ts +5 -0
  122. package/dist/utils/visitUtils.d.ts.map +1 -0
  123. package/package.json +31 -0
@@ -0,0 +1,26 @@
1
+ import { AttributeAnswer } from '../../hooks/usePersonAttributeFields';
2
+ export interface ValidationConfig {
3
+ pattern?: string;
4
+ errorMessage?: string;
5
+ }
6
+ export interface PersonAttributeInputProps {
7
+ uuid: string;
8
+ label: string;
9
+ format: string;
10
+ value: string | number | boolean | undefined;
11
+ answers?: AttributeAnswer[];
12
+ error?: string;
13
+ placeholder?: string;
14
+ validation?: ValidationConfig;
15
+ onChange: (value: string | number | boolean) => void;
16
+ }
17
+ /**
18
+ * Dynamic person attribute input component that renders appropriate input
19
+ * based on the attribute format (Boolean, Concept, String, Date, Number, etc.)
20
+ */
21
+ export declare const PersonAttributeInput: {
22
+ ({ uuid, label, format, value, answers, error, placeholder, validation, onChange, }: PersonAttributeInputProps): import("react/jsx-runtime").JSX.Element;
23
+ displayName: string;
24
+ };
25
+ export default PersonAttributeInput;
26
+ //# sourceMappingURL=PersonAttributeInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PersonAttributeInput.d.ts","sourceRoot":"","sources":["../../../src/components/common/PersonAttributeInput.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAGvE,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;IAC7C,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,KAAK,IAAI,CAAC;CACtD;AAOD;;;GAGG;AACH,eAAO,MAAM,oBAAoB;yFAU9B,yBAAyB;;CA0I3B,CAAC;AAIF,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { PersonAttributeField } from '../../hooks/usePersonAttributeFields';
2
+ import { PersonAttributesData } from '../../models/patient';
3
+ export interface ConfigAttribute {
4
+ field: string;
5
+ translationKey: string;
6
+ }
7
+ export declare const getFieldsToShow: (attributeFields: PersonAttributeField[], configAttributes: ConfigAttribute[]) => PersonAttributeField[];
8
+ export declare const createFieldTranslationMap: (configAttributes: ConfigAttribute[]) => Record<string, string>;
9
+ export declare const initializeFormData: (fieldsToShow: PersonAttributeField[], initialData?: PersonAttributesData) => PersonAttributesData;
10
+ export declare const getFieldLabel: (fieldName: string, fieldTranslationMap: Record<string, string>, translateFn: (key: string) => string) => string;
11
+ //# sourceMappingURL=personAttributeHelpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"personAttributeHelpers.d.ts","sourceRoot":"","sources":["../../../src/components/common/personAttributeHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAEjE,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,eAAe,GAC1B,iBAAiB,oBAAoB,EAAE,EACvC,kBAAkB,eAAe,EAAE,KAClC,oBAAoB,EAStB,CAAC;AAEF,eAAO,MAAM,yBAAyB,GACpC,kBAAkB,eAAe,EAAE,KAClC,MAAM,CAAC,MAAM,EAAE,MAAM,CAMvB,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAC7B,cAAc,oBAAoB,EAAE,EACpC,cAAc,oBAAoB,KACjC,oBAMF,CAAC;AAEF,eAAO,MAAM,aAAa,GACxB,WAAW,MAAM,EACjB,qBAAqB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC3C,aAAa,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,KACnC,MAGF,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { PersonAttributeField } from '../../hooks/usePersonAttributeFields';
2
+ import { PersonAttributesData } from '../../models/patient';
3
+ export interface ValidationConfig {
4
+ pattern: string;
5
+ errorMessage: string;
6
+ }
7
+ export interface ValidationResult {
8
+ isValid: boolean;
9
+ errors: Record<string, string>;
10
+ }
11
+ export interface FieldValidationConfig {
12
+ [fieldName: string]: ValidationConfig;
13
+ }
14
+ export declare const getValidationConfig: (fieldName: string, fieldValidationConfig?: FieldValidationConfig) => ValidationConfig | undefined;
15
+ export declare const validateField: (value: string | number | boolean | undefined, validationConfig: ValidationConfig, t: (key: string) => string) => {
16
+ isValid: boolean;
17
+ error: string;
18
+ };
19
+ export declare const validateAllFields: (fieldsToShow: PersonAttributeField[], formData: PersonAttributesData, fieldValidationConfig?: FieldValidationConfig, t?: (key: string) => string) => ValidationResult;
20
+ //# sourceMappingURL=personAttributeValidation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"personAttributeValidation.d.ts","sourceRoot":"","sources":["../../../src/components/common/personAttributeValidation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAEjE,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChC;AAED,MAAM,WAAW,qBAAqB;IACpC,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,CAAC;CACvC;AAED,eAAO,MAAM,mBAAmB,GAC9B,WAAW,MAAM,EACjB,wBAAwB,qBAAqB,KAC5C,gBAAgB,GAAG,SAQrB,CAAC;AAEF,eAAO,MAAM,aAAa,GACxB,OAAO,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,EAC5C,kBAAkB,gBAAgB,EAClC,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,KACzB;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAYnC,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC5B,cAAc,oBAAoB,EAAE,EACpC,UAAU,oBAAoB,EAC9B,wBAAwB,qBAAqB,EAC7C,IAAI,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,KAC1B,gBAsBF,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { AdditionalIdentifiersData } from '../../../models/patient';
2
+ export interface AdditionalIdentifiersRef {
3
+ validate: () => boolean;
4
+ getData: () => AdditionalIdentifiersData;
5
+ }
6
+ interface AdditionalIdentifiersProps {
7
+ initialData?: AdditionalIdentifiersData;
8
+ ref?: React.Ref<AdditionalIdentifiersRef>;
9
+ }
10
+ export declare const AdditionalIdentifiers: {
11
+ ({ initialData, ref, }: AdditionalIdentifiersProps): import("react/jsx-runtime").JSX.Element | null;
12
+ displayName: string;
13
+ };
14
+ export default AdditionalIdentifiers;
15
+ //# sourceMappingURL=AdditionalIdentifiers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AdditionalIdentifiers.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/additionalIdentifiers/AdditionalIdentifiers.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAIzE,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,MAAM,OAAO,CAAC;IACxB,OAAO,EAAE,MAAM,yBAAyB,CAAC;CAC1C;AAED,UAAU,0BAA0B;IAClC,WAAW,CAAC,EAAE,yBAAyB,CAAC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;CAC3C;AAQD,eAAO,MAAM,qBAAqB;4BAG/B,0BAA0B;;CA6I5B,CAAC;AAIF,eAAe,qBAAqB,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { PersonAttributesData } from '../../../models/patient';
2
+ export interface AdditionalInfoRef {
3
+ validate: () => boolean;
4
+ getData: () => PersonAttributesData;
5
+ }
6
+ interface AdditionalInfoProps {
7
+ initialData?: PersonAttributesData;
8
+ ref?: React.Ref<AdditionalInfoRef>;
9
+ }
10
+ export declare const AdditionalInfo: {
11
+ ({ initialData, ref }: AdditionalInfoProps): import("react/jsx-runtime").JSX.Element | null;
12
+ displayName: string;
13
+ };
14
+ export default AdditionalInfo;
15
+ //# sourceMappingURL=AdditionalInfo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AdditionalInfo.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/additionalInfo/AdditionalInfo.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAcpE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,OAAO,CAAC;IACxB,OAAO,EAAE,MAAM,oBAAoB,CAAC;CACrC;AAED,UAAU,mBAAmB;IAC3B,WAAW,CAAC,EAAE,oBAAoB,CAAC;IACnC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;CACpC;AAED,eAAO,MAAM,cAAc;2BAA0B,mBAAmB;;CAgHvE,CAAC;AAIF,eAAe,cAAc,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { AddressHierarchyEntry } from '@bahmni/services';
2
+ import { AddressLevel } from '../../../hooks/useAddressFields';
3
+ interface AddressAutocompleteFieldProps {
4
+ fieldName: string;
5
+ level: AddressLevel;
6
+ isDisabled: boolean;
7
+ error?: string;
8
+ suggestions: AddressHierarchyEntry[];
9
+ selectedItem: AddressHierarchyEntry | null;
10
+ onSelectionChange: (field: string, entry: AddressHierarchyEntry | null) => void;
11
+ onInputChange: (field: string, value: string) => void;
12
+ translationKey?: string;
13
+ }
14
+ export declare const AddressAutocompleteField: {
15
+ ({ fieldName, level, isDisabled, error, suggestions, selectedItem, onSelectionChange, onInputChange, translationKey, }: AddressAutocompleteFieldProps): import("react/jsx-runtime").JSX.Element;
16
+ displayName: string;
17
+ };
18
+ export default AddressAutocompleteField;
19
+ //# sourceMappingURL=AddressAutocompleteField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AddressAutocompleteField.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/addressInfo/AddressAutocompleteField.tsx"],"names":[],"mappings":"AACA,OAAO,EAAkB,KAAK,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAE9E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAGpE,UAAU,6BAA6B;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,YAAY,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,qBAAqB,EAAE,CAAC;IACrC,YAAY,EAAE,qBAAqB,GAAG,IAAI,CAAC;IAC3C,iBAAiB,EAAE,CACjB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,qBAAqB,GAAG,IAAI,KAChC,IAAI,CAAC;IACV,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtD,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,wBAAwB;4HAUlC,6BAA6B;;CAwD/B,CAAC;AAIF,eAAe,wBAAwB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { PatientAddress } from '@bahmni/services';
2
+ import { AddressData } from '../../../hooks/useAddressFields';
3
+ export type AddressInfoRef = {
4
+ validate: () => boolean;
5
+ getData: () => PatientAddress;
6
+ };
7
+ interface AddressInfoProps {
8
+ initialData?: AddressData;
9
+ ref?: React.Ref<AddressInfoRef>;
10
+ }
11
+ export declare const AddressInfo: {
12
+ ({ initialData, ref }: AddressInfoProps): import("react/jsx-runtime").JSX.Element;
13
+ displayName: string;
14
+ };
15
+ export default AddressInfo;
16
+ //# sourceMappingURL=AddressInfo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AddressInfo.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/addressInfo/AddressInfo.tsx"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,kBAAkB,CAAC;AAS1B,OAAO,KAAK,EACV,WAAW,EAEZ,MAAM,iCAAiC,CAAC;AAMzC,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,EAAE,MAAM,OAAO,CAAC;IACxB,OAAO,EAAE,MAAM,cAAc,CAAC;CAC/B,CAAC;AAEF,UAAU,gBAAgB;IACxB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;CACjC;AAED,eAAO,MAAM,WAAW;2BAA0B,gBAAgB;;CAoYjE,CAAC;AAIF,eAAe,WAAW,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { PersonAttributesData } from '../../../models/patient';
2
+ export interface ContactInfoRef {
3
+ validate: () => boolean;
4
+ getData: () => PersonAttributesData;
5
+ }
6
+ interface ContactInfoProps {
7
+ initialData?: PersonAttributesData;
8
+ ref?: React.Ref<ContactInfoRef>;
9
+ }
10
+ export declare const ContactInfo: {
11
+ ({ initialData, ref }: ContactInfoProps): import("react/jsx-runtime").JSX.Element | null;
12
+ displayName: string;
13
+ };
14
+ export default ContactInfo;
15
+ //# sourceMappingURL=ContactInfo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContactInfo.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/contactInfo/ContactInfo.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAcpE,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,OAAO,CAAC;IACxB,OAAO,EAAE,MAAM,oBAAoB,CAAC;CACrC;AAED,UAAU,gBAAgB;IACxB,WAAW,CAAC,EAAE,oBAAoB,CAAC;IACnC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;CACjC;AAED,eAAO,MAAM,WAAW;2BAA0B,gBAAgB;;CAyGjE,CAAC;AAIF,eAAe,WAAW,CAAC"}
@@ -0,0 +1,27 @@
1
+ export interface RelationshipData {
2
+ id: string;
3
+ relationshipType: string;
4
+ relationshipTypeLabel?: string;
5
+ patientId: string;
6
+ patientUuid?: string;
7
+ patientName?: string;
8
+ tillDate: string;
9
+ isExisting?: boolean;
10
+ isDeleted?: boolean;
11
+ }
12
+ export interface PatientRelationshipsRef {
13
+ getData: () => RelationshipData[];
14
+ validate: () => boolean;
15
+ clearData: () => void;
16
+ removeDeletedRelationships: () => void;
17
+ }
18
+ interface PatientRelationshipsProps {
19
+ initialData?: RelationshipData[];
20
+ ref?: React.Ref<PatientRelationshipsRef>;
21
+ }
22
+ export declare const PatientRelationships: {
23
+ ({ initialData, ref, }: PatientRelationshipsProps): import("react/jsx-runtime").JSX.Element;
24
+ displayName: string;
25
+ };
26
+ export default PatientRelationships;
27
+ //# sourceMappingURL=PatientRelationships.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PatientRelationships.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/patientRelationships/PatientRelationships.tsx"],"names":[],"mappings":"AAcA,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,gBAAgB,EAAE,MAAM,CAAC;IACzB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,MAAM,gBAAgB,EAAE,CAAC;IAClC,QAAQ,EAAE,MAAM,OAAO,CAAC;IACxB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,0BAA0B,EAAE,MAAM,IAAI,CAAC;CACxC;AAED,UAAU,yBAAyB;IACjC,WAAW,CAAC,EAAE,gBAAgB,EAAE,CAAC;IACjC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;CAC1C;AAED,eAAO,MAAM,oBAAoB;4BAG9B,yBAAyB;;CA+F3B,CAAC;AAIF,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { PatientSuggestion } from '../../../hooks/usePatientSearch';
2
+ import { RelationshipData } from './PatientRelationships';
3
+ export interface RelationshipType {
4
+ uuid: string;
5
+ aIsToB: string;
6
+ bIsToA: string;
7
+ }
8
+ interface RelationshipRowProps {
9
+ relationship: RelationshipData;
10
+ relationshipTypes: RelationshipType[];
11
+ suggestions: PatientSuggestion[];
12
+ errors: {
13
+ relationshipType?: string;
14
+ patientId?: string;
15
+ };
16
+ onUpdateRelationship: (id: string, field: keyof RelationshipData, value: string) => void;
17
+ onPatientSearch: (id: string, value: string) => void;
18
+ onPatientSelect: (id: string, patient: PatientSuggestion | null) => void;
19
+ onRemove: (id: string) => void;
20
+ t: (key: string) => string;
21
+ }
22
+ export declare const RelationshipRow: {
23
+ ({ relationship, relationshipTypes, suggestions, errors, onUpdateRelationship, onPatientSearch, onPatientSelect, onRemove, t, }: RelationshipRowProps): {
24
+ id: string;
25
+ relationshipType: import("react/jsx-runtime").JSX.Element;
26
+ patientId: import("react/jsx-runtime").JSX.Element;
27
+ tillDate: import("react/jsx-runtime").JSX.Element;
28
+ actions: import("react/jsx-runtime").JSX.Element;
29
+ };
30
+ displayName: string;
31
+ };
32
+ export {};
33
+ //# sourceMappingURL=RelationshipRow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RelationshipRow.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/patientRelationships/RelationshipRow.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAU/D,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,oBAAoB;IAC5B,YAAY,EAAE,gBAAgB,CAAC;IAC/B,iBAAiB,EAAE,gBAAgB,EAAE,CAAC;IACtC,WAAW,EAAE,iBAAiB,EAAE,CAAC;IACjC,MAAM,EAAE;QACN,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,oBAAoB,EAAE,CACpB,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,gBAAgB,EAC7B,KAAK,EAAE,MAAM,KACV,IAAI,CAAC;IACV,eAAe,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrD,eAAe,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,GAAG,IAAI,KAAK,IAAI,CAAC;IACzE,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;CAC5B;AAED,eAAO,MAAM,eAAe;qIAUzB,oBAAoB;;;;;;;;CA+HtB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { PatientRelationships } from './PatientRelationships';
2
+ export type { PatientRelationshipsRef, RelationshipData, } from './PatientRelationships';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/patientRelationships/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,YAAY,EACV,uBAAuB,EACvB,gBAAgB,GACjB,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { PatientSuggestion } from '../../../hooks/usePatientSearch';
2
+ import { RelationshipData } from './PatientRelationships';
3
+ interface UsePatientRelationshipProps {
4
+ initialData?: RelationshipData[];
5
+ }
6
+ export declare const usePatientRelationship: ({ initialData, }: UsePatientRelationshipProps) => {
7
+ relationships: RelationshipData[];
8
+ relationshipTypes: {
9
+ uuid: string;
10
+ aIsToB: string;
11
+ bIsToA: string;
12
+ }[];
13
+ validationErrors: import('../../../hooks/useRelationshipValidation').ValidationErrors;
14
+ getPatientSuggestions: (rowId: string) => PatientSuggestion[];
15
+ updateRelationship: (id: string, field: keyof RelationshipData, value: string) => void;
16
+ handlePatientSearch: (rowId: string, searchValue: string) => void;
17
+ handlePatientSelect: (rowId: string, selectedItem: PatientSuggestion | null) => void;
18
+ addRelationship: () => void;
19
+ removeRelationship: (id: string) => void;
20
+ getData: () => RelationshipData[];
21
+ validate: () => boolean;
22
+ clearData: () => void;
23
+ removeDeletedRelationships: () => void;
24
+ };
25
+ export {};
26
+ //# sourceMappingURL=usePatientRelationship.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePatientRelationship.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/patientRelationships/usePatientRelationship.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAGzE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAS/D,UAAU,2BAA2B;IACnC,WAAW,CAAC,EAAE,gBAAgB,EAAE,CAAC;CAClC;AAED,eAAO,MAAM,sBAAsB,GAAI,kBAEpC,2BAA2B;;;;;;;;;6BAqCrB,MAAM,SAAS,MAAM,gBAAgB,SAAS,MAAM;iCAkCjD,MAAM,eAAe,MAAM;iCAO3B,MAAM,gBAAgB,iBAAiB,GAAG,IAAI;;6BA0CjD,MAAM;;;;;CAgDd,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { PatientSuggestion } from '../../../hooks/usePatientSearch';
2
+ import { RelationshipData } from './PatientRelationships';
3
+ interface UseRelationshipManagerProps {
4
+ initialData?: RelationshipData[];
5
+ }
6
+ export declare const useRelationshipManager: ({ initialData, }: UseRelationshipManagerProps) => {
7
+ relationships: RelationshipData[];
8
+ relationshipTypes: {
9
+ uuid: string;
10
+ aIsToB: string;
11
+ bIsToA: string;
12
+ }[];
13
+ validationErrors: import('../../../hooks/useRelationshipValidation').ValidationErrors;
14
+ getPatientSuggestions: (rowId: string) => PatientSuggestion[];
15
+ updateRelationship: (id: string, field: keyof RelationshipData, value: string) => void;
16
+ handlePatientSearch: (rowId: string, searchValue: string) => void;
17
+ handlePatientSelect: (rowId: string, selectedItem: PatientSuggestion | null) => void;
18
+ addRelationship: () => void;
19
+ removeRelationship: (id: string) => void;
20
+ getData: () => RelationshipData[];
21
+ validate: () => boolean;
22
+ clearData: () => void;
23
+ removeDeletedRelationships: () => void;
24
+ };
25
+ export {};
26
+ //# sourceMappingURL=useRelationshipManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useRelationshipManager.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/patientRelationships/useRelationshipManager.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAGzE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAS/D,UAAU,2BAA2B;IACnC,WAAW,CAAC,EAAE,gBAAgB,EAAE,CAAC;CAClC;AAED,eAAO,MAAM,sBAAsB,GAAI,kBAEpC,2BAA2B;;;;;;;;;6BAqCrB,MAAM,SAAS,MAAM,gBAAgB,SAAS,MAAM;iCAkCjD,MAAM,eAAe,MAAM;iCAQ3B,MAAM,gBAAgB,iBAAiB,GAAG,IAAI;;6BAiCjD,MAAM;;;;;CAgDd,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { PatientIdentifier } from '@bahmni/services';
2
+ import { BasicInfoData } from '../../../models/patient';
3
+ export interface ProfileRef {
4
+ getData: () => BasicInfoData & {
5
+ dobEstimated: boolean;
6
+ patientIdentifier: PatientIdentifier;
7
+ image?: string;
8
+ };
9
+ validate: () => boolean;
10
+ clearData: () => void;
11
+ setCustomError: (field: keyof BasicInfoData, message: string) => void;
12
+ }
13
+ interface ProfileProps {
14
+ initialData?: BasicInfoData;
15
+ initialDobEstimated?: boolean;
16
+ patientIdentifier?: string | null;
17
+ initialPhoto?: string | null | undefined;
18
+ ref?: React.Ref<ProfileRef>;
19
+ }
20
+ export declare const Profile: {
21
+ ({ initialData, initialDobEstimated, patientIdentifier, initialPhoto, ref, }: ProfileProps): import("react/jsx-runtime").JSX.Element;
22
+ displayName: string;
23
+ };
24
+ export default Profile;
25
+ //# sourceMappingURL=Profile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Profile.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/profile/Profile.tsx"],"names":[],"mappings":"AAQA,OAAO,EAIL,iBAAiB,EAClB,MAAM,kBAAkB,CAAC;AAI1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAe7D,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,aAAa,GAAG;QAC7B,YAAY,EAAE,OAAO,CAAC;QACtB,iBAAiB,EAAE,iBAAiB,CAAC;QACrC,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,QAAQ,EAAE,MAAM,OAAO,CAAC;IACxB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,aAAa,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACvE;AAED,UAAU,YAAY;IACpB,WAAW,CAAC,EAAE,aAAa,CAAC;IAC5B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACzC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;CAC7B;AAED,eAAO,MAAM,OAAO;kFAMjB,YAAY;;CAynBd,CAAC;AAIF,eAAe,OAAO,CAAC"}
@@ -0,0 +1,46 @@
1
+ import { formatToDisplay, formatToISO } from '../../../utils/ageUtils';
2
+ export interface DateErrors {
3
+ dateOfBirth: string;
4
+ }
5
+ export interface AgeErrors {
6
+ ageYears: string;
7
+ ageMonths: string;
8
+ ageDays: string;
9
+ }
10
+ interface DateAgeHandlers {
11
+ clearAllErrors: () => void;
12
+ clearAgeData: () => void;
13
+ updateFormWithAge: (date: Date) => void;
14
+ handleDateInputChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
15
+ handleDateOfBirthChange: (selectedDates: Date[]) => void;
16
+ handleAgeChange: (field: 'ageYears' | 'ageMonths' | 'ageDays', value: string) => void;
17
+ }
18
+ interface CreateDateAgeHandlersParams<T extends {
19
+ dateOfBirth: string;
20
+ ageYears: string;
21
+ ageMonths: string;
22
+ ageDays: string;
23
+ }> {
24
+ setDateErrors: React.Dispatch<React.SetStateAction<DateErrors>>;
25
+ setValidationErrors: React.Dispatch<React.SetStateAction<{
26
+ firstName: string;
27
+ lastName: string;
28
+ middleName: string;
29
+ gender: string;
30
+ dateOfBirth: string;
31
+ birthTime: string;
32
+ }>>;
33
+ setAgeErrors: React.Dispatch<React.SetStateAction<AgeErrors>>;
34
+ setFormData: React.Dispatch<React.SetStateAction<T>>;
35
+ setDobEstimated: React.Dispatch<React.SetStateAction<boolean>>;
36
+ t: (key: string) => string;
37
+ }
38
+ export declare const createDateAgeHandlers: <T extends {
39
+ dateOfBirth: string;
40
+ ageYears: string;
41
+ ageMonths: string;
42
+ ageDays: string;
43
+ }>({ setDateErrors, setValidationErrors, setAgeErrors, setFormData, setDobEstimated, t, }: CreateDateAgeHandlersParams<T>) => DateAgeHandlers;
44
+ export declare const convertTimeToISODateTime: (dateString: string, timeString: string | null) => string | null;
45
+ export { formatToDisplay, formatToISO };
46
+ //# sourceMappingURL=dateAgeUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dateAgeUtils.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/profile/dateAgeUtils.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,eAAe,EACf,WAAW,EACZ,MAAM,yBAAyB,CAAC;AAEjC,MAAM,WAAW,UAAU;IACzB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,UAAU,eAAe;IACvB,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,iBAAiB,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACxC,qBAAqB,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IACxE,uBAAuB,EAAE,CAAC,aAAa,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;IACzD,eAAe,EAAE,CACf,KAAK,EAAE,UAAU,GAAG,WAAW,GAAG,SAAS,EAC3C,KAAK,EAAE,MAAM,KACV,IAAI,CAAC;CACX;AAED,UAAU,2BAA2B,CACnC,CAAC,SAAS;IACR,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB;IAED,aAAa,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC;IAChE,mBAAmB,EAAE,KAAK,CAAC,QAAQ,CACjC,KAAK,CAAC,cAAc,CAAC;QACnB,SAAS,EAAE,MAAM,CAAC;QAClB,QAAQ,EAAE,MAAM,CAAC;QACjB,UAAU,EAAE,MAAM,CAAC;QACnB,MAAM,EAAE,MAAM,CAAC;QACf,WAAW,EAAE,MAAM,CAAC;QACpB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC,CACH,CAAC;IACF,YAAY,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC;IAC9D,WAAW,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;IACrD,eAAe,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IAC/D,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;CAC5B;AAED,eAAO,MAAM,qBAAqB,GAChC,CAAC,SAAS;IACR,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB,EACD,wFAOC,2BAA2B,CAAC,CAAC,CAAC,KAAG,eAkPnC,CAAC;AACF,eAAO,MAAM,wBAAwB,GACnC,YAAY,MAAM,EAClB,YAAY,MAAM,GAAG,IAAI,KACxB,MAAM,GAAG,IAYX,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ interface PatientPhotoUploadProps {
3
+ onPhotoConfirm: (base64Image: string) => void;
4
+ initialPhoto?: string;
5
+ }
6
+ export declare const PatientPhotoUpload: React.FC<PatientPhotoUploadProps>;
7
+ export {};
8
+ //# sourceMappingURL=PatientPhotoUpload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PatientPhotoUpload.d.ts","sourceRoot":"","sources":["../../../src/components/patientPhotoUpload/PatientPhotoUpload.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAGhE,UAAU,uBAAuB;IAC/B,cAAc,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAmBD,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAiQhE,CAAC"}
@@ -0,0 +1,16 @@
1
+ export interface RegistrationActionsProps {
2
+ extensionPointId?: string;
3
+ onBeforeNavigate?: () => Promise<string | null>;
4
+ }
5
+ /**
6
+ * Component that renders extensions based on type
7
+ * Auto-extracts URL params from route as key-value pairs
8
+ * type="startVisit": renders VisitTypeSelector
9
+ * Other types: renders Button with navigation
10
+ *
11
+ * @param onBeforeNavigate - Optional callback executed before navigation
12
+ * Parent should handle validation and save patient data
13
+ * If validation fails, parent should show error notification and throw to prevent navigation
14
+ */
15
+ export declare const RegistrationActions: ({ extensionPointId, onBeforeNavigate, }: RegistrationActionsProps) => import("react/jsx-runtime").JSX.Element | null;
16
+ //# sourceMappingURL=RegistrationActions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RegistrationActions.d.ts","sourceRoot":"","sources":["../../../src/components/registrationActions/RegistrationActions.tsx"],"names":[],"mappings":"AAYA,MAAM,WAAW,wBAAwB;IACvC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CACjD;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,mBAAmB,GAAI,yCAGjC,wBAAwB,mDAqF1B,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { RegistrationActions } from './RegistrationActions';
2
+ export type { RegistrationActionsProps } from './RegistrationActions';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/registrationActions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,YAAY,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { QueryClientConfig } from '@tanstack/react-query';
2
+ export declare const queryClientConfig: QueryClientConfig;
3
+ //# sourceMappingURL=tanstackQuery.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tanstackQuery.d.ts","sourceRoot":"","sources":["../../src/config/tanstackQuery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,eAAO,MAAM,iBAAiB,EAAE,iBAU/B,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare const REGISTRATION_NAMESPACE = "registration";
2
+ export declare const BAHMNI_REGISTRATION_SEARCH = "/bahmni-new/registration/search";
3
+ export declare const BAHMNI_REGISTRATION_PATIENT = "/registration/patient";
4
+ export declare const getPatientUrl: (patientUuid: string) => string;
5
+ export declare const getPatientUrlExternal: (patientUuid: string) => string;
6
+ //# sourceMappingURL=app.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/constants/app.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,iBAAiB,CAAC;AACrD,eAAO,MAAM,0BAA0B,oCAAoC,CAAC;AAC5E,eAAO,MAAM,2BAA2B,0BAAuC,CAAC;AAEhF,eAAO,MAAM,aAAa,GAAI,aAAa,MAAM,KAAG,MACH,CAAC;AAElD,eAAO,MAAM,qBAAqB,GAAI,aAAa,MAAM,KAAG,MACA,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { PersonAttributeType } from '@bahmni/services';
2
+ /**
3
+ * Person attributes context interface
4
+ * Provides access to person attributes with loading and error states
5
+ */
6
+ export interface PersonAttributesContextType {
7
+ personAttributes: PersonAttributeType[];
8
+ setPersonAttributes: (attributes: PersonAttributeType[]) => void;
9
+ isLoading: boolean;
10
+ setIsLoading: (isLoading: boolean) => void;
11
+ error: Error | null;
12
+ setError: (error: Error | null) => void;
13
+ refetch: () => Promise<void>;
14
+ }
15
+ export declare const PersonAttributesContext: import('react').Context<PersonAttributesContextType | undefined>;
16
+ //# sourceMappingURL=PersonAttributesContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PersonAttributesContext.d.ts","sourceRoot":"","sources":["../../src/contexts/PersonAttributesContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAGvD;;;GAGG;AACH,MAAM,WAAW,2BAA2B;IAC1C,gBAAgB,EAAE,mBAAmB,EAAE,CAAC;IACxC,mBAAmB,EAAE,CAAC,UAAU,EAAE,mBAAmB,EAAE,KAAK,IAAI,CAAC;IACjE,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,KAAK,IAAI,CAAC;IACxC,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B;AAED,eAAO,MAAM,uBAAuB,kEAExB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { RegistrationConfigContextType } from '../models/registrationConfig';
2
+ export declare const RegistrationConfigContext: import('react').Context<RegistrationConfigContextType | undefined>;
3
+ //# sourceMappingURL=RegistrationConfigContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RegistrationConfigContext.d.ts","sourceRoot":"","sources":["../../src/contexts/RegistrationConfigContext.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;AAE7E,eAAO,MAAM,yBAAyB,oEAE1B,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { IdentifierTypesResponse } from '@bahmni/services';
2
+ export declare const IDENTIFIER_TYPES_QUERY_KEY: string[];
3
+ export declare const useIdentifierTypes: () => import('@tanstack/react-query').UseQueryResult<IdentifierTypesResponse, Error>;
4
+ export declare const useAdditionalIdentifiers: () => {
5
+ shouldShowAdditionalIdentifiers: boolean;
6
+ hasAdditionalIdentifiers: boolean;
7
+ isConfigEnabled: boolean;
8
+ identifierTypes: IdentifierTypesResponse | undefined;
9
+ isLoading: boolean;
10
+ };
11
+ //# sourceMappingURL=useAdditionalIdentifiers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAdditionalIdentifiers.d.ts","sourceRoot":"","sources":["../../src/hooks/useAdditionalIdentifiers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAK/E,eAAO,MAAM,0BAA0B,UAAsB,CAAC;AAE9D,eAAO,MAAM,kBAAkB,sFAQ9B,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;;;;CA0BpC,CAAC"}
@@ -0,0 +1,46 @@
1
+ export interface AddressLevel {
2
+ addressField: string;
3
+ name: string;
4
+ required: boolean;
5
+ isStrictEntry?: boolean;
6
+ }
7
+ export interface AddressData {
8
+ [key: string]: string | null;
9
+ }
10
+ export interface AddressHierarchyConfig {
11
+ showAddressFieldsTopDown: boolean;
12
+ strictAutocompleteFromLevel?: string;
13
+ }
14
+ export interface SelectedAddressMetadata {
15
+ [fieldName: string]: {
16
+ uuid?: string;
17
+ userGeneratedId?: string;
18
+ value: string | null;
19
+ };
20
+ }
21
+ export interface AddressHierarchyItem {
22
+ name: string;
23
+ uuid?: string;
24
+ userGeneratedId?: string;
25
+ parent?: AddressHierarchyItem | undefined;
26
+ }
27
+ export declare function useAddressFields(addressLevels: AddressLevel[], config: AddressHierarchyConfig, initialAddress?: AddressData): {
28
+ address: AddressData;
29
+ selectedMetadata: SelectedAddressMetadata;
30
+ displayLevels: AddressLevel[];
31
+ levelChunks: AddressLevel[][];
32
+ levelsWithStrictEntry: {
33
+ isStrictEntry: boolean;
34
+ addressField: string;
35
+ name: string;
36
+ required: boolean;
37
+ }[];
38
+ isFieldReadOnly: (level: AddressLevel) => boolean;
39
+ handleFieldSelect: (fieldName: string, selectedItem: AddressHierarchyItem) => void;
40
+ handleFieldChange: (fieldName: string, value: string) => void;
41
+ getParentUuid: (fieldName: string) => string | undefined;
42
+ clearChildFields: (fieldName: string) => void;
43
+ resetAddress: () => void;
44
+ setAddressData: (newAddress: AddressData) => void;
45
+ };
46
+ //# sourceMappingURL=useAddressFields.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAddressFields.d.ts","sourceRoot":"","sources":["../../src/hooks/useAddressFields.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,YAAY;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,WAAW;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED,MAAM,WAAW,sBAAsB;IACrC,wBAAwB,EAAE,OAAO,CAAC;IAClC,2BAA2B,CAAC,EAAE,MAAM,CAAC;CACtC;AAED,MAAM,WAAW,uBAAuB;IACtC,CAAC,SAAS,EAAE,MAAM,GAAG;QACnB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;KACtB,CAAC;CACH;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,oBAAoB,GAAG,SAAS,CAAC;CAC3C;AAED,wBAAgB,gBAAgB,CAC9B,aAAa,EAAE,YAAY,EAAE,EAC7B,MAAM,EAAE,sBAAsB,EAC9B,cAAc,CAAC,EAAE,WAAW;;;;;;;sBAjCd,MAAM;cACd,MAAM;kBACF,OAAO;;6BAiHP,YAAY,KAAG,OAAO;mCA0DlB,MAAM,gBAAgB,oBAAoB;mCAgD1C,MAAM,SAAS,MAAM;+BAarB,MAAM,KAAG,MAAM,GAAG,SAAS;kCAxF3B,MAAM;;iCAuG4B,WAAW;EAoB5D"}
@@ -0,0 +1,32 @@
1
+ import { AddressLevel, AddressData } from './useAddressFields';
2
+ export declare function useAddressFieldsWithConfig(initialAddress?: AddressData): {
3
+ isLoadingLevels: boolean;
4
+ isErrorLevels: boolean;
5
+ levelsError: Error | null;
6
+ addressLevelsFromApi: import('@bahmni/services').OrderedAddressHierarchyLevels | undefined;
7
+ getTranslationKey: (addressField: string) => string | null;
8
+ address: AddressData;
9
+ selectedMetadata: import('./useAddressFields').SelectedAddressMetadata;
10
+ displayLevels: AddressLevel[];
11
+ levelChunks: AddressLevel[][];
12
+ levelsWithStrictEntry: {
13
+ isStrictEntry: boolean;
14
+ addressField: string;
15
+ name: string;
16
+ required: boolean;
17
+ }[];
18
+ isFieldReadOnly: (level: AddressLevel) => boolean;
19
+ handleFieldSelect: (fieldName: string, selectedItem: import('./useAddressFields').AddressHierarchyItem) => void;
20
+ handleFieldChange: (fieldName: string, value: string) => void;
21
+ getParentUuid: (fieldName: string) => string | undefined;
22
+ clearChildFields: (fieldName: string) => void;
23
+ resetAddress: () => void;
24
+ setAddressData: (newAddress: AddressData) => void;
25
+ };
26
+ export declare function useAddressHierarchyLevels(): {
27
+ addressLevels: import('@bahmni/services').OrderedAddressHierarchyLevels;
28
+ isLoading: boolean;
29
+ isError: boolean;
30
+ error: Error | null;
31
+ };
32
+ //# sourceMappingURL=useAddressFieldsWithConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAddressFieldsWithConfig.d.ts","sourceRoot":"","sources":["../../src/hooks/useAddressFieldsWithConfig.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,YAAY,EAEjB,KAAK,WAAW,EACjB,MAAM,oBAAoB,CAAC;AAG5B,wBAAgB,0BAA0B,CAAC,cAAc,CAAC,EAAE,WAAW;;;;;sCAgE7C,MAAM,KAAG,MAAM,GAAG,IAAI;;;;;;;;;;;;;;;;;;EAqB/C;AAED,wBAAgB,yBAAyB;;;;;EAoBxC"}