@bahmni/widgets 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.
- package/LICENSE +9 -0
- package/README.md +5 -0
- package/dist/allergies/AllergiesTable.d.ts +8 -0
- package/dist/allergies/AllergiesTable.d.ts.map +1 -0
- package/dist/allergies/index.d.ts +2 -0
- package/dist/allergies/index.d.ts.map +1 -0
- package/dist/allergies/utils.d.ts +34 -0
- package/dist/allergies/utils.d.ts.map +1 -0
- package/dist/conditions/ConditionsTable.d.ts +8 -0
- package/dist/conditions/ConditionsTable.d.ts.map +1 -0
- package/dist/conditions/index.d.ts +2 -0
- package/dist/conditions/index.d.ts.map +1 -0
- package/dist/conditions/models.d.ts +22 -0
- package/dist/conditions/models.d.ts.map +1 -0
- package/dist/conditions/utils.d.ts +11 -0
- package/dist/conditions/utils.d.ts.map +1 -0
- package/dist/diagnoses/DiagnosesTable.d.ts +7 -0
- package/dist/diagnoses/DiagnosesTable.d.ts.map +1 -0
- package/dist/diagnoses/index.d.ts +2 -0
- package/dist/diagnoses/index.d.ts.map +1 -0
- package/dist/diagnoses/useDiagnoses.d.ts +14 -0
- package/dist/diagnoses/useDiagnoses.d.ts.map +1 -0
- package/dist/genericServiceRequest/GenericServiceRequestTable.d.ts +10 -0
- package/dist/genericServiceRequest/GenericServiceRequestTable.d.ts.map +1 -0
- package/dist/genericServiceRequest/index.d.ts +2 -0
- package/dist/genericServiceRequest/index.d.ts.map +1 -0
- package/dist/genericServiceRequest/models.d.ts +11 -0
- package/dist/genericServiceRequest/models.d.ts.map +1 -0
- package/dist/genericServiceRequest/utils.d.ts +37 -0
- package/dist/genericServiceRequest/utils.d.ts.map +1 -0
- package/dist/hooks/useActivePractitioner.d.ts +15 -0
- package/dist/hooks/useActivePractitioner.d.ts.map +1 -0
- package/dist/hooks/usePatientUUID.d.ts +6 -0
- package/dist/hooks/usePatientUUID.d.ts.map +1 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +75283 -0
- package/dist/labinvestigation/LabInvestigation.d.ts +5 -0
- package/dist/labinvestigation/LabInvestigation.d.ts.map +1 -0
- package/dist/labinvestigation/LabInvestigationItem.d.ts +8 -0
- package/dist/labinvestigation/LabInvestigationItem.d.ts.map +1 -0
- package/dist/labinvestigation/index.d.ts +2 -0
- package/dist/labinvestigation/index.d.ts.map +1 -0
- package/dist/medications/MedicationsTable.d.ts +4 -0
- package/dist/medications/MedicationsTable.d.ts.map +1 -0
- package/dist/medications/index.d.ts +2 -0
- package/dist/medications/index.d.ts.map +1 -0
- package/dist/medications/useMedicationRequest.d.ts +14 -0
- package/dist/medications/useMedicationRequest.d.ts.map +1 -0
- package/dist/medications/utils.d.ts +67 -0
- package/dist/medications/utils.d.ts.map +1 -0
- package/dist/notification/NotificationContext.d.ts +9 -0
- package/dist/notification/NotificationContext.d.ts.map +1 -0
- package/dist/notification/NotificationProvider.d.ts +7 -0
- package/dist/notification/NotificationProvider.d.ts.map +1 -0
- package/dist/notification/NotificationServiceComponent.d.ts +8 -0
- package/dist/notification/NotificationServiceComponent.d.ts.map +1 -0
- package/dist/notification/index.d.ts +5 -0
- package/dist/notification/index.d.ts.map +1 -0
- package/dist/notification/useNotification.d.ts +9 -0
- package/dist/notification/useNotification.d.ts.map +1 -0
- package/dist/patientDetails/PatientDetails.d.ts +4 -0
- package/dist/patientDetails/PatientDetails.d.ts.map +1 -0
- package/dist/patientDetails/index.d.ts +2 -0
- package/dist/patientDetails/index.d.ts.map +1 -0
- package/dist/patientDetails/usePatient.d.ts +14 -0
- package/dist/patientDetails/usePatient.d.ts.map +1 -0
- package/dist/patientPrograms/PatientProgramsTable.d.ts +13 -0
- package/dist/patientPrograms/PatientProgramsTable.d.ts.map +1 -0
- package/dist/patientPrograms/constants.d.ts +2 -0
- package/dist/patientPrograms/constants.d.ts.map +1 -0
- package/dist/patientPrograms/index.d.ts +2 -0
- package/dist/patientPrograms/index.d.ts.map +1 -0
- package/dist/patientPrograms/model.d.ts +15 -0
- package/dist/patientPrograms/model.d.ts.map +1 -0
- package/dist/patientPrograms/utils.d.ts +9 -0
- package/dist/patientPrograms/utils.d.ts.map +1 -0
- package/dist/radiologyInvestigation/RadiologyInvestigationTable.d.ts +10 -0
- package/dist/radiologyInvestigation/RadiologyInvestigationTable.d.ts.map +1 -0
- package/dist/radiologyInvestigation/__mocks__/mocks.d.ts +17 -0
- package/dist/radiologyInvestigation/__mocks__/mocks.d.ts.map +1 -0
- package/dist/radiologyInvestigation/index.d.ts +2 -0
- package/dist/radiologyInvestigation/index.d.ts.map +1 -0
- package/dist/radiologyInvestigation/models.d.ts +16 -0
- package/dist/radiologyInvestigation/models.d.ts.map +1 -0
- package/dist/radiologyInvestigation/utils.d.ts +38 -0
- package/dist/radiologyInvestigation/utils.d.ts.map +1 -0
- package/dist/registry/index.d.ts +10 -0
- package/dist/registry/index.d.ts.map +1 -0
- package/dist/registry/model.d.ts +12 -0
- package/dist/registry/model.d.ts.map +1 -0
- package/dist/registry/widgetMap.d.ts +3 -0
- package/dist/registry/widgetMap.d.ts.map +1 -0
- package/dist/searchPatient/SearchPatient.d.ts +9 -0
- package/dist/searchPatient/SearchPatient.d.ts.map +1 -0
- package/dist/searchPatient/SearchStrategy.interface.d.ts +62 -0
- package/dist/searchPatient/SearchStrategy.interface.d.ts.map +1 -0
- package/dist/searchPatient/index.d.ts +2 -0
- package/dist/searchPatient/index.d.ts.map +1 -0
- package/dist/searchPatient/strategies/AppointmentSearchStrategy.d.ts +37 -0
- package/dist/searchPatient/strategies/AppointmentSearchStrategy.d.ts.map +1 -0
- package/dist/searchPatient/strategies/AttributeSearchStrategy.d.ts +40 -0
- package/dist/searchPatient/strategies/AttributeSearchStrategy.d.ts.map +1 -0
- package/dist/searchPatient/strategies/NameOrIdSearchStrategy.d.ts +29 -0
- package/dist/searchPatient/strategies/NameOrIdSearchStrategy.d.ts.map +1 -0
- package/dist/searchPatient/strategies/SearchStrategyRegistry.d.ts +37 -0
- package/dist/searchPatient/strategies/SearchStrategyRegistry.d.ts.map +1 -0
- package/dist/userPrivileges/UserPrivilegeContext.d.ts +11 -0
- package/dist/userPrivileges/UserPrivilegeContext.d.ts.map +1 -0
- package/dist/userPrivileges/UserPrivilegeProvider.d.ts +7 -0
- package/dist/userPrivileges/UserPrivilegeProvider.d.ts.map +1 -0
- package/dist/userPrivileges/useUserPrivilege.d.ts +3 -0
- package/dist/userPrivileges/useUserPrivilege.d.ts.map +1 -0
- package/dist/vitalFlowSheet/VitalFlowSheet.d.ts +12 -0
- package/dist/vitalFlowSheet/VitalFlowSheet.d.ts.map +1 -0
- package/dist/vitalFlowSheet/index.d.ts +3 -0
- package/dist/vitalFlowSheet/index.d.ts.map +1 -0
- package/dist/vitalFlowSheet/useVitalFlowSheet.d.ts +20 -0
- package/dist/vitalFlowSheet/useVitalFlowSheet.d.ts.map +1 -0
- package/dist/vitalFlowSheet/utils.d.ts +48 -0
- package/dist/vitalFlowSheet/utils.d.ts.map +1 -0
- package/package.json +43 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LabInvestigation.d.ts","sourceRoot":"","sources":["../../src/labinvestigation/LabInvestigation.tsx"],"names":[],"mappings":"AAYA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAGlD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIhD,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAqJ3C,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FormattedLabTest } from '@bahmni/services';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
interface LabInvestigationItemProps {
|
|
4
|
+
test: FormattedLabTest;
|
|
5
|
+
}
|
|
6
|
+
declare const LabInvestigationItem: React.FC<LabInvestigationItemProps>;
|
|
7
|
+
export default LabInvestigationItem;
|
|
8
|
+
//# sourceMappingURL=LabInvestigationItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LabInvestigationItem.d.ts","sourceRoot":"","sources":["../../src/labinvestigation/LabInvestigationItem.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,gBAAgB,EAEjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,yBAAyB;IACjC,IAAI,EAAE,gBAAgB,CAAC;CACxB;AACD,QAAA,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAqC7D,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/labinvestigation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MedicationsTable.d.ts","sourceRoot":"","sources":["../../src/medications/MedicationsTable.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAmD9D,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EA8N7B,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/medications/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { MedicationRequest } from '@bahmni/services';
|
|
2
|
+
interface MedicationRequestResult {
|
|
3
|
+
medications: MedicationRequest[];
|
|
4
|
+
loading: boolean;
|
|
5
|
+
error: Error | null;
|
|
6
|
+
refetch: () => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Custom hook to fetch and manage medications for the current patient
|
|
10
|
+
* @returns Object containing medications, loading state, error state, and refetch function
|
|
11
|
+
*/
|
|
12
|
+
export declare const useMedicationRequest: () => MedicationRequestResult;
|
|
13
|
+
export default useMedicationRequest;
|
|
14
|
+
//# sourceMappingURL=useMedicationRequest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMedicationRequest.d.ts","sourceRoot":"","sources":["../../src/medications/useMedicationRequest.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAGlB,MAAM,kBAAkB,CAAC;AAI1B,UAAU,uBAAuB;IAC/B,WAAW,EAAE,iBAAiB,EAAE,CAAC;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,QAAO,uBAoCvC,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { MedicationRequest, FormattedMedicationRequest } from '../../../bahmni-services/src/medicationRequestService/models';
|
|
2
|
+
/**
|
|
3
|
+
* Priority order for medication status levels (case insensitive)
|
|
4
|
+
* Index 0 = highest priority, higher index = lower priority
|
|
5
|
+
* Used for sorting medications by status: active → on-hold → stopped → cancelled → completed →
|
|
6
|
+
* entered-in-error → draft → unknown
|
|
7
|
+
*/
|
|
8
|
+
export declare const MEDICATION_STATUS_PRIORITY_ORDER: string[];
|
|
9
|
+
/**
|
|
10
|
+
* Maps medication status to numeric priority for sorting.
|
|
11
|
+
* Uses a case-insensitive match against the MEDICATION_STATUS_PRIORITY_ORDER.
|
|
12
|
+
*
|
|
13
|
+
* @param status - The status of the medication (e.g. 'active', 'completed').
|
|
14
|
+
* @returns A numeric priority index for sorting (lower = higher priority).
|
|
15
|
+
*/
|
|
16
|
+
export declare const getMedicationStatusPriority: (status: string) => number;
|
|
17
|
+
/**
|
|
18
|
+
* Sorts an array of medication requests by status priority in the order:
|
|
19
|
+
* active → on-hold → completed → stopped. Stable sort ensures original
|
|
20
|
+
* order is preserved for medications with the same status.
|
|
21
|
+
*
|
|
22
|
+
* @param medications - The array of FormattedMedicationRequest objects to be sorted.
|
|
23
|
+
* @returns A new sorted array of FormattedMedicationRequest objects.
|
|
24
|
+
*/
|
|
25
|
+
export declare const sortMedicationsByStatus: (medications: FormattedMedicationRequest[]) => FormattedMedicationRequest[];
|
|
26
|
+
/**
|
|
27
|
+
* Gets the priority value for medication based only on isImmediate flag.
|
|
28
|
+
* Lower values indicate higher priority.
|
|
29
|
+
*
|
|
30
|
+
* @param medication - The FormattedMedicationRequest object to get priority for.
|
|
31
|
+
* @returns A numeric priority value (0 = immediate medications, 1 = all other medications).
|
|
32
|
+
*/
|
|
33
|
+
export declare const getMedicationPriority: (medication: FormattedMedicationRequest) => number;
|
|
34
|
+
/**
|
|
35
|
+
* Sorts an array of medication requests by priority based only on isImmediate flag.
|
|
36
|
+
* Priority order: immediate medications → all other medications (asNeeded, regular, etc.).
|
|
37
|
+
* Stable sort ensures original order is preserved within the same priority group.
|
|
38
|
+
*
|
|
39
|
+
* @param medications - The array of FormattedMedicationRequest objects to be sorted.
|
|
40
|
+
* @returns A new sorted array of FormattedMedicationRequest objects.
|
|
41
|
+
*/
|
|
42
|
+
export declare const sortMedicationsByPriority: (medications: FormattedMedicationRequest[]) => FormattedMedicationRequest[];
|
|
43
|
+
/**
|
|
44
|
+
* Converts a short-form duration unit code into its full string representation.
|
|
45
|
+
*
|
|
46
|
+
* @param medication - The duration unit code ('s', 'min', 'h', 'd', 'wk', 'mo', 'a').
|
|
47
|
+
* @returns The full unit name (e.g. 'days' for 'd', 'weeks' for 'wk').
|
|
48
|
+
*/
|
|
49
|
+
export declare function formatMedicationRequestDate(medication: 's' | 'min' | 'h' | 'd' | 'wk' | 'mo' | 'a'): string;
|
|
50
|
+
/**
|
|
51
|
+
* Converts a MedicationRequest object into a FormattedMedicationRequest object.
|
|
52
|
+
* Handles formatting of dosage, instructions, and date fields.
|
|
53
|
+
*
|
|
54
|
+
* @param medication - The original MedicationRequest object to format.
|
|
55
|
+
* @returns A new FormattedMedicationRequest object with readable, formatted data.
|
|
56
|
+
*/
|
|
57
|
+
export declare function formatMedicationRequest(medication: MedicationRequest): FormattedMedicationRequest;
|
|
58
|
+
/**
|
|
59
|
+
* Sorts an array of medication requests by date distance from today using startDate.
|
|
60
|
+
* Orders medications with today's date first, yesterday second, day before third, etc.
|
|
61
|
+
* Invalid dates are placed at the end. Maintains stable sort for medications with the same date.
|
|
62
|
+
*
|
|
63
|
+
* @param medications - The array of FormattedMedicationRequest objects to be sorted.
|
|
64
|
+
* @returns A new sorted array of FormattedMedicationRequest objects.
|
|
65
|
+
*/
|
|
66
|
+
export declare const sortMedicationsByDateDistance: (medications: FormattedMedicationRequest[]) => FormattedMedicationRequest[];
|
|
67
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/medications/utils.ts"],"names":[],"mappings":"AACA,OAAO,EACL,iBAAiB,EACjB,0BAA0B,EAC3B,MAAM,8DAA8D,CAAC;AAGtE;;;;;GAKG;AACH,eAAO,MAAM,gCAAgC,UAS5C,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,GAAI,QAAQ,MAAM,KAAG,MAE5D,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,GAClC,aAAa,0BAA0B,EAAE,KACxC,0BAA0B,EAO5B,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,GAChC,YAAY,0BAA0B,KACrC,MAGF,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,GACpC,aAAa,0BAA0B,EAAE,KACxC,0BAA0B,EAI5B,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,GAAG,GAAG,KAAK,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,GAAG,GAAG,GACtD,MAAM,CAiBR;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,iBAAiB,GAC5B,0BAA0B,CA2D5B;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,6BAA6B,GACxC,aAAa,0BAA0B,EAAE,KACxC,0BAA0B,EAU5B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Notification } from '@bahmni/services';
|
|
2
|
+
export interface NotificationContextType {
|
|
3
|
+
notifications: Notification[];
|
|
4
|
+
addNotification: (notification: Omit<Notification, 'id'>) => string;
|
|
5
|
+
removeNotification: (id: string) => void;
|
|
6
|
+
clearAllNotifications: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const NotificationContext: import('react').Context<NotificationContextType | undefined>;
|
|
9
|
+
//# sourceMappingURL=NotificationContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationContext.d.ts","sourceRoot":"","sources":["../../src/notification/NotificationContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGhD,MAAM,WAAW,uBAAuB;IACtC,aAAa,EAAE,YAAY,EAAE,CAAC;IAC9B,eAAe,EAAE,CAAC,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,KAAK,MAAM,CAAC;IACpE,kBAAkB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,qBAAqB,EAAE,MAAM,IAAI,CAAC;CACnC;AAED,eAAO,MAAM,mBAAmB,8DAEpB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationProvider.d.ts","sourceRoot":"","sources":["../../src/notification/NotificationProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAKZ,SAAS,EACV,MAAM,OAAO,CAAC;AAGf,UAAU,yBAAyB;IACjC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAqFjE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Component that connects the notification service to the notification context
|
|
4
|
+
* This should be rendered inside the NotificationProvider
|
|
5
|
+
*/
|
|
6
|
+
export declare const NotificationServiceComponent: React.FC;
|
|
7
|
+
export default NotificationServiceComponent;
|
|
8
|
+
//# sourceMappingURL=NotificationServiceComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationServiceComponent.d.ts","sourceRoot":"","sources":["../../src/notification/NotificationServiceComponent.tsx"],"names":[],"mappings":"AACA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAGzC;;;GAGG;AACH,eAAO,MAAM,4BAA4B,EAAE,KAAK,CAAC,EAchD,CAAC;AAEF,eAAe,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { NotificationContext, type NotificationContextType, } from './NotificationContext';
|
|
2
|
+
export { useNotification } from './useNotification';
|
|
3
|
+
export { NotificationServiceComponent } from './NotificationServiceComponent';
|
|
4
|
+
export { NotificationProvider } from './NotificationProvider';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/notification/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,KAAK,uBAAuB,GAC7B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { NotificationContextType } from '../notification';
|
|
2
|
+
/**
|
|
3
|
+
* Custom hook to use the notification service
|
|
4
|
+
* @returns {NotificationContextType} The notification context
|
|
5
|
+
* @throws {Error} If used outside of a NotificationProvider
|
|
6
|
+
*/
|
|
7
|
+
export declare const useNotification: () => NotificationContextType;
|
|
8
|
+
export default useNotification;
|
|
9
|
+
//# sourceMappingURL=useNotification.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useNotification.d.ts","sourceRoot":"","sources":["../../src/notification/useNotification.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAuB,MAAM,iBAAiB,CAAC;AAE/E;;;;GAIG;AACH,eAAO,MAAM,eAAe,QAAO,uBAUlC,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PatientDetails.d.ts","sourceRoot":"","sources":["../../src/patientDetails/PatientDetails.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EA0E3B,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/patientDetails/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FormattedPatientData } from '@bahmni/services';
|
|
2
|
+
interface UsePatientResult {
|
|
3
|
+
patient: FormattedPatientData | null;
|
|
4
|
+
loading: boolean;
|
|
5
|
+
error: Error | null;
|
|
6
|
+
refetch: () => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Custom hook to fetch and manage patient data
|
|
10
|
+
* @returns Object containing patient, loading state, error state, and refetch function
|
|
11
|
+
*/
|
|
12
|
+
export declare const usePatient: () => UsePatientResult;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=usePatient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePatient.d.ts","sourceRoot":"","sources":["../../src/patientDetails/usePatient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EAGrB,MAAM,kBAAkB,CAAC;AAI1B,UAAU,gBAAgB;IACxB,OAAO,EAAE,oBAAoB,GAAG,IAAI,CAAC;IACrC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;GAGG;AACH,eAAO,MAAM,UAAU,QAAO,gBA8B7B,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export declare const programsQueryKeys: (patientUUID: string, programAttributes: string[]) => readonly ["programs", string, string[]];
|
|
3
|
+
interface PatientProgramsTableProps {
|
|
4
|
+
config: {
|
|
5
|
+
fields: string[];
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Component to display patient programs using SortableDataTable
|
|
10
|
+
*/
|
|
11
|
+
declare const PatientProgramsTable: React.FC<PatientProgramsTableProps>;
|
|
12
|
+
export default PatientProgramsTable;
|
|
13
|
+
//# sourceMappingURL=PatientProgramsTable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PatientProgramsTable.d.ts","sourceRoot":"","sources":["../../src/patientPrograms/PatientProgramsTable.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAUvC,eAAO,MAAM,iBAAiB,GAC5B,aAAa,MAAM,EACnB,mBAAmB,MAAM,EAAE,4CAC6B,CAAC;AAU3D,UAAU,yBAAyB;IACjC,MAAM,EAAE;QACN,MAAM,EAAE,MAAM,EAAE,CAAC;KAClB,CAAC;CACH;AAED;;GAEG;AACH,QAAA,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAoH7D,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/patientPrograms/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,EAAE,MAAM,EAMhC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/patientPrograms/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,IAAI,oBAAoB,EAC/B,iBAAiB,GAClB,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interface representing a formatted program for easier consumption by components
|
|
3
|
+
*/
|
|
4
|
+
export interface PatientProgramViewModel {
|
|
5
|
+
readonly id: string;
|
|
6
|
+
readonly uuid: string;
|
|
7
|
+
readonly programName: string;
|
|
8
|
+
readonly dateEnrolled: string;
|
|
9
|
+
readonly dateCompleted: string | null;
|
|
10
|
+
readonly outcomeName: string | null;
|
|
11
|
+
readonly outcomeDetails: string | null;
|
|
12
|
+
readonly currentStateName: string | null;
|
|
13
|
+
readonly attributes: Record<string, string | null>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/patientPrograms/model.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IACzC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC;CACpD"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PatientProgramsResponse } from '@bahmni/services';
|
|
2
|
+
import { PatientProgramViewModel } from './model';
|
|
3
|
+
export declare function extractProgramAttributeNames(fields?: string[]): string[];
|
|
4
|
+
export declare function createProgramHeaders(fields: string[], t: (key: string) => string): Array<{
|
|
5
|
+
key: string;
|
|
6
|
+
header: string;
|
|
7
|
+
}>;
|
|
8
|
+
export declare function createPatientProgramViewModal(programs: PatientProgramsResponse, programAttributes: string[]): PatientProgramViewModel[];
|
|
9
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/patientPrograms/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAE3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAUlD,wBAAgB,4BAA4B,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAGxE;AAED,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,EAAE,EAChB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,GACzB,KAAK,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAKxC;AAwDD,wBAAgB,6BAA6B,CAC3C,QAAQ,EAAE,uBAAuB,EACjC,iBAAiB,EAAE,MAAM,EAAE,GAC1B,uBAAuB,EAAE,CAyB3B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { WidgetProps } from '../registry/model';
|
|
3
|
+
export declare const radiologyInvestigationQueryKeys: (patientUUID: string) => readonly ["radiologyInvestigation", string];
|
|
4
|
+
/**
|
|
5
|
+
* Component to display patient radiology investigations grouped by date in accordion format
|
|
6
|
+
* Each accordion item contains an SortableDataTable with radiology investigations for that date
|
|
7
|
+
*/
|
|
8
|
+
declare const RadiologyInvestigationTable: React.FC<WidgetProps>;
|
|
9
|
+
export default RadiologyInvestigationTable;
|
|
10
|
+
//# sourceMappingURL=RadiologyInvestigationTable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadiologyInvestigationTable.d.ts","sourceRoot":"","sources":["../../src/radiologyInvestigation/RadiologyInvestigationTable.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAGlD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAUhD,eAAO,MAAM,+BAA+B,GAAI,aAAa,MAAM,gDACjB,CAAC;AAiBnD;;;GAGG;AACH,QAAA,MAAM,2BAA2B,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CA2QtD,CAAC;AAEF,eAAe,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ServiceRequest, Bundle, ImagingStudy as FhirImagingStudy } from 'fhir/r4';
|
|
2
|
+
import { RadiologyInvestigationViewModel, ImagingStudy } from '../models';
|
|
3
|
+
export declare const mockCategoryUuid = "radiology-uuid-123";
|
|
4
|
+
export declare const mockServiceRequest: ServiceRequest;
|
|
5
|
+
export declare const mockValidBundle: Bundle<ServiceRequest | FhirImagingStudy>;
|
|
6
|
+
export declare const mockRadiologyInvestigations: RadiologyInvestigationViewModel[];
|
|
7
|
+
export declare const createMockRadiologyInvestigation: (id: string, testName: string, priority: string, replaces?: string[]) => RadiologyInvestigationViewModel;
|
|
8
|
+
export declare const mockRadiologyInvestigationsForFiltering: RadiologyInvestigationViewModel[];
|
|
9
|
+
export declare const mockRadiologyChainReplacement: RadiologyInvestigationViewModel[];
|
|
10
|
+
export declare const createMockServiceRequestBundle: (serviceRequest: ServiceRequest) => Bundle<ServiceRequest | FhirImagingStudy>;
|
|
11
|
+
export declare const createMockServiceRequest: (overrides?: Partial<ServiceRequest>) => ServiceRequest;
|
|
12
|
+
export declare const createMockImagingStudy: (overrides?: Partial<FhirImagingStudy>) => FhirImagingStudy;
|
|
13
|
+
export declare const createMockBundleWithServiceRequestAndImagingStudy: (serviceRequest: ServiceRequest, imagingStudies: FhirImagingStudy[]) => Bundle<ServiceRequest | FhirImagingStudy>;
|
|
14
|
+
export declare const mockImagingStudies: ImagingStudy[];
|
|
15
|
+
export declare const mockImagingStudiesWithoutAvailable: ImagingStudy[];
|
|
16
|
+
export declare const mockRadiologyInvestigationWithAvailableImagingStudies: RadiologyInvestigationViewModel[];
|
|
17
|
+
//# sourceMappingURL=mocks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mocks.d.ts","sourceRoot":"","sources":["../../../src/radiologyInvestigation/__mocks__/mocks.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,MAAM,EACN,YAAY,IAAI,gBAAgB,EACjC,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,+BAA+B,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE1E,eAAO,MAAM,gBAAgB,uBAAuB,CAAC;AAErD,eAAO,MAAM,kBAAkB,EAAE,cA6DhC,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,cAAc,GAAG,gBAAgB,CAQrE,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,+BAA+B,EAgBxE,CAAC;AAEF,eAAO,MAAM,gCAAgC,GAC3C,IAAI,MAAM,EACV,UAAU,MAAM,EAChB,UAAU,MAAM,EAChB,WAAW,MAAM,EAAE,KAClB,+BAOD,CAAC;AAEH,eAAO,MAAM,uCAAuC,EAAE,+BAA+B,EAwBlF,CAAC;AAEJ,eAAO,MAAM,6BAA6B,EAAE,+BAA+B,EAgCxE,CAAC;AAEJ,eAAO,MAAM,8BAA8B,GACzC,gBAAgB,cAAc,KAC7B,MAAM,CAAC,cAAc,GAAG,gBAAgB,CAQzC,CAAC;AAEH,eAAO,MAAM,wBAAwB,GACnC,YAAY,OAAO,CAAC,cAAc,CAAC,KAClC,cAiBD,CAAC;AAEH,eAAO,MAAM,sBAAsB,GACjC,YAAY,OAAO,CAAC,gBAAgB,CAAC,KACpC,gBAaD,CAAC;AAEH,eAAO,MAAM,iDAAiD,GAC5D,gBAAgB,cAAc,EAC9B,gBAAgB,gBAAgB,EAAE,KACjC,MAAM,CAAC,cAAc,GAAG,gBAAgB,CAWzC,CAAC;AAEH,eAAO,MAAM,kBAAkB,EAAE,YAAY,EAgB5C,CAAC;AAEF,eAAO,MAAM,kCAAkC,EAAE,YAAY,EAW5D,CAAC;AAEF,eAAO,MAAM,qDAAqD,EAAE,+BAA+B,EAqBhG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/radiologyInvestigation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,IAAI,2BAA2B,EACtC,+BAA+B,GAChC,MAAM,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface ImagingStudy {
|
|
2
|
+
id: string;
|
|
3
|
+
StudyInstanceUIDs: string;
|
|
4
|
+
status: string;
|
|
5
|
+
}
|
|
6
|
+
export interface RadiologyInvestigationViewModel {
|
|
7
|
+
readonly id: string;
|
|
8
|
+
readonly testName: string;
|
|
9
|
+
readonly priority: string;
|
|
10
|
+
readonly orderedBy: string;
|
|
11
|
+
readonly orderedDate: string;
|
|
12
|
+
readonly replaces?: string[];
|
|
13
|
+
readonly imagingStudies?: ImagingStudy[];
|
|
14
|
+
readonly note?: string;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=models.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/radiologyInvestigation/models.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,iBAAiB,EAAE,MAAM,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,QAAQ,CAAC,cAAc,CAAC,EAAE,YAAY,EAAE,CAAC;IACzC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ServiceRequest, Bundle, ImagingStudy as FhirImagingStudy } from 'fhir/r4';
|
|
2
|
+
import { RadiologyInvestigationViewModel, ImagingStudy } from './models';
|
|
3
|
+
/**
|
|
4
|
+
* Priority order for radiology investigation priorities (case insensitive)
|
|
5
|
+
* Index 0 = highest priority, higher index = lower priority
|
|
6
|
+
* Used for sorting radiology investigations by priority: stat → routine
|
|
7
|
+
*/
|
|
8
|
+
export declare const PRIORITY_ORDER: string[];
|
|
9
|
+
/**
|
|
10
|
+
* Maps radiology investigation priority to numeric priority for sorting
|
|
11
|
+
* Uses generic getPriorityByOrder function with PRIORITY_ORDER
|
|
12
|
+
* @param priority - The priority of the radiology investigation
|
|
13
|
+
* @returns Numeric priority (lower = higher priority)
|
|
14
|
+
*/
|
|
15
|
+
export declare const getRadiologyPriority: (priority: string) => number;
|
|
16
|
+
/**
|
|
17
|
+
* Sorts radiology investigations by priority: stat → routine
|
|
18
|
+
* Maintains stable sorting (preserves original order for same priority)
|
|
19
|
+
* @param investigations - Array of radiology investigations to sort
|
|
20
|
+
* @returns New sorted array (does not mutate original)
|
|
21
|
+
*/
|
|
22
|
+
export declare const sortRadiologyInvestigationsByPriority: (investigations: RadiologyInvestigationViewModel[]) => RadiologyInvestigationViewModel[];
|
|
23
|
+
/**
|
|
24
|
+
* Filters out radiology investigations that have replacement relationships
|
|
25
|
+
* Removes both the replacing entry (has replaces field) and the replaced entries (referenced in replaces)
|
|
26
|
+
* This prevents duplicate entries from showing in the UI where one investigation replaces another
|
|
27
|
+
* @param investigations - Array of formatted radiology investigations
|
|
28
|
+
* @returns Filtered array without replacement-related entries
|
|
29
|
+
*/
|
|
30
|
+
export declare const filterRadiologyInvestionsReplacementEntries: (investigations: RadiologyInvestigationViewModel[]) => RadiologyInvestigationViewModel[];
|
|
31
|
+
export declare const getAvailableImagingStudies: (imagingStudies?: ImagingStudy[]) => ImagingStudy[];
|
|
32
|
+
/**
|
|
33
|
+
* Transforms FHIR Bundle containing ServiceRequest and ImagingStudy resources into radiology investigation view models
|
|
34
|
+
* @param bundle - FHIR Bundle containing ServiceRequest and ImagingStudy resources
|
|
35
|
+
* @returns Array of RadiologyInvestigationViewModel view models ready for table rendering
|
|
36
|
+
*/
|
|
37
|
+
export declare function createRadiologyInvestigationViewModels(bundle: Bundle<ServiceRequest | FhirImagingStudy>): RadiologyInvestigationViewModel[];
|
|
38
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/radiologyInvestigation/utils.ts"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EACd,MAAM,EACN,YAAY,IAAI,gBAAgB,EACjC,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,+BAA+B,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAEzE;;;;GAIG;AACH,eAAO,MAAM,cAAc,UAAsB,CAAC;AAElD;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,GAAI,UAAU,MAAM,KAAG,MAEvD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,qCAAqC,GAChD,gBAAgB,+BAA+B,EAAE,KAChD,+BAA+B,EAIjC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,2CAA2C,GACtD,gBAAgB,+BAA+B,EAAE,KAChD,+BAA+B,EAMjC,CAAC;AAiDF,eAAO,MAAM,0BAA0B,GACrC,iBAAiB,YAAY,EAAE,KAC9B,YAAY,EAEd,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,sCAAsC,CACpD,MAAM,EAAE,MAAM,CAAC,cAAc,GAAG,gBAAgB,CAAC,GAChD,+BAA+B,EAAE,CAsCnC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ComponentType, LazyExoticComponent } from 'react';
|
|
2
|
+
import { WidgetConfig, WidgetProps } from './model';
|
|
3
|
+
export declare const registerWidget: (config: WidgetConfig) => void;
|
|
4
|
+
export declare const getWidget: (type: string) => LazyExoticComponent<ComponentType<WidgetProps>> | undefined;
|
|
5
|
+
export declare const getWidgetConfig: (type: string) => WidgetConfig | undefined;
|
|
6
|
+
export declare const hasWidget: (type: string) => boolean;
|
|
7
|
+
export declare const getAllWidgetTypes: () => string[];
|
|
8
|
+
export declare const getAllWidgetConfigs: () => WidgetConfig[];
|
|
9
|
+
export declare const resetWidgetRegistry: () => void;
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/registry/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAsEpD,eAAO,MAAM,cAAc,GAAI,QAAQ,YAAY,KAAG,IAErD,CAAC;AAEF,eAAO,MAAM,SAAS,GACpB,MAAM,MAAM,KACX,mBAAmB,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,GAAG,SAEpD,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,MAAM,MAAM,KAAG,YAAY,GAAG,SAE7D,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,MAAM,MAAM,KAAG,OAExC,CAAC;AAEF,eAAO,MAAM,iBAAiB,QAAO,MAAM,EAE1C,CAAC;AAEF,eAAO,MAAM,mBAAmB,QAAO,YAAY,EAElD,CAAC;AAEF,eAAO,MAAM,mBAAmB,QAAO,IAEtC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ComponentType, LazyExoticComponent } from 'react';
|
|
2
|
+
export interface WidgetProps {
|
|
3
|
+
config?: Record<string, unknown>;
|
|
4
|
+
episodeOfCareUuids?: string[];
|
|
5
|
+
encounterUuids?: string[];
|
|
6
|
+
visitUuids?: string[];
|
|
7
|
+
}
|
|
8
|
+
export interface WidgetConfig {
|
|
9
|
+
type: string;
|
|
10
|
+
component: LazyExoticComponent<ComponentType<WidgetProps>>;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/registry/model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAE3D,MAAM,WAAW,WAAW;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC9B,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AACD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,mBAAmB,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC;CAC5D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widgetMap.d.ts","sourceRoot":"","sources":["../../src/registry/widgetMap.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,eAAO,MAAM,cAAc,EAAE,YAAY,EAyCxC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PatientSearchResultBundle } from '@bahmni/services';
|
|
2
|
+
interface SearchPatientProps {
|
|
3
|
+
buttonTitle: string;
|
|
4
|
+
searchBarPlaceholder: string;
|
|
5
|
+
onSearch: (data: PatientSearchResultBundle | undefined, searchTerm: string, isLoading: boolean, isError: boolean, isAdvancedSearch: boolean, selectedFieldType?: string) => void;
|
|
6
|
+
}
|
|
7
|
+
declare const SearchPatient: React.FC<SearchPatientProps>;
|
|
8
|
+
export default SearchPatient;
|
|
9
|
+
//# sourceMappingURL=SearchPatient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchPatient.d.ts","sourceRoot":"","sources":["../../src/searchPatient/SearchPatient.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,yBAAyB,EAI1B,MAAM,kBAAkB,CAAC;AAQ1B,UAAU,kBAAkB;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,QAAQ,EAAE,CACR,IAAI,EAAE,yBAAyB,GAAG,SAAS,EAC3C,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,OAAO,EAClB,OAAO,EAAE,OAAO,EAChB,gBAAgB,EAAE,OAAO,EACzB,iBAAiB,CAAC,EAAE,MAAM,KACvB,IAAI,CAAC;CACX;AAED,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA0V/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { PatientSearchResultBundle, PatientSearchField } from '@bahmni/services';
|
|
2
|
+
/**
|
|
3
|
+
* Type definition for different patient search types
|
|
4
|
+
*/
|
|
5
|
+
export type PatientSearchType = 'nameOrId' | 'attributes' | 'appointment';
|
|
6
|
+
/**
|
|
7
|
+
* Context object passed to search strategies containing necessary information
|
|
8
|
+
* for executing searches
|
|
9
|
+
*/
|
|
10
|
+
export interface SearchContext {
|
|
11
|
+
selectedField?: PatientSearchField;
|
|
12
|
+
searchFields: PatientSearchField[];
|
|
13
|
+
translator: (key: string, params?: any) => string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Result of input validation
|
|
17
|
+
*/
|
|
18
|
+
export interface ValidationResult {
|
|
19
|
+
valid: boolean;
|
|
20
|
+
error?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Base strategy interface that all search strategies must implement.
|
|
24
|
+
* This follows the Strategy Pattern to encapsulate different search algorithms.
|
|
25
|
+
*
|
|
26
|
+
* @template T - The type of search result (e.g., PatientSearchResult, AppointmentSearchResult)
|
|
27
|
+
*/
|
|
28
|
+
export interface SearchStrategy {
|
|
29
|
+
/**
|
|
30
|
+
* Unique identifier for this search strategy
|
|
31
|
+
*/
|
|
32
|
+
readonly type: PatientSearchType;
|
|
33
|
+
/**
|
|
34
|
+
* Execute the search operation
|
|
35
|
+
* @param searchTerm - The search term entered by the user
|
|
36
|
+
* @param context - Context containing search configuration and utilities
|
|
37
|
+
* @returns Promise resolving to search results
|
|
38
|
+
*/
|
|
39
|
+
execute(searchTerm: string, context: SearchContext): Promise<PatientSearchResultBundle>;
|
|
40
|
+
/**
|
|
41
|
+
* Optional: Validate the search input before executing the search
|
|
42
|
+
* @param input - The input to validate
|
|
43
|
+
* @param context - Context for validation
|
|
44
|
+
* @returns Validation result indicating if input is valid
|
|
45
|
+
*/
|
|
46
|
+
validate?(input: string, context: SearchContext): ValidationResult;
|
|
47
|
+
/**
|
|
48
|
+
* Optional: Format/transform the input before searching
|
|
49
|
+
* @param input - The input to format
|
|
50
|
+
* @param context - Context for formatting
|
|
51
|
+
* @returns Formatted input string
|
|
52
|
+
*/
|
|
53
|
+
formatInput?(input: string, context: SearchContext): string;
|
|
54
|
+
/**
|
|
55
|
+
* Optional: Transform/post-process the search results
|
|
56
|
+
* @param results - The raw search results
|
|
57
|
+
* @param context - Context for transformation
|
|
58
|
+
* @returns Transformed search results
|
|
59
|
+
*/
|
|
60
|
+
transformResults?(results: PatientSearchResultBundle, context: SearchContext): PatientSearchResultBundle;
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=SearchStrategy.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchStrategy.interface.d.ts","sourceRoot":"","sources":["../../src/searchPatient/SearchStrategy.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,kBAAkB,EACnB,MAAM,kBAAkB,CAAC;AAE1B;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,YAAY,GAAG,aAAa,CAAC;AAE1E;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,aAAa,CAAC,EAAE,kBAAkB,CAAC;IACnC,YAAY,EAAE,kBAAkB,EAAE,CAAC;IAEnC,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,GAAG,KAAK,MAAM,CAAC;CACnD;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;IAEjC;;;;;OAKG;IACH,OAAO,CACL,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,yBAAyB,CAAC,CAAC;IAEtC;;;;;OAKG;IACH,QAAQ,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,GAAG,gBAAgB,CAAC;IAEnE;;;;;OAKG;IACH,WAAW,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,GAAG,MAAM,CAAC;IAE5D;;;;;OAKG;IACH,gBAAgB,CAAC,CACf,OAAO,EAAE,yBAAyB,EAClC,OAAO,EAAE,aAAa,GACrB,yBAAyB,CAAC;CAC9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/searchPatient/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { PatientSearchResultBundle } from '@bahmni/services';
|
|
2
|
+
import { SearchStrategy, SearchContext, ValidationResult } from '../SearchStrategy.interface';
|
|
3
|
+
/**
|
|
4
|
+
* Strategy for searching patients by appointment attributes
|
|
5
|
+
*/
|
|
6
|
+
export declare class AppointmentSearchStrategy implements SearchStrategy {
|
|
7
|
+
readonly type: "appointment";
|
|
8
|
+
/**
|
|
9
|
+
* Execute appointment search
|
|
10
|
+
*/
|
|
11
|
+
execute(searchTerm: string, context: SearchContext): Promise<PatientSearchResultBundle>;
|
|
12
|
+
/**
|
|
13
|
+
* Validate appointment search input
|
|
14
|
+
*/
|
|
15
|
+
validate(input: string): ValidationResult;
|
|
16
|
+
/**
|
|
17
|
+
* Format the input by trimming whitespace
|
|
18
|
+
*/
|
|
19
|
+
formatInput(input: string): string;
|
|
20
|
+
/**
|
|
21
|
+
* Build the search request with appointment number and date range
|
|
22
|
+
*/
|
|
23
|
+
private buildSearchRequest;
|
|
24
|
+
/**
|
|
25
|
+
* Transform appointments to patient search result bundle
|
|
26
|
+
*/
|
|
27
|
+
private transformAppointmentsToPatientBundle;
|
|
28
|
+
/**
|
|
29
|
+
* Transform a single appointment to a search result
|
|
30
|
+
*/
|
|
31
|
+
private transformAppointmentToSearchResult;
|
|
32
|
+
/**
|
|
33
|
+
* Extract and format appointment reasons
|
|
34
|
+
*/
|
|
35
|
+
private getAppointmentReasons;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=AppointmentSearchStrategy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppointmentSearchStrategy.d.ts","sourceRoot":"","sources":["../../../src/searchPatient/strategies/AppointmentSearchStrategy.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,yBAAyB,EAC1B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,cAAc,EACd,aAAa,EACb,gBAAgB,EACjB,MAAM,6BAA6B,CAAC;AAErC;;GAEG;AACH,qBAAa,yBAA0B,YAAW,cAAc;IAC9D,QAAQ,CAAC,IAAI,EAAG,aAAa,CAAU;IAEvC;;OAEG;IACG,OAAO,CACX,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,yBAAyB,CAAC;IAUrC;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,gBAAgB;IAOzC;;OAEG;IACH,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAIlC;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAoB1B;;OAEG;IACH,OAAO,CAAC,oCAAoC;IAS5C;;OAEG;IACH,OAAO,CAAC,kCAAkC,CA4BvC;IAEH;;OAEG;IACH,OAAO,CAAC,qBAAqB;CAS9B"}
|