@bahmni/clinical-app 0.0.1-dev.8

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 (177) hide show
  1. package/LICENSE +9 -0
  2. package/README.md +5 -0
  3. package/dist/App.d.ts +4 -0
  4. package/dist/App.d.ts.map +1 -0
  5. package/dist/LNWAZHJI-IcKCxIDY.js +33 -0
  6. package/dist/MWZ6AO7Z-DmHGik42.js +42 -0
  7. package/dist/YPM2AS64-BtpRbtzS.js +9159 -0
  8. package/dist/__mocks__/configMocks.d.ts +54 -0
  9. package/dist/__mocks__/configMocks.d.ts.map +1 -0
  10. package/dist/__mocks__/consultationPadMocks.d.ts +67 -0
  11. package/dist/__mocks__/consultationPadMocks.d.ts.map +1 -0
  12. package/dist/components/consultationPad/ConsultationPad.d.ts +7 -0
  13. package/dist/components/consultationPad/ConsultationPad.d.ts.map +1 -0
  14. package/dist/components/dashboardContainer/DashboardContainer.d.ts +15 -0
  15. package/dist/components/dashboardContainer/DashboardContainer.d.ts.map +1 -0
  16. package/dist/components/dashboardSection/DashboardSection.d.ts +15 -0
  17. package/dist/components/dashboardSection/DashboardSection.d.ts.map +1 -0
  18. package/dist/components/forms/allergies/AllergiesForm.d.ts +10 -0
  19. package/dist/components/forms/allergies/AllergiesForm.d.ts.map +1 -0
  20. package/dist/components/forms/allergies/SelectedAllergyItem.d.ts +27 -0
  21. package/dist/components/forms/allergies/SelectedAllergyItem.d.ts.map +1 -0
  22. package/dist/components/forms/conditionsAndDiagnoses/ConditionsAndDiagnoses.d.ts +10 -0
  23. package/dist/components/forms/conditionsAndDiagnoses/ConditionsAndDiagnoses.d.ts.map +1 -0
  24. package/dist/components/forms/conditionsAndDiagnoses/SelectedConditionItem.d.ts +9 -0
  25. package/dist/components/forms/conditionsAndDiagnoses/SelectedConditionItem.d.ts.map +1 -0
  26. package/dist/components/forms/conditionsAndDiagnoses/SelectedDiagnosisItem.d.ts +17 -0
  27. package/dist/components/forms/conditionsAndDiagnoses/SelectedDiagnosisItem.d.ts.map +1 -0
  28. package/dist/components/forms/encounterDetails/EncounterDetails.d.ts +4 -0
  29. package/dist/components/forms/encounterDetails/EncounterDetails.d.ts.map +1 -0
  30. package/dist/components/forms/investigations/InvestigationsForm.d.ts +4 -0
  31. package/dist/components/forms/investigations/InvestigationsForm.d.ts.map +1 -0
  32. package/dist/components/forms/investigations/SelectedInvestigationItem.d.ts +9 -0
  33. package/dist/components/forms/investigations/SelectedInvestigationItem.d.ts.map +1 -0
  34. package/dist/components/forms/medications/MedicationsForm.d.ts +10 -0
  35. package/dist/components/forms/medications/MedicationsForm.d.ts.map +1 -0
  36. package/dist/components/forms/medications/SelectedMedicationItem.d.ts +23 -0
  37. package/dist/components/forms/medications/SelectedMedicationItem.d.ts.map +1 -0
  38. package/dist/components/forms/observationForms/ObservationForms.d.ts +27 -0
  39. package/dist/components/forms/observationForms/ObservationForms.d.ts.map +1 -0
  40. package/dist/components/forms/observationForms/ObservationFormsContainer.d.ts +22 -0
  41. package/dist/components/forms/observationForms/ObservationFormsContainer.d.ts.map +1 -0
  42. package/dist/components/forms/observationForms/utils/privilegeUtils.d.ts +16 -0
  43. package/dist/components/forms/observationForms/utils/privilegeUtils.d.ts.map +1 -0
  44. package/dist/components/patientHeader/ConsultationActionButton.d.ts +15 -0
  45. package/dist/components/patientHeader/ConsultationActionButton.d.ts.map +1 -0
  46. package/dist/components/patientHeader/PatientHeader.d.ts +16 -0
  47. package/dist/components/patientHeader/PatientHeader.d.ts.map +1 -0
  48. package/dist/config/tanstackQuery.d.ts +3 -0
  49. package/dist/config/tanstackQuery.d.ts.map +1 -0
  50. package/dist/constants/allergy.d.ts +9 -0
  51. package/dist/constants/allergy.d.ts.map +1 -0
  52. package/dist/constants/app.d.ts +12 -0
  53. package/dist/constants/app.d.ts.map +1 -0
  54. package/dist/constants/conditions.d.ts +5 -0
  55. package/dist/constants/conditions.d.ts.map +1 -0
  56. package/dist/constants/diagnosis.d.ts +3 -0
  57. package/dist/constants/diagnosis.d.ts.map +1 -0
  58. package/dist/constants/errors.d.ts +30 -0
  59. package/dist/constants/errors.d.ts.map +1 -0
  60. package/dist/constants/fhir.d.ts +4 -0
  61. package/dist/constants/fhir.d.ts.map +1 -0
  62. package/dist/constants/forms.d.ts +4 -0
  63. package/dist/constants/forms.d.ts.map +1 -0
  64. package/dist/constants/medications.d.ts +3 -0
  65. package/dist/constants/medications.d.ts.map +1 -0
  66. package/dist/contexts/ClinicalConfigContext.d.ts +3 -0
  67. package/dist/contexts/ClinicalConfigContext.d.ts.map +1 -0
  68. package/dist/contexts/models.d.ts +14 -0
  69. package/dist/contexts/models.d.ts.map +1 -0
  70. package/dist/hooks/__tests__/__mocks__/encounterMocks.d.ts +182 -0
  71. package/dist/hooks/__tests__/__mocks__/encounterMocks.d.ts.map +1 -0
  72. package/dist/hooks/useActiveVisit.d.ts +15 -0
  73. package/dist/hooks/useActiveVisit.d.ts.map +1 -0
  74. package/dist/hooks/useAllergenSearch.d.ts +18 -0
  75. package/dist/hooks/useAllergenSearch.d.ts.map +1 -0
  76. package/dist/hooks/useClinicalConfig.d.ts +7 -0
  77. package/dist/hooks/useClinicalConfig.d.ts.map +1 -0
  78. package/dist/hooks/useConceptSearch.d.ts +21 -0
  79. package/dist/hooks/useConceptSearch.d.ts.map +1 -0
  80. package/dist/hooks/useDashboardConfig.d.ts +15 -0
  81. package/dist/hooks/useDashboardConfig.d.ts.map +1 -0
  82. package/dist/hooks/useDebounce.d.ts +20 -0
  83. package/dist/hooks/useDebounce.d.ts.map +1 -0
  84. package/dist/hooks/useEncounterConcepts.d.ts +14 -0
  85. package/dist/hooks/useEncounterConcepts.d.ts.map +1 -0
  86. package/dist/hooks/useEncounterSession.d.ts +18 -0
  87. package/dist/hooks/useEncounterSession.d.ts.map +1 -0
  88. package/dist/hooks/useInvestigationsSearch.d.ts +9 -0
  89. package/dist/hooks/useInvestigationsSearch.d.ts.map +1 -0
  90. package/dist/hooks/useLocations.d.ts +14 -0
  91. package/dist/hooks/useLocations.d.ts.map +1 -0
  92. package/dist/hooks/useMedicationConfig.d.ts +9 -0
  93. package/dist/hooks/useMedicationConfig.d.ts.map +1 -0
  94. package/dist/hooks/useMedicationSearch.d.ts +9 -0
  95. package/dist/hooks/useMedicationSearch.d.ts.map +1 -0
  96. package/dist/hooks/useObservationFormsSearch.d.ts +16 -0
  97. package/dist/hooks/useObservationFormsSearch.d.ts.map +1 -0
  98. package/dist/hooks/usePinnedObservationForms.d.ts +11 -0
  99. package/dist/hooks/usePinnedObservationForms.d.ts.map +1 -0
  100. package/dist/index-DBsl0VOM.js +164739 -0
  101. package/dist/index.css +1 -0
  102. package/dist/index.d.ts +3 -0
  103. package/dist/index.d.ts.map +1 -0
  104. package/dist/index.js +4 -0
  105. package/dist/locales/locale_en.json +243 -0
  106. package/dist/locales/locale_es.json +243 -0
  107. package/dist/models/allergy.d.ts +25 -0
  108. package/dist/models/allergy.d.ts.map +1 -0
  109. package/dist/models/concepts.d.ts +11 -0
  110. package/dist/models/concepts.d.ts.map +1 -0
  111. package/dist/models/condition.d.ts +13 -0
  112. package/dist/models/condition.d.ts.map +1 -0
  113. package/dist/models/consultationBundle.d.ts +8 -0
  114. package/dist/models/consultationBundle.d.ts.map +1 -0
  115. package/dist/models/encounter.d.ts +78 -0
  116. package/dist/models/encounter.d.ts.map +1 -0
  117. package/dist/models/encounterConcepts.d.ts +17 -0
  118. package/dist/models/encounterConcepts.d.ts.map +1 -0
  119. package/dist/models/investigations.d.ts +8 -0
  120. package/dist/models/investigations.d.ts.map +1 -0
  121. package/dist/models/location.d.ts +23 -0
  122. package/dist/models/location.d.ts.map +1 -0
  123. package/dist/models/medication.d.ts +43 -0
  124. package/dist/models/medication.d.ts.map +1 -0
  125. package/dist/models/medicationConfig.d.ts +41 -0
  126. package/dist/models/medicationConfig.d.ts.map +1 -0
  127. package/dist/models/observationForms.d.ts +22 -0
  128. package/dist/models/observationForms.d.ts.map +1 -0
  129. package/dist/models/serviceRequest.d.ts +7 -0
  130. package/dist/models/serviceRequest.d.ts.map +1 -0
  131. package/dist/pages/ConsultationPage.d.ts +13 -0
  132. package/dist/pages/ConsultationPage.d.ts.map +1 -0
  133. package/dist/providers/ClinicalConfigProvider.d.ts +7 -0
  134. package/dist/providers/ClinicalConfigProvider.d.ts.map +1 -0
  135. package/dist/services/consultationBundleService.d.ts +83 -0
  136. package/dist/services/consultationBundleService.d.ts.map +1 -0
  137. package/dist/services/consultationPageService.d.ts +15 -0
  138. package/dist/services/consultationPageService.d.ts.map +1 -0
  139. package/dist/services/encounterConceptsService.d.ts +8 -0
  140. package/dist/services/encounterConceptsService.d.ts.map +1 -0
  141. package/dist/services/locationService.d.ts +8 -0
  142. package/dist/services/locationService.d.ts.map +1 -0
  143. package/dist/services/medicationService.d.ts +6 -0
  144. package/dist/services/medicationService.d.ts.map +1 -0
  145. package/dist/services/medicationsValueCalculator.d.ts +9 -0
  146. package/dist/services/medicationsValueCalculator.d.ts.map +1 -0
  147. package/dist/services/pinnedFormsService.d.ts +11 -0
  148. package/dist/services/pinnedFormsService.d.ts.map +1 -0
  149. package/dist/stores/allergyStore.d.ts +16 -0
  150. package/dist/stores/allergyStore.d.ts.map +1 -0
  151. package/dist/stores/conditionsAndDiagnosesStore.d.ts +60 -0
  152. package/dist/stores/conditionsAndDiagnosesStore.d.ts.map +1 -0
  153. package/dist/stores/encounterDetailsStore.d.ts +35 -0
  154. package/dist/stores/encounterDetailsStore.d.ts.map +1 -0
  155. package/dist/stores/medicationsStore.d.ts +27 -0
  156. package/dist/stores/medicationsStore.d.ts.map +1 -0
  157. package/dist/stores/serviceRequestStore.d.ts +12 -0
  158. package/dist/stores/serviceRequestStore.d.ts.map +1 -0
  159. package/dist/utils/allergy.d.ts +8 -0
  160. package/dist/utils/allergy.d.ts.map +1 -0
  161. package/dist/utils/fhir/allergyResourceCreator.d.ts +19 -0
  162. package/dist/utils/fhir/allergyResourceCreator.d.ts.map +1 -0
  163. package/dist/utils/fhir/codeableConceptCreator.d.ts +4 -0
  164. package/dist/utils/fhir/codeableConceptCreator.d.ts.map +1 -0
  165. package/dist/utils/fhir/conditionResourceCreator.d.ts +15 -0
  166. package/dist/utils/fhir/conditionResourceCreator.d.ts.map +1 -0
  167. package/dist/utils/fhir/consultationBundleCreator.d.ts +5 -0
  168. package/dist/utils/fhir/consultationBundleCreator.d.ts.map +1 -0
  169. package/dist/utils/fhir/encounterResourceCreator.d.ts +3 -0
  170. package/dist/utils/fhir/encounterResourceCreator.d.ts.map +1 -0
  171. package/dist/utils/fhir/medicationRequestResourceCreator.d.ts +21 -0
  172. package/dist/utils/fhir/medicationRequestResourceCreator.d.ts.map +1 -0
  173. package/dist/utils/fhir/referenceCreator.d.ts +16 -0
  174. package/dist/utils/fhir/referenceCreator.d.ts.map +1 -0
  175. package/dist/utils/fhir/serviceRequestResourceCreator.d.ts +13 -0
  176. package/dist/utils/fhir/serviceRequestResourceCreator.d.ts.map +1 -0
  177. package/package.json +26 -0
@@ -0,0 +1,78 @@
1
+ export interface FhirEncounterPeriod {
2
+ start: string;
3
+ end?: string;
4
+ }
5
+ export interface FhirEncounterTypeCode {
6
+ system: string;
7
+ code: string;
8
+ display: string;
9
+ }
10
+ export interface FhirEncounterType {
11
+ coding: FhirEncounterTypeCode[];
12
+ }
13
+ export interface FhirEncounterLocation {
14
+ location: {
15
+ reference: string;
16
+ type: string;
17
+ display: string;
18
+ };
19
+ }
20
+ export interface FhirEncounterParticipant {
21
+ individual?: {
22
+ reference: string;
23
+ type: string;
24
+ identifier?: {
25
+ value: string;
26
+ };
27
+ display: string;
28
+ };
29
+ }
30
+ export interface FhirEncounter {
31
+ resourceType: string;
32
+ id: string;
33
+ meta: {
34
+ versionId: string;
35
+ lastUpdated: string;
36
+ tag: Array<{
37
+ system: string;
38
+ code: string;
39
+ display: string;
40
+ }>;
41
+ };
42
+ status: string;
43
+ class: {
44
+ system: string;
45
+ code: string;
46
+ };
47
+ type: FhirEncounterType[];
48
+ subject: {
49
+ reference: string;
50
+ type: string;
51
+ display: string;
52
+ };
53
+ participant?: FhirEncounterParticipant[];
54
+ period: FhirEncounterPeriod;
55
+ location: FhirEncounterLocation[];
56
+ partOf?: {
57
+ reference: string;
58
+ type: string;
59
+ };
60
+ }
61
+ export interface FhirEncounterBundle {
62
+ resourceType: string;
63
+ id: string;
64
+ meta: {
65
+ lastUpdated: string;
66
+ };
67
+ type: string;
68
+ total: number;
69
+ link: Array<{
70
+ relation: string;
71
+ url: string;
72
+ }>;
73
+ entry: Array<{
74
+ fullUrl: string;
75
+ resource: FhirEncounter;
76
+ }>;
77
+ }
78
+ //# sourceMappingURL=encounter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"encounter.d.ts","sourceRoot":"","sources":["../../src/models/encounter.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,qBAAqB,EAAE,CAAC;CACjC;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE;QACR,SAAS,EAAE,MAAM,CAAC;QAClB,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH;AAED,MAAM,WAAW,wBAAwB;IACvC,UAAU,CAAC,EAAE;QACX,SAAS,EAAE,MAAM,CAAC;QAClB,IAAI,EAAE,MAAM,CAAC;QACb,UAAU,CAAC,EAAE;YACX,KAAK,EAAE,MAAM,CAAC;SACf,CAAC;QACF,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH;AAED,MAAM,WAAW,aAAa;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,EAAE,EAAE,MAAM,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 visitTypes: Record<string, string>;
7
+ encounterTypes: Record<string, string>;
8
+ orderTypes: Record<string, string>;
9
+ conceptData: Record<string, unknown>;
10
+ }
11
+ export interface EncounterConcepts {
12
+ visitTypes: Concept[];
13
+ encounterTypes: Concept[];
14
+ orderTypes: Concept[];
15
+ conceptData: Concept[];
16
+ }
17
+ //# sourceMappingURL=encounterConcepts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"encounterConcepts.d.ts","sourceRoot":"","sources":["../../src/models/encounterConcepts.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AACD,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAED,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,OAAO,EAAE,CAAC;IACtB,cAAc,EAAE,OAAO,EAAE,CAAC;IAC1B,UAAU,EAAE,OAAO,EAAE,CAAC;IACtB,WAAW,EAAE,OAAO,EAAE,CAAC;CACxB"}
@@ -0,0 +1,8 @@
1
+ export interface FlattenedInvestigations {
2
+ code: string;
3
+ display: string;
4
+ category: string;
5
+ categoryCode: string;
6
+ disabled?: boolean;
7
+ }
8
+ //# sourceMappingURL=investigations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"investigations.d.ts","sourceRoot":"","sources":["../../src/models/investigations.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Interface for a link within a location
3
+ */
4
+ export interface LocationLink {
5
+ rel: string;
6
+ uri: string;
7
+ resourceAlias: string;
8
+ }
9
+ /**
10
+ * Interface for a single location item
11
+ */
12
+ export interface OpenMRSLocation {
13
+ uuid: string;
14
+ display: string;
15
+ links: LocationLink[];
16
+ }
17
+ /**
18
+ * Interface for the full locations response
19
+ */
20
+ export interface OpenMRSLocationResponse {
21
+ results: OpenMRSLocation[];
22
+ }
23
+ //# sourceMappingURL=location.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"location.d.ts","sourceRoot":"","sources":["../../src/models/location.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,YAAY,EAAE,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,eAAe,EAAE,CAAC;CAC5B"}
@@ -0,0 +1,43 @@
1
+ import { Frequency } from '@bahmni/services';
2
+ import { Medication } from 'fhir/r4';
3
+ import { Concept } from './encounterConcepts';
4
+ export interface MedicationFilterResult {
5
+ displayName: string;
6
+ medication?: Medication;
7
+ disabled: boolean;
8
+ }
9
+ export interface MedicationInputEntry {
10
+ id: string;
11
+ medication: Medication;
12
+ display: string;
13
+ dosage: number;
14
+ dosageUnit: Concept | null;
15
+ frequency: Frequency | null;
16
+ instruction: Concept | null;
17
+ route: Concept | null;
18
+ duration: number;
19
+ durationUnit: DurationUnitOption | null;
20
+ isSTAT: boolean;
21
+ isPRN: boolean;
22
+ startDate?: Date;
23
+ dispenseQuantity: number;
24
+ dispenseUnit: Concept | null;
25
+ errors: {
26
+ dosage?: string;
27
+ dosageUnit?: string;
28
+ frequency?: string;
29
+ route?: string;
30
+ duration?: string;
31
+ durationUnit?: string;
32
+ startDate?: string;
33
+ dispenseQuantity?: string;
34
+ dispenseUnit?: string;
35
+ };
36
+ hasBeenValidated: boolean;
37
+ }
38
+ export interface DurationUnitOption {
39
+ code: 'a' | 's' | 'min' | 'd' | 'mo' | 'h' | 'wk' | undefined;
40
+ display: string;
41
+ daysMultiplier: number;
42
+ }
43
+ //# sourceMappingURL=medication.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"medication.d.ts","sourceRoot":"","sources":["../../src/models/medication.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,UAAU,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAGhB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,OAAO,GAAG,IAAI,CAAC;IAG3B,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC;IAC5B,WAAW,EAAE,OAAO,GAAG,IAAI,CAAC;IAG5B,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAGxC,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC;IAEf,SAAS,CAAC,EAAE,IAAI,CAAC;IAEjB,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,OAAO,GAAG,IAAI,CAAC;IAG7B,MAAM,EAAE;QACN,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,CAAC;IACF,gBAAgB,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,GAAG,GAAG,GAAG,GAAG,KAAK,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,GAAG,SAAS,CAAC;IAC9D,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;CACxB"}
@@ -0,0 +1,41 @@
1
+ interface Concept {
2
+ uuid: string;
3
+ name: string;
4
+ }
5
+ export interface MedicationConfig extends MedicationOrdersMetadataResponse, MedicationJSONConfig {
6
+ }
7
+ export interface DrugFormDefault {
8
+ doseUnits?: string;
9
+ route?: string;
10
+ }
11
+ export interface MedicationJSONConfig {
12
+ defaultDurationUnit?: string;
13
+ defaultInstructions?: string;
14
+ drugFormDefaults?: Record<string, DrugFormDefault>;
15
+ }
16
+ export interface Frequency extends Concept {
17
+ frequencyPerDay: number;
18
+ }
19
+ export interface OrderAttribute {
20
+ uuid: string;
21
+ name: string;
22
+ dataType: string;
23
+ shortName: string;
24
+ units: string | null;
25
+ conceptClass: string;
26
+ hiNormal: string | null;
27
+ lowNormal: string | null;
28
+ set: boolean;
29
+ }
30
+ export interface MedicationOrdersMetadataResponse {
31
+ doseUnits: Concept[];
32
+ routes: Concept[];
33
+ durationUnits: Concept[];
34
+ dispensingUnits: Concept[];
35
+ dosingRules: string[];
36
+ dosingInstructions: Concept[];
37
+ orderAttributes: OrderAttribute[];
38
+ frequencies: Frequency[];
39
+ }
40
+ export {};
41
+ //# sourceMappingURL=medicationConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"medicationConfig.d.ts","sourceRoot":"","sources":["../../src/models/medicationConfig.ts"],"names":[],"mappings":"AAAA,UAAU,OAAO;IACf,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,gBACf,SAAQ,gCAAgC,EACtC,oBAAoB;CAAG;AAE3B,MAAM,WAAW,eAAe;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,oBAAoB;IACnC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;CACpD;AAED,MAAM,WAAW,SAAU,SAAQ,OAAO;IACxC,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,GAAG,EAAE,OAAO,CAAC;CACd;AAED,MAAM,WAAW,gCAAgC;IAC/C,SAAS,EAAE,OAAO,EAAE,CAAC;IACrB,MAAM,EAAE,OAAO,EAAE,CAAC;IAClB,aAAa,EAAE,OAAO,EAAE,CAAC;IACzB,eAAe,EAAE,OAAO,EAAE,CAAC;IAC3B,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,kBAAkB,EAAE,OAAO,EAAE,CAAC;IAC9B,eAAe,EAAE,cAAc,EAAE,CAAC;IAClC,WAAW,EAAE,SAAS,EAAE,CAAC;CAC1B"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * User properties for pinned forms service
3
+ */
4
+ export interface UserProperties {
5
+ defaultLocale?: string;
6
+ favouriteObsTemplates?: string;
7
+ pinnedObsTemplates?: string;
8
+ favouriteWards?: string;
9
+ loginAttempts?: string;
10
+ recentlyViewedPatients?: string;
11
+ [key: string]: unknown;
12
+ }
13
+ /**
14
+ * User data for pinned forms service
15
+ */
16
+ export interface UserData {
17
+ uuid: string;
18
+ username: string;
19
+ userProperties?: UserProperties;
20
+ [key: string]: unknown;
21
+ }
22
+ //# sourceMappingURL=observationForms.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"observationForms.d.ts","sourceRoot":"","sources":["../../src/models/observationForms.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB"}
@@ -0,0 +1,7 @@
1
+ export interface ServiceRequestInputEntry {
2
+ id: string;
3
+ display: string;
4
+ selectedPriority?: SupportedServiceRequestPriority;
5
+ }
6
+ export type SupportedServiceRequestPriority = 'routine' | 'stat';
7
+ //# sourceMappingURL=serviceRequest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serviceRequest.d.ts","sourceRoot":"","sources":["../../src/models/serviceRequest.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,+BAA+B,CAAC;CACpD;AAED,MAAM,MAAM,+BAA+B,GAAG,SAAS,GAAG,MAAM,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { default as React } from 'react';
2
+ /**
3
+ * ConsultationPage
4
+ *
5
+ * Main clinical consultation interface that displays patient information and clinical dashboard.
6
+ * Integrates clinical layout with patient details, sidebar navigation, and dashboard content.
7
+ * Dynamically loads dashboard configuration and handles navigation between different sections.
8
+ *
9
+ * @returns React component with clinical consultation interface
10
+ */
11
+ declare const ConsultationPage: React.FC;
12
+ export default ConsultationPage;
13
+ //# sourceMappingURL=ConsultationPage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConsultationPage.d.ts","sourceRoot":"","sources":["../../src/pages/ConsultationPage.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAsC,MAAM,OAAO,CAAC;AA6C3D;;;;;;;;GAQG;AACH,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAoF7B,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { default as React, ReactNode } from 'react';
2
+ interface ClinicalConfigProviderProps {
3
+ children: ReactNode;
4
+ }
5
+ export declare const ClinicalConfigProvider: React.FC<ClinicalConfigProviderProps>;
6
+ export {};
7
+ //# sourceMappingURL=ClinicalConfigProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClinicalConfigProvider.d.ts","sourceRoot":"","sources":["../../src/providers/ClinicalConfigProvider.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAgC,MAAM,OAAO,CAAC;AAGvE,UAAU,2BAA2B;IACnC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CA4CxE,CAAC"}
@@ -0,0 +1,83 @@
1
+ import { ConditionInputEntry, DiagnosisInputEntry } from '@bahmni/services';
2
+ import { BundleEntry, Reference, Encounter } from 'fhir/r4';
3
+ import { AllergyInputEntry } from '../models/allergy';
4
+ import { ConsultationBundle } from '../models/consultationBundle';
5
+ import { MedicationInputEntry } from '../models/medication';
6
+ import { ServiceRequestInputEntry } from '../models/serviceRequest';
7
+ interface CreateAllergiesBundleEntriesParams {
8
+ selectedAllergies: AllergyInputEntry[];
9
+ encounterSubject: Reference;
10
+ encounterReference: string;
11
+ practitionerUUID: string;
12
+ }
13
+ interface CreateDiagnosisBundleEntriesParams {
14
+ selectedDiagnoses: DiagnosisInputEntry[];
15
+ encounterSubject: Reference;
16
+ encounterReference: string;
17
+ practitionerUUID: string;
18
+ consultationDate: Date;
19
+ }
20
+ interface CreateServiceRequestBundleEntriesParams {
21
+ selectedServiceRequests: Map<string, ServiceRequestInputEntry[]>;
22
+ encounterSubject: Reference;
23
+ encounterReference: string;
24
+ practitionerUUID: string;
25
+ }
26
+ interface CreateConditionsBundleEntriesParams {
27
+ selectedConditions: ConditionInputEntry[];
28
+ encounterSubject: Reference;
29
+ encounterReference: string;
30
+ practitionerUUID: string;
31
+ consultationDate: Date;
32
+ }
33
+ interface CreateMedicationRequestBundleEntriesParams {
34
+ selectedMedications: MedicationInputEntry[];
35
+ encounterSubject: Reference;
36
+ encounterReference: string;
37
+ practitionerUUID: string;
38
+ }
39
+ /**
40
+ * Creates bundle entries for diagnoses as part of consultation bundle
41
+ * @param params - Parameters required for creating diagnosis bundle entries
42
+ * @returns Array of BundleEntry for diagnoses
43
+ * @throws Error with specific message key for translation
44
+ */
45
+ export declare function createDiagnosisBundleEntries({ selectedDiagnoses, encounterSubject, encounterReference, practitionerUUID, consultationDate, }: CreateDiagnosisBundleEntriesParams): BundleEntry[];
46
+ /**
47
+ * Posts a consultation bundle to the FHIR R4 endpoint
48
+ * @param consultationBundle - The consultation bundle payload
49
+ * @returns Promise resolving to the response data
50
+ */
51
+ /**
52
+ * Creates bundle entries for allergies as part of consultation bundle
53
+ * @param params - Parameters required for creating allergy bundle entries
54
+ * @returns Array of BundleEntry for allergies
55
+ * @throws Error with specific message key for translation
56
+ */
57
+ export declare function createAllergiesBundleEntries({ selectedAllergies, encounterSubject, encounterReference, practitionerUUID, }: CreateAllergiesBundleEntriesParams): BundleEntry[];
58
+ export declare function createServiceRequestBundleEntries({ selectedServiceRequests, encounterSubject, encounterReference, practitionerUUID, }: CreateServiceRequestBundleEntriesParams): BundleEntry[];
59
+ /**
60
+ * Creates bundle entries for conditions as part of consultation bundle
61
+ * @param params - Parameters required for creating condition bundle entries
62
+ * @returns Array of BundleEntry for conditions
63
+ * @throws Error with specific message key for translation
64
+ */
65
+ export declare function createConditionsBundleEntries({ selectedConditions, encounterSubject, encounterReference, practitionerUUID, consultationDate, }: CreateConditionsBundleEntriesParams): BundleEntry[];
66
+ export declare function createMedicationRequestEntries({ selectedMedications, encounterSubject, encounterReference, practitionerUUID, }: CreateMedicationRequestBundleEntriesParams): BundleEntry[];
67
+ /**
68
+ * Creates an encounter bundle entry that can handle both new (POST) and existing (PUT) encounters
69
+ * @param activeEncounter - Existing encounter if editing, null if creating new
70
+ * @param encounterResource - The encounter resource to include in bundle
71
+ * @returns BundleEntry for the encounter
72
+ */
73
+ export declare function createEncounterBundleEntry(activeEncounter: Encounter | null, encounterResource: Encounter): BundleEntry;
74
+ /**
75
+ * Gets the appropriate encounter reference for other resources
76
+ * @param activeEncounter - Existing encounter if editing, null if creating new
77
+ * @param placeholderReference - Placeholder reference for new encounters
78
+ * @returns Reference string to use in other resources
79
+ */
80
+ export declare function getEncounterReference(activeEncounter: Encounter | null, placeholderReference: string): string;
81
+ export declare function postConsultationBundle<T>(consultationBundle: ConsultationBundle): Promise<T>;
82
+ export {};
83
+ //# sourceMappingURL=consultationBundleService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consultationBundleService.d.ts","sourceRoot":"","sources":["../../src/services/consultationBundleService.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EAGpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAG5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAcpE,UAAU,kCAAkC;IAC1C,iBAAiB,EAAE,iBAAiB,EAAE,CAAC;IACvC,gBAAgB,EAAE,SAAS,CAAC;IAC5B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,UAAU,kCAAkC;IAC1C,iBAAiB,EAAE,mBAAmB,EAAE,CAAC;IACzC,gBAAgB,EAAE,SAAS,CAAC;IAC5B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,IAAI,CAAC;CACxB;AAED,UAAU,uCAAuC;IAC/C,uBAAuB,EAAE,GAAG,CAAC,MAAM,EAAE,wBAAwB,EAAE,CAAC,CAAC;IACjE,gBAAgB,EAAE,SAAS,CAAC;IAC5B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,UAAU,mCAAmC;IAC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;GAKG;AACH,wBAAgB,qBAAqB,CACnC,eAAe,EAAE,SAAS,GAAG,IAAI,EACjC,oBAAoB,EAAE,MAAM,GAC3B,MAAM,CAIR;AAED,wBAAsB,sBAAsB,CAAC,CAAC,EAC5C,kBAAkB,EAAE,kBAAkB,GACrC,OAAO,CAAC,CAAC,CAAC,CAEZ"}
@@ -0,0 +1,15 @@
1
+ import { HeaderSideNavItem } from '@bahmni/design-system';
2
+ import { Dashboard, DashboardConfig } from '@bahmni/services';
3
+ /**
4
+ * Gets the default dashboard from an array of dashboards
5
+ * @param dashboards Array of dashboard configurations
6
+ * @returns The default dashboard or null if none is found
7
+ */
8
+ export declare const getDefaultDashboard: (dashboards: Dashboard[]) => Dashboard | null;
9
+ /**
10
+ * Converts dashboard sections to sidebar items
11
+ * @param dashboardConfig The dashboard configuration containing sections
12
+ * @returns Array of sidebar items
13
+ */
14
+ export declare const getSidebarItems: (dashboardConfig: DashboardConfig, t: (key: string) => string) => HeaderSideNavItem[];
15
+ //# sourceMappingURL=consultationPageService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consultationPageService.d.ts","sourceRoot":"","sources":["../../src/services/consultationPageService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAE9D;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAC9B,YAAY,SAAS,EAAE,KACtB,SAAS,GAAG,IAkBd,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAC1B,iBAAiB,eAAe,EAChC,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,KACzB,iBAAiB,EAOnB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { EncounterConcepts } from '../models/encounterConcepts';
2
+ /**
3
+ * Fetches encounter concepts from the OpenMRS API and transforms the response
4
+ * @returns Promise resolving to EncounterConcepts containing arrays of Concept objects
5
+ * @throws Error when the response has an unexpected structure or format
6
+ */
7
+ export declare function getEncounterConcepts(): Promise<EncounterConcepts>;
8
+ //# sourceMappingURL=encounterConceptsService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"encounterConceptsService.d.ts","sourceRoot":"","sources":["../../src/services/encounterConceptsService.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,iBAAiB,EAElB,MAAM,6BAA6B,CAAC;AAcrC;;;;GAIG;AACH,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,iBAAiB,CAAC,CA2BvE"}
@@ -0,0 +1,8 @@
1
+ import { OpenMRSLocation } from '../models/location';
2
+ /**
3
+ * Fetches just the current location from bahmni.user.location cookie
4
+ * @returns Promise resolving to an array of OpenMRSLocation objects
5
+ * @throws Error if cookie is not found
6
+ */
7
+ export declare function getLocations(): Promise<OpenMRSLocation[]>;
8
+ //# sourceMappingURL=locationService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locationService.d.ts","sourceRoot":"","sources":["../../src/services/locationService.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD;;;;GAIG;AACH,wBAAsB,YAAY,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC,CA0B/D"}
@@ -0,0 +1,6 @@
1
+ import { Bundle, Medication } from 'fhir/r4';
2
+ import { MedicationOrdersMetadataResponse } from '../models/medicationConfig';
3
+ export declare function fetchMedicationOrdersMetadata(): Promise<MedicationOrdersMetadataResponse>;
4
+ export declare function searchMedications(searchTerm: string, count?: number): Promise<Bundle<Medication>>;
5
+ export declare function getMedicationDisplay(medication: Medication): string;
6
+ //# sourceMappingURL=medicationService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"medicationService.d.ts","sourceRoot":"","sources":["../../src/services/medicationService.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAS7C,OAAO,EAAE,gCAAgC,EAAE,MAAM,4BAA4B,CAAC;AAE9E,wBAAsB,6BAA6B,IAAI,OAAO,CAAC,gCAAgC,CAAC,CAI/F;AAED,wBAAsB,iBAAiB,CACrC,UAAU,EAAE,MAAM,EAClB,KAAK,GAAE,MAAW,GACjB,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAI7B;AAED,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,CAenE"}
@@ -0,0 +1,9 @@
1
+ import { Medication } from 'fhir/r4';
2
+ import { Concept } from '../models/encounterConcepts';
3
+ import { DurationUnitOption } from '../models/medication';
4
+ import { DrugFormDefault, Frequency } from '../models/medicationConfig';
5
+ export declare const getDefaultRoute: (medication: Medication, drugFormDefaults: Record<string, DrugFormDefault>, routes: Concept[]) => Concept | undefined;
6
+ export declare const getDefaultDosingUnit: (medication: Medication, drugFormDefaults: Record<string, DrugFormDefault>, dosingUnits: Concept[]) => Concept | undefined;
7
+ export declare const calculateTotalQuantity: (dosage: number, frequency: Frequency | null, duration: number, durationUnit: DurationUnitOption | null) => number;
8
+ export declare const isImmediateFrequency: (frequency: Frequency) => boolean;
9
+ //# sourceMappingURL=medicationsValueCalculator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"medicationsValueCalculator.d.ts","sourceRoot":"","sources":["../../src/services/medicationsValueCalculator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAExE,eAAO,MAAM,eAAe,GAC1B,YAAY,UAAU,EACtB,kBAAkB,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,EACjD,QAAQ,OAAO,EAAE,KAChB,OAAO,GAAG,SAUZ,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,YAAY,UAAU,EACtB,kBAAkB,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,EACjD,aAAa,OAAO,EAAE,KACrB,OAAO,GAAG,SAUZ,CAAC;AAEF,eAAO,MAAM,sBAAsB,GACjC,QAAQ,MAAM,EACd,WAAW,SAAS,GAAG,IAAI,EAC3B,UAAU,MAAM,EAChB,cAAc,kBAAkB,GAAG,IAAI,KACtC,MAgBF,CAAC;AAUF,eAAO,MAAM,oBAAoB,GAAI,WAAW,SAAS,KAAG,OAE3D,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Load pinned observation form names from user preferences
3
+ * @returns Array of pinned form names
4
+ */
5
+ export declare const loadPinnedForms: () => Promise<string[]>;
6
+ /**
7
+ * Save pinned observation form names to user preferences
8
+ * @param formNames Array of form names to pin
9
+ */
10
+ export declare const savePinnedForms: (formNames: string[]) => Promise<void>;
11
+ //# sourceMappingURL=pinnedFormsService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pinnedFormsService.d.ts","sourceRoot":"","sources":["../../src/services/pinnedFormsService.ts"],"names":[],"mappings":"AAWA;;;GAGG;AACH,eAAO,MAAM,eAAe,QAAa,OAAO,CAAC,MAAM,EAAE,CA4BxD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,GAAU,WAAW,MAAM,EAAE,KAAG,OAAO,CAAC,IAAI,CA2BvE,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { Coding } from 'fhir/r4';
2
+ import { AllergyInputEntry, AllergenConcept } from '../models/allergy';
3
+ export interface AllergyState {
4
+ selectedAllergies: AllergyInputEntry[];
5
+ addAllergy: (allergy: AllergenConcept) => void;
6
+ removeAllergy: (allergyId: string) => void;
7
+ updateSeverity: (allergyId: string, severity: Coding | null) => void;
8
+ updateReactions: (allergyId: string, reactions: Coding[]) => void;
9
+ updateNote: (allergyId: string, note: string) => void;
10
+ validateAllAllergies: () => boolean;
11
+ reset: () => void;
12
+ getState: () => AllergyState;
13
+ }
14
+ export declare const useAllergyStore: import('zustand').UseBoundStore<import('zustand').StoreApi<AllergyState>>;
15
+ export default useAllergyStore;
16
+ //# sourceMappingURL=allergyStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"allergyStore.d.ts","sourceRoot":"","sources":["../../src/stores/allergyStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEjC,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEvE,MAAM,WAAW,YAAY;IAC3B,iBAAiB,EAAE,iBAAiB,EAAE,CAAC;IAEvC,UAAU,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,IAAI,CAAC;IAC/C,aAAa,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,cAAc,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACrE,eAAe,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAClE,UAAU,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtD,oBAAoB,EAAE,MAAM,OAAO,CAAC;IACpC,KAAK,EAAE,MAAM,IAAI,CAAC;IAElB,QAAQ,EAAE,MAAM,YAAY,CAAC;CAC9B;AAED,eAAO,MAAM,eAAe,2EAqHzB,CAAC;AAEJ,eAAe,eAAe,CAAC"}
@@ -0,0 +1,60 @@
1
+ import { ConceptSearch, ConditionInputEntry, DiagnosisInputEntry } from '@bahmni/services';
2
+ import { Coding } from 'fhir/r4';
3
+ /**
4
+ * Interface defining the state and actions for managing conditions and diagnoses
5
+ */
6
+ export interface ConditionsAndDiagnosesState {
7
+ selectedDiagnoses: DiagnosisInputEntry[];
8
+ selectedConditions: ConditionInputEntry[];
9
+ /**
10
+ * Adds a new diagnosis to the selected diagnoses list
11
+ * @param diagnosis - The concept search result to add as diagnosis
12
+ */
13
+ addDiagnosis: (diagnosis: ConceptSearch) => void;
14
+ /**
15
+ * Removes a diagnosis from the selected diagnoses list
16
+ * @param diagnosisId - The ID of the diagnosis to remove
17
+ */
18
+ removeDiagnosis: (diagnosisId: string) => void;
19
+ /**
20
+ * Updates the certainty level for a specific diagnosis
21
+ * @param diagnosisId - The ID of the diagnosis to update
22
+ * @param certainty - The certainty coding to set
23
+ */
24
+ updateCertainty: (diagnosisId: string, certainty: Coding | null) => void;
25
+ /**
26
+ * Validates all selected diagnoses and conditions
27
+ * @returns True if all diagnoses and conditions are valid, false otherwise
28
+ */
29
+ validate: () => boolean;
30
+ /**
31
+ * Moves a diagnosis from diagnoses list to conditions list
32
+ * @param diagnosisId - The ID of the diagnosis to mark as condition
33
+ * @returns True if successfully marked as condition, false otherwise
34
+ */
35
+ markAsCondition: (diagnosisId: string) => boolean;
36
+ /**
37
+ * Removes a condition from the selected conditions list
38
+ * @param conditionId - The ID of the condition to remove
39
+ */
40
+ removeCondition: (conditionId: string) => void;
41
+ /**
42
+ * Updates the duration and its unit for a specific condition
43
+ * @param conditionId - The ID of the condition to update
44
+ * @param value - The duration value
45
+ * @param unit - The duration unit (days, months, years)
46
+ */
47
+ updateConditionDuration: (conditionId: string, value: number | null, unit: 'days' | 'months' | 'years' | null) => void;
48
+ /**
49
+ * Resets the store to its initial state
50
+ */
51
+ reset: () => void;
52
+ /**
53
+ * Gets the current state of the store
54
+ * @returns The current state
55
+ */
56
+ getState: () => ConditionsAndDiagnosesState;
57
+ }
58
+ export declare const useConditionsAndDiagnosesStore: import('zustand').UseBoundStore<import('zustand').StoreApi<ConditionsAndDiagnosesState>>;
59
+ export default useConditionsAndDiagnosesStore;
60
+ //# sourceMappingURL=conditionsAndDiagnosesStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conditionsAndDiagnosesStore.d.ts","sourceRoot":"","sources":["../../src/stores/conditionsAndDiagnosesStore.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACzB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAGjC;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,iBAAiB,EAAE,mBAAmB,EAAE,CAAC;IACzC,kBAAkB,EAAE,mBAAmB,EAAE,CAAC;IAE1C;;;OAGG;IACH,YAAY,EAAE,CAAC,SAAS,EAAE,aAAa,KAAK,IAAI,CAAC;IAEjD;;;OAGG;IACH,eAAe,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IAE/C;;;;OAIG;IACH,eAAe,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAEzE;;;OAGG;IACH,QAAQ,EAAE,MAAM,OAAO,CAAC;IAExB;;;;OAIG;IACH,eAAe,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC;IAElD;;;OAGG;IACH,eAAe,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IAE/C;;;;;OAKG;IACH,uBAAuB,EAAE,CACvB,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,GAAG,IAAI,EACpB,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,IAAI,KACrC,IAAI,CAAC;IAEV;;OAEG;IACH,KAAK,EAAE,MAAM,IAAI,CAAC;IAElB;;;OAGG;IACH,QAAQ,EAAE,MAAM,2BAA2B,CAAC;CAC7C;AAkBD,eAAO,MAAM,8BAA8B,0FAkOtC,CAAC;AAEN,eAAe,8BAA8B,CAAC"}
@@ -0,0 +1,35 @@
1
+ import { Provider, User } from '@bahmni/services';
2
+ import { FhirEncounter } from '../models/encounter';
3
+ import { Concept } from '../models/encounterConcepts';
4
+ import { OpenMRSLocation } from '../models/location';
5
+ export interface EncounterDetailsState {
6
+ selectedLocation: OpenMRSLocation | null;
7
+ selectedEncounterType: Concept | null;
8
+ selectedVisitType: Concept | null;
9
+ encounterParticipants: Provider[];
10
+ consultationDate: Date;
11
+ activeVisit: FhirEncounter | null;
12
+ activeVisitError: Error | null;
13
+ practitioner: Provider | null;
14
+ user: User | null;
15
+ patientUUID: string | null;
16
+ isEncounterDetailsFormReady: boolean;
17
+ hasError: boolean;
18
+ setSelectedLocation: (location: OpenMRSLocation | null) => void;
19
+ setSelectedEncounterType: (encounterType: Concept | null) => void;
20
+ setSelectedVisitType: (visitType: Concept | null) => void;
21
+ setEncounterParticipants: (participants: Provider[]) => void;
22
+ setConsultationDate: (date: Date) => void;
23
+ setEncounterDetailsFormReady: (ready: boolean) => void;
24
+ setActiveVisit: (visit: FhirEncounter | null) => void;
25
+ setActiveVisitError: (error: Error | null) => void;
26
+ setPractitioner: (practitioner: Provider | null) => void;
27
+ setUser: (user: User | null) => void;
28
+ setPatientUUID: (patientUUID: string | null) => void;
29
+ setHasError: (hasError: boolean) => void;
30
+ reset: () => void;
31
+ getState: () => EncounterDetailsState;
32
+ }
33
+ export declare const useEncounterDetailsStore: import('zustand').UseBoundStore<import('zustand').StoreApi<EncounterDetailsState>>;
34
+ export default useEncounterDetailsStore;
35
+ //# sourceMappingURL=encounterDetailsStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"encounterDetailsStore.d.ts","sourceRoot":"","sources":["../../src/stores/encounterDetailsStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAE5D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAA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