@bahmni/services 0.0.1-dev.369 → 0.0.1-dev.372

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.
@@ -1,5 +1,8 @@
1
+ import { Encounter } from 'fhir/r4';
2
+ export declare const FHIR_VISIT_TYPE_SYSTEM = "http://fhir.openmrs.org/code-system/visit-type";
1
3
  export declare const VISIT_TYPES_URL: () => string;
2
4
  export declare const CREATE_VISIT_URL: string;
3
5
  export declare const GET_ACTIVE_VISIT_URL: (patientUuid: string) => string;
4
6
  export declare const GET_VISIT_LOCATION: (loginLocation: string) => string;
7
+ export declare const createFhirEncounterResource: (patientUuid: string, locationUuid: string, visitTypeUuid: string, episodeUuid?: string, endTime?: string) => Encounter;
5
8
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/visitService/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,cAE8C,CAAC;AAE3E,eAAO,MAAM,gBAAgB,QAC6B,CAAC;AAE3D,eAAO,MAAM,oBAAoB,GAAI,aAAa,MAAM,WAEoD,CAAC;AAE7G,eAAO,MAAM,kBAAkB,GAAI,eAAe,MAAM,WACQ,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/visitService/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAOzC,eAAO,MAAM,sBAAsB,mDACe,CAAC;AAEnD,eAAO,MAAM,eAAe,cAE8C,CAAC;AAE3E,eAAO,MAAM,gBAAgB,QAC6B,CAAC;AAE3D,eAAO,MAAM,oBAAoB,GAAI,aAAa,MAAM,WAEoD,CAAC;AAE7G,eAAO,MAAM,kBAAkB,GAAI,eAAe,MAAM,WACQ,CAAC;AAEjE,eAAO,MAAM,2BAA2B,GACtC,aAAa,MAAM,EACnB,cAAc,MAAM,EACpB,eAAe,MAAM,EACrB,cAAc,MAAM,EACpB,UAAU,MAAM,KACf,SA2CD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Encounter } from 'fhir/r4';
2
+ export declare function createVisitWithFhirR4(patientUuid: string, locationUuid: string, visitTypeUuid: string, episodeUuid?: string, endTime?: string): Promise<Encounter>;
3
+ //# sourceMappingURL=fhirVisitService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fhirVisitService.d.ts","sourceRoot":"","sources":["../../src/visitService/fhirVisitService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAMzC,wBAAsB,qBAAqB,CACzC,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,MAAM,EACrB,WAAW,CAAC,EAAE,MAAM,EACpB,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,SAAS,CAAC,CASpB"}
@@ -1,3 +1,4 @@
1
1
  export type { VisitType, VisitTypes, VisitData, ActiveVisit } from './models';
2
- export { getVisitTypes, checkIfActiveVisitExists, createVisitForPatient, getActiveVisitByPatient, } from './visitService';
2
+ export { getVisitTypes, checkIfActiveVisitExists, createVisitForPatient, getActiveVisitByPatient, getVisitLocationUUID, } from './visitService';
3
+ export { createVisitWithFhirR4 } from './fhirVisitService';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/visitService/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC9E,OAAO,EACL,aAAa,EACb,wBAAwB,EACxB,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/visitService/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC9E,OAAO,EACL,aAAa,EACb,wBAAwB,EACxB,qBAAqB,EACrB,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC"}
@@ -1,4 +1,4 @@
1
- import { ActiveVisit, CreatedVisit, VisitType, VisitTypes } from './models';
1
+ import { ActiveVisit, CreatedVisit, VisitLocationResponse, VisitType, VisitTypes } from './models';
2
2
  /**
3
3
  * Fetches visit types from Bahmni configuration
4
4
  * @returns Promise<VisitTypes> - Visit types response with name-uuid mapping
@@ -10,6 +10,12 @@ export declare const getVisitTypes: () => Promise<VisitTypes>;
10
10
  * @returns Promise<{results: Array<{uuid: string}>}> - The active visit data
11
11
  */
12
12
  export declare const getActiveVisitByPatient: (patientUuid: string) => Promise<ActiveVisit>;
13
+ /**
14
+ * Get visit location UUID for a given login location
15
+ * @param loginLocation - The login location UUID
16
+ * @returns Promise<VisitLocationResponse> - The visit location details including UUID
17
+ */
18
+ export declare const getVisitLocationUUID: (loginLocation: string) => Promise<VisitLocationResponse>;
13
19
  /**
14
20
  * Checks if a patient has an active visit
15
21
  * @param patientUuid - The UUID of the patient
@@ -1 +1 @@
1
- {"version":3,"file":"visitService.d.ts","sourceRoot":"","sources":["../../src/visitService/visitService.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EACV,WAAW,EACX,YAAY,EAGZ,SAAS,EACT,UAAU,EACX,MAAM,UAAU,CAAC;AAElB;;;GAGG;AACH,eAAO,MAAM,aAAa,QAAa,OAAO,CAAC,UAAU,CAExD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,GAClC,aAAa,MAAM,KAClB,OAAO,CAAC,WAAW,CAErB,CAAC;AAsBF;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,GACnC,aAAa,MAAM,KAClB,OAAO,CAAC,OAAO,CAGjB,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,GAChC,aAAa,MAAM,EACnB,WAAW,SAAS,KACnB,OAAO,CAAC,YAAY,CAqBtB,CAAC"}
1
+ {"version":3,"file":"visitService.d.ts","sourceRoot":"","sources":["../../src/visitService/visitService.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EACV,WAAW,EACX,YAAY,EAEZ,qBAAqB,EACrB,SAAS,EACT,UAAU,EACX,MAAM,UAAU,CAAC;AAElB;;;GAGG;AACH,eAAO,MAAM,aAAa,QAAa,OAAO,CAAC,UAAU,CAExD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,GAClC,aAAa,MAAM,KAClB,OAAO,CAAC,WAAW,CAErB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAC/B,eAAe,MAAM,KACpB,OAAO,CAAC,qBAAqB,CAE/B,CAAC;AAWF;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,GACnC,aAAa,MAAM,KAClB,OAAO,CAAC,OAAO,CAGjB,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,GAChC,aAAa,MAAM,EACnB,WAAW,SAAS,KACnB,OAAO,CAAC,YAAY,CAqBtB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bahmni/services",
3
- "version": "0.0.1-dev.369",
3
+ "version": "0.0.1-dev.372",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",