@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
package/LICENSE
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This Source Code Form is subject to the terms of the Mozilla Public License,
|
|
3
|
+
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
|
|
4
|
+
* obtain one at http://mozilla.org/MPL/2.0/. Bahmni is also distributed under
|
|
5
|
+
* the terms of the Healthcare Disclaimer located at http://openmrs.org/license.
|
|
6
|
+
*
|
|
7
|
+
* Copyright 2025. Thoughtworks, Inc. Thoughtworks is a registered trademark
|
|
8
|
+
* and the Thoughtworks graphic logo is a trademark of Thoughtworks Inc.
|
|
9
|
+
*/
|
package/README.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export declare const allergiesQueryKeys: (patientUUID: string) => readonly ["allergies", string];
|
|
3
|
+
/**
|
|
4
|
+
* Component to display patient allergies using SortableDataTable
|
|
5
|
+
*/
|
|
6
|
+
declare const AllergiesTable: React.FC;
|
|
7
|
+
export default AllergiesTable;
|
|
8
|
+
//# sourceMappingURL=AllergiesTable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AllergiesTable.d.ts","sourceRoot":"","sources":["../../src/allergies/AllergiesTable.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAW5D,eAAO,MAAM,kBAAkB,GAAI,aAAa,MAAM,mCACjB,CAAC;AAiBtC;;GAEG;AACH,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAqI3B,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/allergies/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { AllergenType, FormattedAllergy } from '@bahmni/services';
|
|
2
|
+
/**
|
|
3
|
+
* Priority order for allergy severity levels (case insensitive)
|
|
4
|
+
* Index 0 = highest priority, higher index = lower priority
|
|
5
|
+
* Used for sorting allergies by medical severity: severe → moderate → mild
|
|
6
|
+
*/
|
|
7
|
+
export declare const SEVERITY_PRIORITY_ORDER: string[];
|
|
8
|
+
/**
|
|
9
|
+
* Maps allergy types to their corresponding i18n translation keys
|
|
10
|
+
* @param type - The type of allergen
|
|
11
|
+
* @returns The i18n translation key for the allergen type
|
|
12
|
+
*/
|
|
13
|
+
export declare const getCategoryDisplayName: (type: AllergenType | string | undefined | null) => string;
|
|
14
|
+
/**
|
|
15
|
+
* Maps allergy severity to i18n translation key
|
|
16
|
+
* @param severity - The severity level of the allergy
|
|
17
|
+
* @returns The i18n translation key for the severity
|
|
18
|
+
*/
|
|
19
|
+
export declare const getSeverityDisplayName: (severity: string) => string;
|
|
20
|
+
/**
|
|
21
|
+
* Maps allergy severity to numeric priority for sorting
|
|
22
|
+
* Uses generic getPriorityByOrder function with SEVERITY_PRIORITY_ORDER
|
|
23
|
+
* @param severity - The severity level of the allergy
|
|
24
|
+
* @returns Numeric priority (lower = higher priority)
|
|
25
|
+
*/
|
|
26
|
+
export declare const getSeverityPriority: (severity: string) => number;
|
|
27
|
+
/**
|
|
28
|
+
* Sorts allergies by severity priority: severe → moderate → mild
|
|
29
|
+
* Maintains stable sorting (preserves original order for same severity)
|
|
30
|
+
* @param allergies - Array of formatted allergies to sort
|
|
31
|
+
* @returns New sorted array (does not mutate original)
|
|
32
|
+
*/
|
|
33
|
+
export declare const sortAllergiesBySeverity: (allergies: FormattedAllergy[]) => FormattedAllergy[];
|
|
34
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/allergies/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,YAAY,EACZ,gBAAgB,EACjB,MAAM,kBAAkB,CAAC;AAE1B;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,UAAiC,CAAC;AAEtE;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,GACjC,MAAM,YAAY,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,KAC7C,MAUF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,GAAI,UAAU,MAAM,KAAG,MAWzD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,GAAI,UAAU,MAAM,KAAG,MAEtD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,GAClC,WAAW,gBAAgB,EAAE,KAC5B,gBAAgB,EAIlB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export declare const conditionsQueryKeys: (patientUUID: string) => readonly ["conditions", string];
|
|
3
|
+
/**
|
|
4
|
+
* Component to display patient conditions using SortableDataTable
|
|
5
|
+
*/
|
|
6
|
+
declare const ConditionsTable: React.FC;
|
|
7
|
+
export default ConditionsTable;
|
|
8
|
+
//# sourceMappingURL=ConditionsTable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConditionsTable.d.ts","sourceRoot":"","sources":["../../src/conditions/ConditionsTable.tsx"],"names":[],"mappings":"AASA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAQ5D,eAAO,MAAM,mBAAmB,GAAI,aAAa,MAAM,oCACjB,CAAC;AAUvC;;GAEG;AACH,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAgH5B,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/conditions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,IAAI,eAAe,EAC1B,mBAAmB,GACpB,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enum representing the possible clinical statuses of a condition
|
|
3
|
+
*/
|
|
4
|
+
export declare enum ConditionStatus {
|
|
5
|
+
Active = "active",
|
|
6
|
+
Inactive = "inactive"
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Interface representing a formatted condition for easier consumption by components
|
|
10
|
+
*/
|
|
11
|
+
export interface ConditionViewModel {
|
|
12
|
+
readonly id: string;
|
|
13
|
+
readonly display: string;
|
|
14
|
+
readonly status: ConditionStatus;
|
|
15
|
+
readonly onsetDate?: string;
|
|
16
|
+
readonly recordedDate?: string;
|
|
17
|
+
readonly recorder?: string;
|
|
18
|
+
readonly code: string;
|
|
19
|
+
readonly codeDisplay: string;
|
|
20
|
+
readonly note?: string[];
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=models.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/conditions/models.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,eAAe;IACzB,MAAM,WAAW;IACjB,QAAQ,aAAa;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC;IACjC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Condition } from 'fhir/r4';
|
|
2
|
+
import { ConditionViewModel } from './models';
|
|
3
|
+
/**
|
|
4
|
+
* Transforms an array of FHIR Condition resources into conditions table view models.
|
|
5
|
+
* @param conditions - Array of FHIR Condition resources to transform
|
|
6
|
+
* @returns Array of ConditionViewModel view models ready for table rendering
|
|
7
|
+
* @throws {Error} When a condition is missing required fields (id, code, recordedDate)
|
|
8
|
+
* @throws {Error} When a condition lacks coding information in the code field
|
|
9
|
+
*/
|
|
10
|
+
export declare function createConditionViewModels(conditions: Condition[]): ConditionViewModel[];
|
|
11
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/conditions/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC,OAAO,EAAE,kBAAkB,EAAmB,MAAM,UAAU,CAAC;AAgC/D;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,SAAS,EAAE,GACtB,kBAAkB,EAAE,CAyBtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DiagnosesTable.d.ts","sourceRoot":"","sources":["../../src/diagnoses/DiagnosesTable.tsx"],"names":[],"mappings":"AAQA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAIpD;;GAEG;AACH,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/diagnoses/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Diagnosis } from '@bahmni/services';
|
|
2
|
+
interface UseDiagnosesResult {
|
|
3
|
+
diagnoses: Diagnosis[];
|
|
4
|
+
loading: boolean;
|
|
5
|
+
error: Error | null;
|
|
6
|
+
refetch: () => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Custom hook to fetch and manage diagnoses for the current patient
|
|
10
|
+
* @returns Object containing diagnoses, loading state, error state, and refetch function
|
|
11
|
+
*/
|
|
12
|
+
export declare const useDiagnoses: () => UseDiagnosesResult;
|
|
13
|
+
export default useDiagnoses;
|
|
14
|
+
//# sourceMappingURL=useDiagnoses.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDiagnoses.d.ts","sourceRoot":"","sources":["../../src/diagnoses/useDiagnoses.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,SAAS,EACV,MAAM,kBAAkB,CAAC;AAI1B,UAAU,kBAAkB;IAC1B,SAAS,EAAE,SAAS,EAAE,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,QAAO,kBAoC/B,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { WidgetProps } from '../registry/model';
|
|
3
|
+
export declare const genericServiceRequestQueryKeys: (categoryUuid: string, patientUUID: string, encounterUuids?: string[]) => readonly ["genericServiceRequest", string, string, string[] | undefined];
|
|
4
|
+
/**
|
|
5
|
+
* Component to display patient service requests grouped by date in accordion format
|
|
6
|
+
* Each accordion item contains a SortableDataTable with service requests for that date
|
|
7
|
+
*/
|
|
8
|
+
declare const GenericServiceRequestTable: React.FC<WidgetProps>;
|
|
9
|
+
export default GenericServiceRequestTable;
|
|
10
|
+
//# sourceMappingURL=GenericServiceRequestTable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GenericServiceRequestTable.d.ts","sourceRoot":"","sources":["../../src/genericServiceRequest/GenericServiceRequestTable.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAI/D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAKhD,eAAO,MAAM,8BAA8B,GACzC,cAAc,MAAM,EACpB,aAAa,MAAM,EACnB,iBAAiB,MAAM,EAAE,6EAEoD,CAAC;AAehF;;;GAGG;AACH,QAAA,MAAM,0BAA0B,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CA8NrD,CAAC;AAEF,eAAe,0BAA0B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/genericServiceRequest/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,8BAA8B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/genericServiceRequest/models.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Bundle, ServiceRequest } from 'fhir/r4';
|
|
2
|
+
import { ServiceRequestViewModel } from './models';
|
|
3
|
+
/**
|
|
4
|
+
* Priority order for service request priorities (case insensitive)
|
|
5
|
+
* Index 0 = highest priority, higher index = lower priority
|
|
6
|
+
* Used for sorting service requests by priority: stat → routine
|
|
7
|
+
*/
|
|
8
|
+
export declare const PRIORITY_ORDER: string[];
|
|
9
|
+
/**
|
|
10
|
+
* Maps service request priority to numeric priority for sorting
|
|
11
|
+
* Uses generic getPriorityByOrder function with PRIORITY_ORDER
|
|
12
|
+
* @param priority - The priority of the service request
|
|
13
|
+
* @returns Numeric priority (lower = higher priority)
|
|
14
|
+
*/
|
|
15
|
+
export declare const getServiceRequestPriority: (priority: string) => number;
|
|
16
|
+
/**
|
|
17
|
+
* Sorts service requests by priority: stat → routine
|
|
18
|
+
* Maintains stable sorting (preserves original order for same priority)
|
|
19
|
+
* @param requests - Array of service requests to sort
|
|
20
|
+
* @returns New sorted array (does not mutate original)
|
|
21
|
+
*/
|
|
22
|
+
export declare const sortServiceRequestsByPriority: (requests: ServiceRequestViewModel[]) => ServiceRequestViewModel[];
|
|
23
|
+
/**
|
|
24
|
+
* Filters out service requests 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 request replaces another
|
|
27
|
+
* @param requests - Array of formatted service requests
|
|
28
|
+
* @returns Filtered array without replacement-related entries
|
|
29
|
+
*/
|
|
30
|
+
export declare const filterServiceRequestReplacementEntries: (requests: ServiceRequestViewModel[]) => ServiceRequestViewModel[];
|
|
31
|
+
/**
|
|
32
|
+
* Formats FHIR service requests into a more user-friendly format
|
|
33
|
+
* @param bundle - The FHIR bundle to format
|
|
34
|
+
* @returns An array of formatted service request view model objects
|
|
35
|
+
*/
|
|
36
|
+
export declare function mapServiceRequest(bundle: Bundle<ServiceRequest>): ServiceRequestViewModel[];
|
|
37
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/genericServiceRequest/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAe,cAAc,EAAE,MAAM,SAAS,CAAC;AAEnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAEnD;;;;GAIG;AACH,eAAO,MAAM,cAAc,UAAsB,CAAC;AAElD;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,GAAI,UAAU,MAAM,KAAG,MAE5D,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,GACxC,UAAU,uBAAuB,EAAE,KAClC,uBAAuB,EAOzB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,sCAAsC,GACjD,UAAU,uBAAuB,EAAE,KAClC,uBAAuB,EAMzB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,MAAM,CAAC,cAAc,CAAC,GAC7B,uBAAuB,EAAE,CA6B3B"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Provider, User } from '@bahmni/services';
|
|
2
|
+
interface useActivePractitionerResult {
|
|
3
|
+
practitioner: Provider | null;
|
|
4
|
+
user: User | null;
|
|
5
|
+
loading: boolean;
|
|
6
|
+
error: Error | null;
|
|
7
|
+
refetch: () => void;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Custom hook to fetch and manage the active practitioner's details
|
|
11
|
+
* @returns Object containing practitioner, loading state, error state, and refetch function
|
|
12
|
+
*/
|
|
13
|
+
export declare const useActivePractitioner: () => useActivePractitionerResult;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=useActivePractitioner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useActivePractitioner.d.ts","sourceRoot":"","sources":["../../src/hooks/useActivePractitioner.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,QAAQ,EACR,IAAI,EAGL,MAAM,kBAAkB,CAAC;AAG1B,UAAU,2BAA2B;IACnC,YAAY,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC9B,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;GAGG;AACH,eAAO,MAAM,qBAAqB,QAAO,2BA4CxC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePatientUUID.d.ts","sourceRoot":"","sources":["../../src/hooks/usePatientUUID.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,cAAc,QAAO,MAAM,GAAG,IAM1C,CAAC"}
|