@bahmni/services 0.0.1-dev.7
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 +20 -0
- package/dist/AppointmentService/appointmmetService.d.ts +4 -0
- package/dist/AppointmentService/appointmmetService.d.ts.map +1 -0
- package/dist/AppointmentService/constatns.d.ts +3 -0
- package/dist/AppointmentService/constatns.d.ts.map +1 -0
- package/dist/AppointmentService/index.d.ts +3 -0
- package/dist/AppointmentService/index.d.ts.map +1 -0
- package/dist/AppointmentService/models.d.ts +71 -0
- package/dist/AppointmentService/models.d.ts.map +1 -0
- package/dist/allergyService/__mocks__/mocks.d.ts +56 -0
- package/dist/allergyService/__mocks__/mocks.d.ts.map +1 -0
- package/dist/allergyService/allergyService.d.ts +41 -0
- package/dist/allergyService/allergyService.d.ts.map +1 -0
- package/dist/allergyService/constants.d.ts +15 -0
- package/dist/allergyService/constants.d.ts.map +1 -0
- package/dist/allergyService/index.d.ts +3 -0
- package/dist/allergyService/index.d.ts.map +1 -0
- package/dist/allergyService/models.d.ts +60 -0
- package/dist/allergyService/models.d.ts.map +1 -0
- package/dist/api/api.d.ts +27 -0
- package/dist/api/api.d.ts.map +1 -0
- package/dist/api/client.d.ts +4 -0
- package/dist/api/client.d.ts.map +1 -0
- package/dist/api/constants.d.ts +2 -0
- package/dist/api/constants.d.ts.map +1 -0
- package/dist/api/index.d.ts +2 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/utils.d.ts +20 -0
- package/dist/api/utils.d.ts.map +1 -0
- package/dist/applicationConfigService/ApplicationConfigService.d.ts +17 -0
- package/dist/applicationConfigService/ApplicationConfigService.d.ts.map +1 -0
- package/dist/applicationConfigService/constants.d.ts +3 -0
- package/dist/applicationConfigService/constants.d.ts.map +1 -0
- package/dist/applicationConfigService/index.d.ts +2 -0
- package/dist/applicationConfigService/index.d.ts.map +1 -0
- package/dist/auditLogService/auditEventDispatcher.d.ts +20 -0
- package/dist/auditLogService/auditEventDispatcher.d.ts.map +1 -0
- package/dist/auditLogService/auditLogService.d.ts +11 -0
- package/dist/auditLogService/auditLogService.d.ts.map +1 -0
- package/dist/auditLogService/constants.d.ts +44 -0
- package/dist/auditLogService/constants.d.ts.map +1 -0
- package/dist/auditLogService/globalAuditListener.d.ts +11 -0
- package/dist/auditLogService/globalAuditListener.d.ts.map +1 -0
- package/dist/auditLogService/index.d.ts +6 -0
- package/dist/auditLogService/index.d.ts.map +1 -0
- package/dist/auditLogService/models.d.ts +12 -0
- package/dist/auditLogService/models.d.ts.map +1 -0
- package/dist/conceptService/conceptService.d.ts +17 -0
- package/dist/conceptService/conceptService.d.ts.map +1 -0
- package/dist/conceptService/constants.d.ts +4 -0
- package/dist/conceptService/constants.d.ts.map +1 -0
- package/dist/conceptService/index.d.ts +3 -0
- package/dist/conceptService/index.d.ts.map +1 -0
- package/dist/conceptService/models.d.ts +11 -0
- package/dist/conceptService/models.d.ts.map +1 -0
- package/dist/conditionService/__mocks__/mocks.d.ts +22 -0
- package/dist/conditionService/__mocks__/mocks.d.ts.map +1 -0
- package/dist/conditionService/conditionService.d.ts +14 -0
- package/dist/conditionService/conditionService.d.ts.map +1 -0
- package/dist/conditionService/constants.d.ts +2 -0
- package/dist/conditionService/constants.d.ts.map +1 -0
- package/dist/conditionService/index.d.ts +3 -0
- package/dist/conditionService/index.d.ts.map +1 -0
- package/dist/conditionService/models.d.ts +13 -0
- package/dist/conditionService/models.d.ts.map +1 -0
- package/dist/configService/__mocks__/configMocks.d.ts +191 -0
- package/dist/configService/__mocks__/configMocks.d.ts.map +1 -0
- package/dist/configService/configService.d.ts +31 -0
- package/dist/configService/configService.d.ts.map +1 -0
- package/dist/configService/constants.d.ts +22 -0
- package/dist/configService/constants.d.ts.map +1 -0
- package/dist/configService/index.d.ts +3 -0
- package/dist/configService/index.d.ts.map +1 -0
- package/dist/configService/models/config.d.ts +27 -0
- package/dist/configService/models/config.d.ts.map +1 -0
- package/dist/configService/models/dashboardConfig.d.ts +11 -0
- package/dist/configService/models/dashboardConfig.d.ts.map +1 -0
- package/dist/configService/models/medicationConfig.d.ts +41 -0
- package/dist/configService/models/medicationConfig.d.ts.map +1 -0
- package/dist/configService/models/registrationConfig.d.ts +40 -0
- package/dist/configService/models/registrationConfig.d.ts.map +1 -0
- package/dist/configService/models.d.ts +5 -0
- package/dist/configService/models.d.ts.map +1 -0
- package/dist/configService/schemas/clinicalConfig.schema.json.d.ts +98 -0
- package/dist/configService/schemas/dashboardConfig.schema.json.d.ts +40 -0
- package/dist/configService/schemas/medicationConfig.schema.json.d.ts +40 -0
- package/dist/configService/schemas/registrationConfig.schema.json.d.ts +200 -0
- package/dist/constants/app.d.ts +10 -0
- package/dist/constants/app.d.ts.map +1 -0
- package/dist/constants/fhir.d.ts +11 -0
- package/dist/constants/fhir.d.ts.map +1 -0
- package/dist/date/constants.d.ts +6 -0
- package/dist/date/constants.d.ts.map +1 -0
- package/dist/date/date.d.ts +71 -0
- package/dist/date/date.d.ts.map +1 -0
- package/dist/date/errors.d.ts +8 -0
- package/dist/date/errors.d.ts.map +1 -0
- package/dist/date/index.d.ts +3 -0
- package/dist/date/index.d.ts.map +1 -0
- package/dist/diagnosesService/constants.d.ts +4 -0
- package/dist/diagnosesService/constants.d.ts.map +1 -0
- package/dist/diagnosesService/diagnosesService.d.ts +8 -0
- package/dist/diagnosesService/diagnosesService.d.ts.map +1 -0
- package/dist/diagnosesService/index.d.ts +3 -0
- package/dist/diagnosesService/index.d.ts.map +1 -0
- package/dist/diagnosesService/models.d.ts +22 -0
- package/dist/diagnosesService/models.d.ts.map +1 -0
- package/dist/encounterService/__mocks__/mocks.d.ts +182 -0
- package/dist/encounterService/__mocks__/mocks.d.ts.map +1 -0
- package/dist/encounterService/constants.d.ts +2 -0
- package/dist/encounterService/constants.d.ts.map +1 -0
- package/dist/encounterService/encounterService.d.ts +20 -0
- package/dist/encounterService/encounterService.d.ts.map +1 -0
- package/dist/encounterService/index.d.ts +2 -0
- package/dist/encounterService/index.d.ts.map +1 -0
- package/dist/encounterSessionService/constants.d.ts +4 -0
- package/dist/encounterSessionService/constants.d.ts.map +1 -0
- package/dist/encounterSessionService/encounterSessionService.d.ts +43 -0
- package/dist/encounterSessionService/encounterSessionService.d.ts.map +1 -0
- package/dist/encounterSessionService/index.d.ts +2 -0
- package/dist/encounterSessionService/index.d.ts.map +1 -0
- package/dist/errorHandling/index.d.ts +2 -0
- package/dist/errorHandling/index.d.ts.map +1 -0
- package/dist/errorHandling/utils.d.ts +10 -0
- package/dist/errorHandling/utils.d.ts.map +1 -0
- package/dist/i18n/constants.d.ts +5 -0
- package/dist/i18n/constants.d.ts.map +1 -0
- package/dist/i18n/i18n.d.ts +10 -0
- package/dist/i18n/i18n.d.ts.map +1 -0
- package/dist/i18n/index.d.ts +3 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/translationService.d.ts +25 -0
- package/dist/i18n/translationService.d.ts.map +1 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12033 -0
- package/dist/investigationService/constants.d.ts +5 -0
- package/dist/investigationService/constants.d.ts.map +1 -0
- package/dist/investigationService/index.d.ts +3 -0
- package/dist/investigationService/index.d.ts.map +1 -0
- package/dist/investigationService/investigationService.d.ts +3 -0
- package/dist/investigationService/investigationService.d.ts.map +1 -0
- package/dist/investigationService/model.d.ts +20 -0
- package/dist/investigationService/model.d.ts.map +1 -0
- package/dist/labInvestigationService/constants.d.ts +4 -0
- package/dist/labInvestigationService/constants.d.ts.map +1 -0
- package/dist/labInvestigationService/index.d.ts +3 -0
- package/dist/labInvestigationService/index.d.ts.map +1 -0
- package/dist/labInvestigationService/labInvestigationService.d.ts +49 -0
- package/dist/labInvestigationService/labInvestigationService.d.ts.map +1 -0
- package/dist/labInvestigationService/models.d.ts +37 -0
- package/dist/labInvestigationService/models.d.ts.map +1 -0
- package/dist/medicationRequestService/constants.d.ts +2 -0
- package/dist/medicationRequestService/constants.d.ts.map +1 -0
- package/dist/medicationRequestService/index.d.ts +3 -0
- package/dist/medicationRequestService/index.d.ts.map +1 -0
- package/dist/medicationRequestService/medicationRequestService.d.ts +15 -0
- package/dist/medicationRequestService/medicationRequestService.d.ts.map +1 -0
- package/dist/medicationRequestService/models.d.ts +58 -0
- package/dist/medicationRequestService/models.d.ts.map +1 -0
- package/dist/notification/index.d.ts +3 -0
- package/dist/notification/index.d.ts.map +1 -0
- package/dist/notification/models.d.ts +9 -0
- package/dist/notification/models.d.ts.map +1 -0
- package/dist/notification/notificationService.d.ts +22 -0
- package/dist/notification/notificationService.d.ts.map +1 -0
- package/dist/observationFormsService/index.d.ts +3 -0
- package/dist/observationFormsService/index.d.ts.map +1 -0
- package/dist/observationFormsService/models.d.ts +26 -0
- package/dist/observationFormsService/models.d.ts.map +1 -0
- package/dist/observationFormsService/observationFormsService.d.ts +6 -0
- package/dist/observationFormsService/observationFormsService.d.ts.map +1 -0
- package/dist/patientService/constants.d.ts +25 -0
- package/dist/patientService/constants.d.ts.map +1 -0
- package/dist/patientService/index.d.ts +4 -0
- package/dist/patientService/index.d.ts.map +1 -0
- package/dist/patientService/models.d.ts +218 -0
- package/dist/patientService/models.d.ts.map +1 -0
- package/dist/patientService/patientService.d.ts +109 -0
- package/dist/patientService/patientService.d.ts.map +1 -0
- package/dist/privilegeService/index.d.ts +3 -0
- package/dist/privilegeService/index.d.ts.map +1 -0
- package/dist/privilegeService/models.d.ts +9 -0
- package/dist/privilegeService/models.d.ts.map +1 -0
- package/dist/privilegeService/privilegeService.d.ts +15 -0
- package/dist/privilegeService/privilegeService.d.ts.map +1 -0
- package/dist/providerService/constants.d.ts +2 -0
- package/dist/providerService/constants.d.ts.map +1 -0
- package/dist/providerService/index.d.ts +3 -0
- package/dist/providerService/index.d.ts.map +1 -0
- package/dist/providerService/models.d.ts +51 -0
- package/dist/providerService/models.d.ts.map +1 -0
- package/dist/providerService/providerService.d.ts +7 -0
- package/dist/providerService/providerService.d.ts.map +1 -0
- package/dist/radiologyInvestigationService/__mocks__/mocks.d.ts +17 -0
- package/dist/radiologyInvestigationService/__mocks__/mocks.d.ts.map +1 -0
- package/dist/radiologyInvestigationService/constants.d.ts +2 -0
- package/dist/radiologyInvestigationService/constants.d.ts.map +1 -0
- package/dist/radiologyInvestigationService/index.d.ts +3 -0
- package/dist/radiologyInvestigationService/index.d.ts.map +1 -0
- package/dist/radiologyInvestigationService/models.d.ts +12 -0
- package/dist/radiologyInvestigationService/models.d.ts.map +1 -0
- package/dist/radiologyInvestigationService/radiologyInvestigationService.d.ts +15 -0
- package/dist/radiologyInvestigationService/radiologyInvestigationService.d.ts.map +1 -0
- package/dist/userService/constants.d.ts +3 -0
- package/dist/userService/constants.d.ts.map +1 -0
- package/dist/userService/index.d.ts +3 -0
- package/dist/userService/index.d.ts.map +1 -0
- package/dist/userService/models.d.ts +18 -0
- package/dist/userService/models.d.ts.map +1 -0
- package/dist/userService/userService.d.ts +10 -0
- package/dist/userService/userService.d.ts.map +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/utils.d.ts +84 -0
- package/dist/utils/utils.d.ts.map +1 -0
- package/dist/vitalFlowSheetService/constants.d.ts +2 -0
- package/dist/vitalFlowSheetService/constants.d.ts.map +1 -0
- package/dist/vitalFlowSheetService/index.d.ts +3 -0
- package/dist/vitalFlowSheetService/index.d.ts.map +1 -0
- package/dist/vitalFlowSheetService/model.d.ts +22 -0
- package/dist/vitalFlowSheetService/model.d.ts.map +1 -0
- package/dist/vitalFlowSheetService/vitalFlowSheetService.d.ts +11 -0
- package/dist/vitalFlowSheetService/vitalFlowSheetService.d.ts.map +1 -0
- package/package.json +44 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mocks.d.ts","sourceRoot":"","sources":["../../../src/encounterService/__mocks__/mocks.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmO3B,CAAC;AAGF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAoC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/encounterService/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB,GAAI,aAAa,MAAM,WACoB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Encounter, Bundle } from 'fhir/r4';
|
|
2
|
+
/**
|
|
3
|
+
* Fetches visits for a given patient UUID from the FHIR R4 endpoint
|
|
4
|
+
* @param patientUUID - The UUID of the patient
|
|
5
|
+
* @returns Promise resolving to a FhirEncounterBundle
|
|
6
|
+
*/
|
|
7
|
+
export declare function getPatientVisits(patientUUID: string): Promise<Bundle<Encounter>>;
|
|
8
|
+
/**
|
|
9
|
+
* Fetches and transforms visits for a given patient UUID
|
|
10
|
+
* @param patientUUID - The UUID of the patient
|
|
11
|
+
* @returns Promise resolving to an array of FhirEncounter
|
|
12
|
+
*/
|
|
13
|
+
export declare function getVisits(patientUUID: string): Promise<Encounter[]>;
|
|
14
|
+
/**
|
|
15
|
+
* Gets the active visit for a patient (encounter with no end date)
|
|
16
|
+
* @param patientUUID - The UUID of the patient
|
|
17
|
+
* @returns Promise resolving to the current FhirEncounter or null if not found
|
|
18
|
+
*/
|
|
19
|
+
export declare function getActiveVisit(patientUUID: string): Promise<Encounter | null>;
|
|
20
|
+
//# sourceMappingURL=encounterService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"encounterService.d.ts","sourceRoot":"","sources":["../../src/encounterService/encounterService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAI5C;;;;GAIG;AACH,wBAAsB,gBAAgB,CACpC,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAE5B;AAED;;;;GAIG;AACH,wBAAsB,SAAS,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC,CAOzE;AAED;;;;GAIG;AACH,wBAAsB,cAAc,CAClC,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,CAG3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/encounterService/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,SAAS,GACV,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/encounterSessionService/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,QAAiC,CAAC;AAEnE,eAAO,MAAM,iCAAiC,QACuB,CAAC;AACtE,eAAO,MAAM,gCAAgC,yCACL,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Encounter } from 'fhir/r4';
|
|
2
|
+
interface EncounterSearchParams {
|
|
3
|
+
patient: string;
|
|
4
|
+
_tag?: string;
|
|
5
|
+
_lastUpdated?: string;
|
|
6
|
+
participant?: string;
|
|
7
|
+
type?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Searches for encounters using FHIR API with given parameters
|
|
11
|
+
* @param params - Search parameters for encounter query
|
|
12
|
+
* @returns Promise resolving to array of FhirEncounter
|
|
13
|
+
*/
|
|
14
|
+
export declare function searchEncounters(params: EncounterSearchParams): Promise<Encounter[]>;
|
|
15
|
+
/**
|
|
16
|
+
* Gets the encounter session duration from global properties
|
|
17
|
+
* @returns Promise resolving to session duration in minutes (default: 30)
|
|
18
|
+
*/
|
|
19
|
+
export declare function getEncounterSessionDuration(): Promise<number>;
|
|
20
|
+
/**
|
|
21
|
+
* Filters encounters to find those belonging to the active visit
|
|
22
|
+
* @param encounters - Array of encounters to filter
|
|
23
|
+
* @param patientUUID - Patient UUID
|
|
24
|
+
* @returns Promise resolving to encounter within active visit or null
|
|
25
|
+
*/
|
|
26
|
+
export declare function filterByActiveVisit(encounters: Encounter[], patientUUID: string): Promise<Encounter | null>;
|
|
27
|
+
/**
|
|
28
|
+
* Finds an active encounter within the session duration for a patient and practitioner
|
|
29
|
+
* @param patientUUID - Patient UUID
|
|
30
|
+
* @param practitionerUUID - Practitioner UUID (optional, for practitioner-specific sessions)
|
|
31
|
+
* @param sessionDurationMinutes - Session duration in minutes (optional, will fetch from config if not provided)
|
|
32
|
+
* @returns Promise resolving to active encounter or null
|
|
33
|
+
*/
|
|
34
|
+
export declare function findActiveEncounterInSession(patientUUID: string, practitionerUUID?: string, sessionDurationMinutes?: number): Promise<Encounter | null>;
|
|
35
|
+
/**
|
|
36
|
+
* Checks if there is an active encounter session for a patient and practitioner
|
|
37
|
+
* @param patientUUID - Patient UUID
|
|
38
|
+
* @param practitionerUUID - Practitioner UUID (optional, for practitioner-specific sessions)
|
|
39
|
+
* @returns Promise resolving to boolean indicating if session is active
|
|
40
|
+
*/
|
|
41
|
+
export declare function hasActiveEncounterSession(patientUUID: string, practitionerUUID?: string): Promise<boolean>;
|
|
42
|
+
export {};
|
|
43
|
+
//# sourceMappingURL=encounterSessionService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"encounterSessionService.d.ts","sourceRoot":"","sources":["../../src/encounterSessionService/encounterSessionService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAU,MAAM,SAAS,CAAC;AAS5C,UAAU,qBAAqB;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;GAIG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,SAAS,EAAE,CAAC,CAkBtB;AAED;;;GAGG;AACH,wBAAsB,2BAA2B,IAAI,OAAO,CAAC,MAAM,CAAC,CAUnE;AAED;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACvC,UAAU,EAAE,SAAS,EAAE,EACvB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,CAkB3B;AAED;;;;;;GAMG;AACH,wBAAsB,4BAA4B,CAChD,WAAW,EAAE,MAAM,EACnB,gBAAgB,CAAC,EAAE,MAAM,EACzB,sBAAsB,CAAC,EAAE,MAAM,GAC9B,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,CAiC3B;AAED;;;;;GAKG;AACH,wBAAsB,yBAAyB,CAC7C,WAAW,EAAE,MAAM,EACnB,gBAAgB,CAAC,EAAE,MAAM,GACxB,OAAO,CAAC,OAAO,CAAC,CAMlB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/encounterSessionService/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/errorHandling/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Formats error messages from different sources
|
|
3
|
+
* @param error - The error to format
|
|
4
|
+
* @returns {title: string, message: string} - The formatted error
|
|
5
|
+
*/
|
|
6
|
+
export declare const getFormattedError: (error: unknown) => {
|
|
7
|
+
title: string;
|
|
8
|
+
message: string;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/errorHandling/utils.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,GAC5B,OAAO,OAAO,KACb;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAmElC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const DEFAULT_LOCALE = "en";
|
|
2
|
+
export declare const LOCALE_STORAGE_KEY = "NG_TRANSLATE_LANG_KEY";
|
|
3
|
+
export declare const BUNDLED_TRANSLATIONS_URL_TEMPLATE: (namespace: string, lang: string) => string;
|
|
4
|
+
export declare const CONFIG_TRANSLATIONS_URL_TEMPLATE: (namespace: string, lang: string) => string;
|
|
5
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/i18n/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,OAAO,CAAC;AACnC,eAAO,MAAM,kBAAkB,0BAA0B,CAAC;AAE1D,eAAO,MAAM,iCAAiC,GAC5C,WAAW,MAAM,EACjB,MAAM,MAAM,WAC6C,CAAC;AAE5D,eAAO,MAAM,gCAAgC,GAC3C,WAAW,MAAM,EACjB,MAAM,MAAM,WACqD,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Initialize i18n with pre-loaded translations for a specific namespace
|
|
3
|
+
* This function should be called before rendering the app
|
|
4
|
+
*
|
|
5
|
+
* @param namespace - The namespace for translations (e.g., 'clinical', 'registration')
|
|
6
|
+
* @returns Initialized i18n instance
|
|
7
|
+
*/
|
|
8
|
+
export declare const initI18n: (namespace: string) => Promise<import('i18next').i18n>;
|
|
9
|
+
export default initI18n;
|
|
10
|
+
//# sourceMappingURL=i18n.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../src/i18n/i18n.ts"],"names":[],"mappings":"AAMA;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,GAAU,WAAW,MAAM,oCAyB/C,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/i18n/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fetches user's preferred locale from the local storage.
|
|
3
|
+
* @returns The user's preferred locale code if valid, or DEFAULT_LOCALE if not found or invalid
|
|
4
|
+
*/
|
|
5
|
+
export declare const getUserPreferredLocale: () => string;
|
|
6
|
+
/**
|
|
7
|
+
* Fetches translations from a URL using the API service.
|
|
8
|
+
* Returns an empty object if the request fails for any reason.
|
|
9
|
+
*
|
|
10
|
+
* @param url - URL to fetch translations from
|
|
11
|
+
* @returns A promise that resolves to a translations object or empty object on failure
|
|
12
|
+
*/
|
|
13
|
+
export declare const getTranslationFile: (url: string) => Promise<Record<string, string>>;
|
|
14
|
+
/**
|
|
15
|
+
* Fetches translations for a specified language and English fallback if needed.
|
|
16
|
+
* This function follows the i18next resource structure where translations are
|
|
17
|
+
* organized by language code and namespace.
|
|
18
|
+
*
|
|
19
|
+
* @param lang - Language code to fetch translations for (e.g., 'en', 'es')
|
|
20
|
+
* @param namespace - Namespace for the translations (e.g., 'clinical', 'registration')
|
|
21
|
+
* @returns Promise resolving to an object with translations keyed by language code
|
|
22
|
+
* @throws Will not throw errors, but will return empty translations on failure
|
|
23
|
+
*/
|
|
24
|
+
export declare const getTranslations: (lang: string, namespace: string) => Promise<Record<string, Record<string, Record<string, string>>>>;
|
|
25
|
+
//# sourceMappingURL=translationService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"translationService.d.ts","sourceRoot":"","sources":["../../src/i18n/translationService.ts"],"names":[],"mappings":"AAQA;;;GAGG;AACH,eAAO,MAAM,sBAAsB,QAAO,MAIzC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,GAC7B,KAAK,MAAM,KACV,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAchC,CAAC;AAiCF;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,GAC1B,MAAM,MAAM,EACZ,WAAW,MAAM,KAChB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAmBhE,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export { get, post, put, del } from './api';
|
|
2
|
+
export { initAppI18n, useTranslation } from './i18n';
|
|
3
|
+
export { getPatientById, getFormattedPatientById, searchPatientByNameOrId, searchPatientByCustomAttribute, getPrimaryIdentifierType, createPatient, createVisit, getActiveVisitByPatient, getIdentifierData, getGenders, getAddressHierarchyEntries, getVisitTypes, getVisitLocationUUID, type FormattedPatientData, type PatientSearchResult, type PatientSearchResultBundle, type IdentifierSource, type IdentifierType, type IdentifierTypesResponse, type CreatePatientRequest, type CreatePatientResponse, type VisitData, type PatientName, type PatientAddress, type PatientIdentifier, type PatientAttribute, type AddressHierarchyEntry, MAX_PATIENT_AGE_YEARS, PHONE_NUMBER_UUID, EMAIL_UUID, ALTERNATE_PHONE_NUMBER_UUID, } from './patientService';
|
|
4
|
+
export { searchAppointmentsByAttribute, updateAppointmentStatus, } from './AppointmentService/appointmmetService';
|
|
5
|
+
export { type Appointment, type AppointmentSearchResult, type Patient, type AppointmentService, type Location, type Reason, } from './AppointmentService/models';
|
|
6
|
+
export { getFormattedError } from './errorHandling';
|
|
7
|
+
export { capitalize, generateId, getCookieByName, isStringEmpty, getPriorityByOrder, groupByDate, filterReplacementEntries, refreshQueries, parseQueryParams, formatUrl, } from './utils';
|
|
8
|
+
export { type FormatDateResult, calculateAge, formatDateTime, formatDate, formatDateDistance, calculateOnsetDate, sortByDate, DATE_FORMAT, DATE_PICKER_INPUT_FORMAT, DATE_TIME_FORMAT, ISO_DATE_FORMAT, FULL_MONTH_DATE_FORMAT, getTodayDate, calculateAgeinYearsAndMonths, formatDateAndTime, dateComparator, } from './date';
|
|
9
|
+
export { type Notification, notificationService } from './notification';
|
|
10
|
+
export { type FormattedAllergy, AllergyStatus, AllergySeverity, type AllergenType, getAllergies, getFormattedAllergies, fetchAndFormatAllergenConcepts, fetchReactionConcepts, } from './allergyService';
|
|
11
|
+
export { getConditions, type ConditionInputEntry } from './conditionService';
|
|
12
|
+
export { getPatientDiagnoses, type Diagnosis, type DiagnosisInputEntry, type DiagnosesByDate, } from './diagnosesService';
|
|
13
|
+
export { searchConcepts, searchFHIRConcepts, searchFHIRConceptsByName, type ConceptSearch, type ConceptClass, } from './conceptService';
|
|
14
|
+
export { getPatientMedications, getPatientMedicationBundle, type FormattedMedicationRequest, type MedicationRequest, MedicationStatus, } from './medicationRequestService';
|
|
15
|
+
export { getPatientRadiologyInvestigations, getPatientRadiologyInvestigationBundle, type RadiologyInvestigation, } from './radiologyInvestigationService';
|
|
16
|
+
export { getPatientLabTestsBundle, getPatientLabInvestigations, groupLabTestsByDate, type FormattedLabTest, LabTestPriority, type LabTestsByDate, } from './labInvestigationService';
|
|
17
|
+
export { getFlattenedInvestigations, type FlattenedInvestigations, type OrderType, type OrderTypeResponse, } from './investigationService';
|
|
18
|
+
export { getClinicalConfig, getDashboardConfig, getMedicationConfig, getRegistrationConfig, type ClinicalConfig, type DashboardConfig, type MedicationJSONConfig, type DashboardSectionConfig, type Dashboard, type Frequency, type RegistrationConfig, type PatientSearchConfig, type PatientSearchField, type SearchActionConfig, } from './configService';
|
|
19
|
+
export { getCurrentUser, getUserLoginLocation, type User } from './userService';
|
|
20
|
+
export { USER_PINNED_PREFERENCE_URL } from './constants/app';
|
|
21
|
+
export { getCurrentProvider, type Provider, type Person, } from './providerService';
|
|
22
|
+
export { findActiveEncounterInSession } from './encounterSessionService';
|
|
23
|
+
export { getActiveVisit } from './encounterService';
|
|
24
|
+
export { dispatchAuditEvent, AUDIT_LOG_EVENT_DETAILS, initializeAuditListener, type AuditEventType, logAuditEvent, } from './auditLogService';
|
|
25
|
+
export { HL7_CONDITION_CLINICAL_STATUS_CODE_SYSTEM, HL7_CONDITION_VERIFICATION_STATUS_CODE_SYSTEM, HL7_CONDITION_CATEGORY_CODE_SYSTEM, HL7_CONDITION_CATEGORY_CONDITION_CODE, HL7_CONDITION_CATEGORY_DIAGNOSIS_CODE, FHIR_ENCOUNTER_TYPE_CODE_SYSTEM, } from './constants/fhir';
|
|
26
|
+
export { OPENMRS_REST_V1, OPENMRS_FHIR_R4, BAHMNI_HOME_PATH, } from './constants/app';
|
|
27
|
+
export { getCurrentUserPrivileges, hasPrivilege, type UserPrivilege, } from './privilegeService';
|
|
28
|
+
export { fetchObservationForms, type ObservationForm, type FormApiResponse, type ApiNameTranslation, type FormPrivilege, type ApiFormPrivilege, } from './observationFormsService';
|
|
29
|
+
export { getVitalFlowSheetData, type VitalFlowSheetData, type VitalFlowSheetConceptDetail, } from './vitalFlowSheetService';
|
|
30
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;A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