@bahmni/clinical-app 0.0.1-dev.49

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-DEXRio2f.js +33 -0
  6. package/dist/MWZ6AO7Z-Ci5p0j_W.js +42 -0
  7. package/dist/YPM2AS64-Cw37iD9v.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-wYK71kPO.js +169062 -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,27 @@
1
+ import { Medication } from 'fhir/r4';
2
+ import { Concept } from '../models/encounterConcepts';
3
+ import { DurationUnitOption, MedicationInputEntry } from '../models/medication';
4
+ import { Frequency } from '../models/medicationConfig';
5
+ export interface MedicationState {
6
+ selectedMedications: MedicationInputEntry[];
7
+ addMedication: (medication: Medication, displayName: string) => void;
8
+ removeMedication: (medicationId: string) => void;
9
+ updateDosage: (medicationId: string, dosage: number) => void;
10
+ updateDosageUnit: (medicationId: string, unit: Concept) => void;
11
+ updateFrequency: (medicationId: string, frequency: Frequency | null) => void;
12
+ updateRoute: (medicationId: string, route: Concept) => void;
13
+ updateDuration: (medicationId: string, duration: number) => void;
14
+ updateDurationUnit: (medicationId: string, unit: DurationUnitOption | null) => void;
15
+ updateInstruction: (medicationId: string, instruction: Concept) => void;
16
+ updateisPRN: (medicationId: string, isPRN: boolean) => void;
17
+ updateisSTAT: (medicationId: string, isSTAT: boolean) => void;
18
+ updateStartDate: (medicationId: string, date: Date) => void;
19
+ updateDispenseQuantity: (medicationId: string, quantity: number) => void;
20
+ updateDispenseUnit: (medicationId: string, unit: Concept) => void;
21
+ validateAllMedications: () => boolean;
22
+ reset: () => void;
23
+ getState: () => MedicationState;
24
+ }
25
+ export declare const useMedicationStore: import('zustand').UseBoundStore<import('zustand').StoreApi<MedicationState>>;
26
+ export default useMedicationStore;
27
+ //# sourceMappingURL=medicationsStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"medicationsStore.d.ts","sourceRoot":"","sources":["../../src/stores/medicationsStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAEvD,MAAM,WAAW,eAAe;IAC9B,mBAAmB,EAAE,oBAAoB,EAAE,CAAC;IAE5C,aAAa,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IACrE,gBAAgB,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,YAAY,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7D,gBAAgB,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAChE,eAAe,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,GAAG,IAAI,KAAK,IAAI,CAAC;IAC7E,WAAW,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5D,cAAc,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACjE,kBAAkB,EAAE,CAClB,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE,kBAAkB,GAAG,IAAI,KAC5B,IAAI,CAAC;IACV,iBAAiB,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,KAAK,IAAI,CAAC;IACxE,WAAW,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5D,YAAY,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9D,eAAe,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAC5D,sBAAsB,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACzE,kBAAkB,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAClE,sBAAsB,EAAE,MAAM,OAAO,CAAC;IAEtC,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,QAAQ,EAAE,MAAM,eAAe,CAAC;CACjC;AACD,eAAO,MAAM,kBAAkB,8EAwU5B,CAAC;AAEJ,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { ServiceRequestInputEntry, SupportedServiceRequestPriority } from '../models/serviceRequest';
2
+ export interface ServiceRequestState {
3
+ selectedServiceRequests: Map<string, ServiceRequestInputEntry[]>;
4
+ addServiceRequest: (category: string, conceptUUID: string, display: string) => void;
5
+ removeServiceRequest: (category: string, serviceRequestId: string) => void;
6
+ updatePriority: (category: string, serviceRequestId: string, priority: SupportedServiceRequestPriority) => void;
7
+ reset: () => void;
8
+ getState: () => ServiceRequestState;
9
+ }
10
+ export declare const useServiceRequestStore: import('zustand').UseBoundStore<import('zustand').StoreApi<ServiceRequestState>>;
11
+ export default useServiceRequestStore;
12
+ //# sourceMappingURL=serviceRequestStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serviceRequestStore.d.ts","sourceRoot":"","sources":["../../src/stores/serviceRequestStore.ts"],"names":[],"mappings":"AACA,OAAO,EACL,wBAAwB,EACxB,+BAA+B,EAChC,MAAM,0BAA0B,CAAC;AAElC,MAAM,WAAW,mBAAmB;IAClC,uBAAuB,EAAE,GAAG,CAAC,MAAM,EAAE,wBAAwB,EAAE,CAAC,CAAC;IAEjE,iBAAiB,EAAE,CACjB,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,KACZ,IAAI,CAAC;IACV,oBAAoB,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3E,cAAc,EAAE,CACd,QAAQ,EAAE,MAAM,EAChB,gBAAgB,EAAE,MAAM,EACxB,QAAQ,EAAE,+BAA+B,KACtC,IAAI,CAAC;IACV,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,QAAQ,EAAE,MAAM,mBAAmB,CAAC;CACrC;AAED,eAAO,MAAM,sBAAsB,kFAkFlC,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { AllergenType } from '../models/allergy';
2
+ /**
3
+ * Maps allergy types to their corresponding i18n translation keys
4
+ * @param type - The type of allergen
5
+ * @returns The i18n translation key for the allergen type
6
+ */
7
+ export declare const getCategoryDisplayName: (type: AllergenType | string | undefined | null) => string;
8
+ //# sourceMappingURL=allergy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"allergy.d.ts","sourceRoot":"","sources":["../../src/utils/allergy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,GACjC,MAAM,YAAY,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,KAC7C,MAUF,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { AllergyIntolerance, Reference } from 'fhir/r4';
2
+ interface AllergyReaction {
3
+ manifestationUUIDs: string[];
4
+ severity?: 'mild' | 'moderate' | 'severe';
5
+ }
6
+ /**
7
+ * Creates a FHIR AllergyIntolerance resource for an encounter
8
+ * @param allergenConceptUUID - UUID of the allergen concept
9
+ * @param category - Array of categories (e.g., ['medication'])
10
+ * @param reactions - Array of reactions with manifestations and optional severity
11
+ * @param patientReference - Reference to the patient
12
+ * @param encounterReference - Reference to the encounter
13
+ * @param recorderReference - Reference to the practitioner recording the allergy
14
+ * @param note - Optional note about the allergy
15
+ * @returns FHIR AllergyIntolerance resource
16
+ */
17
+ export declare const createEncounterAllergyResource: (allergenConceptUUID: string, category: Array<"food" | "medication" | "environment" | "biologic">, reactions: AllergyReaction[], patientReference: Reference, encounterReference: Reference, recorderReference: Reference, note?: string) => AllergyIntolerance;
18
+ export {};
19
+ //# sourceMappingURL=allergyResourceCreator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"allergyResourceCreator.d.ts","sourceRoot":"","sources":["../../../src/utils/fhir/allergyResourceCreator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGxD,UAAU,eAAe;IACvB,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,QAAQ,CAAC;CAC3C;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,8BAA8B,GACzC,qBAAqB,MAAM,EAC3B,UAAU,KAAK,CAAC,MAAM,GAAG,YAAY,GAAG,aAAa,GAAG,UAAU,CAAC,EACnE,WAAW,eAAe,EAAE,EAC5B,kBAAkB,SAAS,EAC3B,oBAAoB,SAAS,EAC7B,mBAAmB,SAAS,EAC5B,OAAO,MAAM,KACZ,kBA0BF,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { CodeableConcept, Coding } from 'fhir/r4';
2
+ export declare const createCodeableConcept: (coding?: Coding[], displayText?: string) => CodeableConcept;
3
+ export declare const createCoding: (code: string, systemURL?: string, display?: string) => Coding;
4
+ //# sourceMappingURL=codeableConceptCreator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codeableConceptCreator.d.ts","sourceRoot":"","sources":["../../../src/utils/fhir/codeableConceptCreator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAElD,eAAO,MAAM,qBAAqB,GAChC,SAAS,MAAM,EAAE,EACjB,cAAc,MAAM,KACnB,eAQF,CAAC;AAEF,eAAO,MAAM,YAAY,GACvB,MAAM,MAAM,EACZ,YAAY,MAAM,EAClB,UAAU,MAAM,KACf,MAYF,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { Condition, Reference } from 'fhir/r4';
2
+ export declare const createEncounterDiagnosisResource: (diagnosisConceptUUID: string, diagnosisCertainty: "provisional" | "confirmed", subjectReference: Reference, encounterReference: Reference, recorderReference: Reference, recordedDate: Date) => Condition;
3
+ /**
4
+ * Creates a FHIR R4 Condition resource for problem-list-item category
5
+ * @param conditionConceptUUID - UUID of the condition concept
6
+ * @param subjectReference - Reference to the patient
7
+ * @param encounterReference - Reference to the encounter
8
+ * @param recorderReference - Reference to the practitioner
9
+ * @param recordedDate - Date when condition was recorded
10
+ * @param onsetDate - Onset date of the condition
11
+ * @param clinicalStatus - Clinical status of condition (defaults to 'active')
12
+ * @returns FHIR R4 Condition resource
13
+ */
14
+ export declare const createEncounterConditionResource: (conditionConceptUUID: string, subjectReference: Reference, encounterReference: Reference, recorderReference: Reference, recordedDate: Date, onsetDate: Date, clinicalStatus?: "active" | "inactive") => Condition;
15
+ //# sourceMappingURL=conditionResourceCreator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conditionResourceCreator.d.ts","sourceRoot":"","sources":["../../../src/utils/fhir/conditionResourceCreator.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAG/C,eAAO,MAAM,gCAAgC,GAC3C,sBAAsB,MAAM,EAC5B,oBAAoB,aAAa,GAAG,WAAW,EAC/C,kBAAkB,SAAS,EAC3B,oBAAoB,SAAS,EAC7B,mBAAmB,SAAS,EAC5B,cAAc,IAAI,KACjB,SA4BF,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gCAAgC,GAC3C,sBAAsB,MAAM,EAC5B,kBAAkB,SAAS,EAC3B,oBAAoB,SAAS,EAC7B,mBAAmB,SAAS,EAC5B,cAAc,IAAI,EAClB,WAAW,IAAI,EACf,iBAAgB,QAAQ,GAAG,UAAqB,KAC/C,SAuBF,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { BundleEntry, FhirResource } from 'fhir/r4';
2
+ import { ConsultationBundle } from '../../models/consultationBundle';
3
+ export declare const createConsultationBundle: (entries: Array<BundleEntry<FhirResource>>) => ConsultationBundle;
4
+ export declare const createBundleEntry: (fullURL: string, resource: FhirResource, requestMethod: "POST" | "PUT", resourceUrl?: string) => BundleEntry<FhirResource>;
5
+ //# sourceMappingURL=consultationBundleCreator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consultationBundleCreator.d.ts","sourceRoot":"","sources":["../../../src/utils/fhir/consultationBundleCreator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,eAAO,MAAM,wBAAwB,GACnC,SAAS,KAAK,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,KACxC,kBAQF,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC5B,SAAS,MAAM,EACf,UAAU,YAAY,EACtB,eAAe,MAAM,GAAG,KAAK,EAC7B,cAAc,MAAM,KACnB,WAAW,CAAC,YAAY,CAS1B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Encounter } from 'fhir/r4';
2
+ export declare const createEncounterResource: (encounterTypeUUID: string, encounterTypeDisplayText: string, patientUUID: string, participantUUIDs: string[], visitUUID: string, encounterLocationUUID: string, encounterStartTimestamp: Date) => Encounter;
3
+ //# sourceMappingURL=encounterResourceCreator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"encounterResourceCreator.d.ts","sourceRoot":"","sources":["../../../src/utils/fhir/encounterResourceCreator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AASpC,eAAO,MAAM,uBAAuB,GAClC,mBAAmB,MAAM,EACzB,0BAA0B,MAAM,EAChC,aAAa,MAAM,EACnB,kBAAkB,MAAM,EAAE,EAC1B,WAAW,MAAM,EACjB,uBAAuB,MAAM,EAC7B,yBAAyB,IAAI,KAC5B,SAqCF,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { MedicationRequest, Reference } from 'fhir/r4';
2
+ import { MedicationInputEntry } from '../../models/medication';
3
+ /**
4
+ * Creates a FHIR MedicationRequest resource for an encounter
5
+ * @param medicationEntry - The medication input entry containing all medication details
6
+ * @param subjectReference - Reference to the patient
7
+ * @param encounterReference - Reference to the encounter
8
+ * @param requesterReference - Reference to the practitioner requesting the medication
9
+ * @returns FHIR MedicationRequest resource
10
+ */
11
+ export declare const createMedicationRequestResource: (medicationEntry: MedicationInputEntry, subjectReference: Reference, encounterReference: Reference, requesterReference: Reference) => MedicationRequest;
12
+ /**
13
+ * Creates multiple MedicationRequest resources from an array of medication entries
14
+ * @param medicationEntries - Array of medication input entries
15
+ * @param subjectReference - Reference to the patient
16
+ * @param encounterReference - Reference to the encounter
17
+ * @param requesterReference - Reference to the practitioner
18
+ * @returns Array of FHIR MedicationRequest resources
19
+ */
20
+ export declare const createMedicationRequestResources: (medicationEntries: MedicationInputEntry[], subjectReference: Reference, encounterReference: Reference, requesterReference: Reference) => MedicationRequest[];
21
+ //# sourceMappingURL=medicationRequestResourceCreator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"medicationRequestResourceCreator.d.ts","sourceRoot":"","sources":["../../../src/utils/fhir/medicationRequestResourceCreator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAkB,MAAM,SAAS,CAAC;AACvE,OAAO,EAEL,oBAAoB,EACrB,MAAM,yBAAyB,CAAC;AASjC;;;;;;;GAOG;AACH,eAAO,MAAM,+BAA+B,GAC1C,iBAAiB,oBAAoB,EACrC,kBAAkB,SAAS,EAC3B,oBAAoB,SAAS,EAC7B,oBAAoB,SAAS,KAC5B,iBAeF,CAAC;AA0GF;;;;;;;GAOG;AACH,eAAO,MAAM,gCAAgC,GAC3C,mBAAmB,oBAAoB,EAAE,EACzC,kBAAkB,SAAS,EAC3B,oBAAoB,SAAS,EAC7B,oBAAoB,SAAS,KAC5B,iBAAiB,EASnB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { EncounterLocation, EncounterParticipant, Reference } from 'fhir/r4';
2
+ export declare const getPlaceholderReference: (placeholderUUID: string) => Reference;
3
+ export declare const createPatientReference: (patientUUID: string) => Reference;
4
+ export declare const createEncounterReference: (encounterUUID: string) => Reference;
5
+ export declare const getLocationReference: (locationUUID: string) => Reference;
6
+ export declare const createEncounterLocationReference: (locationUUID: string) => EncounterLocation;
7
+ export declare const createPractitionerReference: (practitionerUUID: string) => Reference;
8
+ export declare const createEncounterParticipantReference: (practitionerUUID: string) => EncounterParticipant;
9
+ export declare const createMedicationReference: (medicationId: string) => Reference;
10
+ /**
11
+ * Creates a reference that can be either a placeholder or actual encounter reference
12
+ * @param encounterReference - Either placeholder UUID or actual encounter ID
13
+ * @returns Reference object
14
+ */
15
+ export declare const createEncounterReferenceFromString: (encounterReference: string) => Reference;
16
+ //# sourceMappingURL=referenceCreator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"referenceCreator.d.ts","sourceRoot":"","sources":["../../../src/utils/fhir/referenceCreator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAY7E,eAAO,MAAM,uBAAuB,GAAI,iBAAiB,MAAM,KAAG,SAKjE,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,aAAa,MAAM,KAAG,SAE5D,CAAC;AACF,eAAO,MAAM,wBAAwB,GAAI,eAAe,MAAM,KAAG,SAEhE,CAAC;AACF,eAAO,MAAM,oBAAoB,GAAI,cAAc,MAAM,KAAG,SAE3D,CAAC;AAEF,eAAO,MAAM,gCAAgC,GAC3C,cAAc,MAAM,KACnB,iBAKF,CAAC;AAEF,eAAO,MAAM,2BAA2B,GACtC,kBAAkB,MAAM,KACvB,SAOF,CAAC;AAEF,eAAO,MAAM,mCAAmC,GAC9C,kBAAkB,MAAM,KACvB,oBAKF,CAAC;AAEF,eAAO,MAAM,yBAAyB,GAAI,cAAc,MAAM,KAAG,SAOhE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,kCAAkC,GAC7C,oBAAoB,MAAM,KACzB,SAIF,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { ServiceRequest, Reference } from 'fhir/r4';
2
+ import { SupportedServiceRequestPriority } from '../../models/serviceRequest';
3
+ /**
4
+ * Creates a FHIR ServiceRequest resource for an encounter
5
+ * @param serviceConceptUUID - UUID of the service/procedure concept being requested
6
+ * @param subjectReference - Reference to the patient
7
+ * @param encounterReference - Reference to the encounter
8
+ * @param requesterReference - Reference to the practitioner requesting the service
9
+ * @param priority - Priority of the request (routine, urgent, asap, stat)
10
+ * @returns FHIR ServiceRequest resource
11
+ */
12
+ export declare const createServiceRequestResource: (serviceConceptUUID: string, subjectReference: Reference, encounterReference: Reference, requesterReference: Reference, priority: SupportedServiceRequestPriority) => ServiceRequest;
13
+ //# sourceMappingURL=serviceRequestResourceCreator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serviceRequestResourceCreator.d.ts","sourceRoot":"","sources":["../../../src/utils/fhir/serviceRequestResourceCreator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,+BAA+B,EAAE,MAAM,6BAA6B,CAAC;AAG9E;;;;;;;;GAQG;AACH,eAAO,MAAM,4BAA4B,GACvC,oBAAoB,MAAM,EAC1B,kBAAkB,SAAS,EAC3B,oBAAoB,SAAS,EAC7B,oBAAoB,SAAS,EAC7B,UAAU,+BAA+B,KACxC,cAWF,CAAC"}
package/package.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "@bahmni/clinical-app",
3
+ "version": "0.0.1-dev.49",
4
+ "type": "module",
5
+ "main": "./dist/index.js",
6
+ "module": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ "./package.json": "./package.json",
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js",
13
+ "default": "./dist/index.js"
14
+ },
15
+ "./styles": "./dist/index.css",
16
+ "./locales/*": "./dist/locales/*"
17
+ },
18
+ "author": "Thoughtworks Inc.",
19
+ "license": "MPLv2",
20
+ "description": "A comprehensive clinical consultation module for Bahmni, built with React and Bahmni Design System. Provides a complete EMR interface for patient consultations, clinical documentation, orders, and medical record management.",
21
+ "files": [
22
+ "dist",
23
+ "README.md",
24
+ "LICENSE"
25
+ ]
26
+ }