@bahmni/services 0.0.1-dev.93 → 0.0.1-dev.96

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,4 +1,4 @@
1
- export { getFlattenedInvestigations, getOrderTypes, } from './investigationService';
1
+ export { getFlattenedInvestigations, getOrderTypes, getCategoryUuidFromOrderTypes, } from './investigationService';
2
2
  export { type FlattenedInvestigations, type OrderType, type OrderTypeResponse, } from './model';
3
3
  export { ORDER_TYPE_QUERY_KEY } from './constants';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/investigationService/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAC1B,aAAa,GACd,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,SAAS,EACd,KAAK,iBAAiB,GACvB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/investigationService/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAC1B,aAAa,EACb,6BAA6B,GAC9B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,SAAS,EACd,KAAK,iBAAiB,GACvB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { FlattenedInvestigations, OrderTypeResponse } from './model';
2
2
  export declare const getOrderTypes: () => Promise<OrderTypeResponse>;
3
3
  export declare const getFlattenedInvestigations: () => Promise<FlattenedInvestigations[]>;
4
+ export declare const getCategoryUuidFromOrderTypes: (categoryName: string | undefined) => Promise<string | undefined>;
4
5
  //# sourceMappingURL=investigationService.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"investigationService.d.ts","sourceRoot":"","sources":["../../src/investigationService/investigationService.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,uBAAuB,EAAa,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAMhF,eAAO,MAAM,aAAa,QAAa,OAAO,CAAC,iBAAiB,CAE/D,CAAC;AA+EF,eAAO,MAAM,0BAA0B,QAAa,OAAO,CACzD,uBAAuB,EAAE,CAK1B,CAAC"}
1
+ {"version":3,"file":"investigationService.d.ts","sourceRoot":"","sources":["../../src/investigationService/investigationService.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,uBAAuB,EAAa,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAOhF,eAAO,MAAM,aAAa,QAAa,OAAO,CAAC,iBAAiB,CAE/D,CAAC;AA+EF,eAAO,MAAM,0BAA0B,QAAa,OAAO,CACzD,uBAAuB,EAAE,CAK1B,CAAC;AAEF,eAAO,MAAM,6BAA6B,GACxC,cAAc,MAAM,GAAG,SAAS,KAC/B,OAAO,CAAC,MAAM,GAAG,SAAS,CAO5B,CAAC"}
@@ -1,2 +1,2 @@
1
- export declare const SERVICE_REQUESTS_URL: (category: string, patientUuid: string, encounterUuids?: string, numberOfVisits?: number) => string;
1
+ export declare const SERVICE_REQUESTS_URL: (category: string, patientUuid: string, encounterUuids?: string, numberOfVisits?: number, revinclude?: string) => string;
2
2
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/orderRequestService/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,GAC/B,UAAU,MAAM,EAChB,aAAa,MAAM,EACnB,iBAAiB,MAAM,EACvB,iBAAiB,MAAM,WAYxB,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/orderRequestService/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,GAC/B,UAAU,MAAM,EAChB,aAAa,MAAM,EACnB,iBAAiB,MAAM,EACvB,iBAAiB,MAAM,EACvB,aAAa,MAAM,WAgBpB,CAAC"}
@@ -1,11 +1,12 @@
1
- import { Bundle, ServiceRequest } from 'fhir/r4';
1
+ import { Bundle, ServiceRequest, Resource } from 'fhir/r4';
2
2
  /**
3
3
  * Fetches service requests from the FHIR R4 endpoint
4
4
  * @param category - Optional category UUID to filter by
5
5
  * @param patientUuid - Patient UUID to filter by
6
6
  * @param encounterUuids - Optional encounter UUIDs to filter by
7
7
  * @param numberOfVisits
8
+ * @param revinclude - Optional _revinclude parameter for related resources
8
9
  * @returns Promise resolving to ServiceRequest Bundle
9
10
  */
10
- export declare function getServiceRequests(category: string, patientUuid: string, encounterUuids?: string[], numberOfVisits?: number): Promise<Bundle<ServiceRequest>>;
11
+ export declare function getServiceRequests<T extends Resource = ServiceRequest>(category: string, patientUuid: string, encounterUuids?: string[], numberOfVisits?: number, revinclude?: string): Promise<Bundle<T>>;
11
12
  //# sourceMappingURL=orderRequestService.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"orderRequestService.d.ts","sourceRoot":"","sources":["../../src/orderRequestService/orderRequestService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAItD;;;;;;;GAOG;AACH,wBAAsB,kBAAkB,CACtC,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,cAAc,CAAC,EAAE,MAAM,EAAE,EACzB,cAAc,CAAC,EAAE,MAAM,GACtB,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAejC"}
1
+ {"version":3,"file":"orderRequestService.d.ts","sourceRoot":"","sources":["../../src/orderRequestService/orderRequestService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAIhE;;;;;;;;GAQG;AACH,wBAAsB,kBAAkB,CAAC,CAAC,SAAS,QAAQ,GAAG,cAAc,EAC1E,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,cAAc,CAAC,EAAE,MAAM,EAAE,EACzB,cAAc,CAAC,EAAE,MAAM,EACvB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAgBpB"}
@@ -1,17 +1,10 @@
1
- import { Bundle, ServiceRequest } from 'fhir/r4';
2
- import { RadiologyInvestigation } from '../models';
1
+ import { Bundle, ServiceRequest, ImagingStudy } from 'fhir/r4';
3
2
  export declare const mockPatientUUID = "c81876c3-b464-486a-9ebf-20eea9431fb1";
4
- export declare const mockFhirRadiologyTests: ServiceRequest[];
5
- export declare const mockRadiologyTestBasic: ServiceRequest;
6
- export declare const mockRadiologyTestWithMultipleReplaces: ServiceRequest;
7
- export declare const mockRadiologyTestWithEmptyReplaces: ServiceRequest;
8
- export declare const mockFhirRadiologyBundle: Bundle;
9
- export declare const mockFormattedRadiologyInvestigations: RadiologyInvestigation[];
10
- export declare const mockRadiologyInvestigationWithReplaces: RadiologyInvestigation;
11
- export declare const mockRadiologyInvestigationReplaced: RadiologyInvestigation;
12
- export declare const mockRadiologyInvestigationStandalone: RadiologyInvestigation;
13
- export declare const mockRadiologyInvestigationsForFiltering: RadiologyInvestigation[];
14
- export declare const mockRadiologyInvestigationWithMultipleReplaces: RadiologyInvestigation;
15
- export declare const mockRadiologyChainReplacement: RadiologyInvestigation[];
16
- export declare const createMockRadiologyInvestigation: (id: string, testName: string, priority: string, replaces?: string[]) => RadiologyInvestigation;
3
+ export declare const mockPatientIdentifier = "PA000001";
4
+ export declare const mockRadiologyInvestigations: ServiceRequest[];
5
+ export declare const mockRadiologyInvestigationBundle: Bundle;
6
+ export declare const mockEmptyRadiologyInvestigationBundle: Bundle;
7
+ export declare const mockMalformedBundle: Bundle;
8
+ export declare const mockImagingStudies: ImagingStudy[];
9
+ export declare const mockRadiologyInvestigationBundleWithImagingStudy: Bundle<ServiceRequest | ImagingStudy>;
17
10
  //# sourceMappingURL=mocks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mocks.d.ts","sourceRoot":"","sources":["../../../src/radiologyInvestigationService/__mocks__/mocks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAGnD,eAAO,MAAM,eAAe,yCAAyC,CAAC;AAGtE,eAAO,MAAM,sBAAsB,EAAE,cAAc,EAkMlD,CAAC;AAGF,eAAO,MAAM,sBAAsB,EAAE,cAgBpC,CAAC;AAEF,eAAO,MAAM,qCAAqC,EAAE,cA0BnD,CAAC;AAEF,eAAO,MAAM,kCAAkC,EAAE,cAsBhD,CAAC;AAGF,eAAO,MAAM,uBAAuB,EAAE,MAkBrC,CAAC;AAGF,eAAO,MAAM,oCAAoC,EAAE,sBAAsB,EAuBxE,CAAC;AAGF,eAAO,MAAM,sCAAsC,EAAE,sBAOpD,CAAC;AAEF,eAAO,MAAM,kCAAkC,EAAE,sBAMhD,CAAC;AAEF,eAAO,MAAM,oCAAoC,EAAE,sBAMlD,CAAC;AAGF,eAAO,MAAM,uCAAuC,EAAE,sBAAsB,EAKzE,CAAC;AAEJ,eAAO,MAAM,8CAA8C,EAAE,sBAQ1D,CAAC;AAGJ,eAAO,MAAM,6BAA6B,EAAE,sBAAsB,EA+BjE,CAAC;AAGF,eAAO,MAAM,gCAAgC,GAC3C,IAAI,MAAM,EACV,UAAU,MAAM,EAChB,UAAU,MAAM,EAChB,WAAW,MAAM,EAAE,KAClB,sBAOD,CAAC"}
1
+ {"version":3,"file":"mocks.d.ts","sourceRoot":"","sources":["../../../src/radiologyInvestigationService/__mocks__/mocks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAG/D,eAAO,MAAM,eAAe,yCAAyC,CAAC;AACtE,eAAO,MAAM,qBAAqB,aAAa,CAAC;AAGhD,eAAO,MAAM,2BAA2B,EAAE,cAAc,EAkMvD,CAAC;AAGF,eAAO,MAAM,gCAAgC,EAAE,MAkB9C,CAAC;AAEF,eAAO,MAAM,qCAAqC,EAAE,MAKnD,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,MAcjC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,YAAY,EA2D5C,CAAC;AAEF,eAAO,MAAM,gDAAgD,EAAE,MAAM,CACnE,cAAc,GAAG,YAAY,CAyB9B,CAAC"}
@@ -1,3 +1,2 @@
1
- export { getPatientRadiologyInvestigations } from './radiologyInvestigationService';
2
- export { type RadiologyInvestigation } from './models';
1
+ export { getPatientRadiologyInvestigations, getPatientRadiologyInvestigationBundle, getPatientRadiologyInvestigationBundleWithImagingStudy, } from './radiologyInvestigationService';
3
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/radiologyInvestigationService/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iCAAiC,EAAE,MAAM,iCAAiC,CAAC;AACpF,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/radiologyInvestigationService/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iCAAiC,EACjC,sCAAsC,EACtC,sDAAsD,GACvD,MAAM,iCAAiC,CAAC"}
@@ -1,4 +1,22 @@
1
- import { RadiologyInvestigation } from './models';
1
+ import { Bundle, ServiceRequest, ImagingStudy } from 'fhir/r4';
2
+ /**
3
+ * Fetches radiology investigations for a given patient UUID from the FHIR R4 endpoint
4
+ * @param patientUUID - The UUID of the patient
5
+ * @param category - The category of the investigations
6
+ * @param encounterUuids - Optional array of encounter UUIDs to filter the investigations
7
+ * @param numberOfVisits - Optional number of visits to consider
8
+ * @returns Promise resolving to a Bundle containing radiology investigations
9
+ */
10
+ export declare function getPatientRadiologyInvestigationBundle(patientUUID: string, category: string, encounterUuids?: string[], numberOfVisits?: number): Promise<Bundle<ServiceRequest>>;
11
+ /**
12
+ * Fetches radiology investigations bundle with ImagingStudy resources included
13
+ * @param patientUUID - The UUID of the patient
14
+ * @param category - The category of the investigations
15
+ * @param encounterUuids - Optional array of encounter UUIDs to filter the investigations
16
+ * @param numberOfVisits - Optional number of visits to consider
17
+ * @returns Promise resolving to a Bundle containing both ServiceRequest and ImagingStudy resources
18
+ */
19
+ export declare function getPatientRadiologyInvestigationBundleWithImagingStudy(patientUUID: string, category: string, encounterUuids?: string[], numberOfVisits?: number): Promise<Bundle<ServiceRequest | ImagingStudy>>;
2
20
  /**
3
21
  * Fetches and formats radiology investigations for a given patient UUID
4
22
  * @param patientUUID - The UUID of the patient
@@ -7,5 +25,5 @@ import { RadiologyInvestigation } from './models';
7
25
  * @param numberOfVisits
8
26
  * @returns Promise resolving to an array of radiology investigations
9
27
  */
10
- export declare function getPatientRadiologyInvestigations(patientUUID: string, category: string, encounterUuids?: string[], numberOfVisits?: number): Promise<RadiologyInvestigation[]>;
28
+ export declare function getPatientRadiologyInvestigations(patientUUID: string, category: string, encounterUuids?: string[], numberOfVisits?: number): Promise<ServiceRequest[]>;
11
29
  //# sourceMappingURL=radiologyInvestigationService.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"radiologyInvestigationService.d.ts","sourceRoot":"","sources":["../../src/radiologyInvestigationService/radiologyInvestigationService.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AA2ClD;;;;;;;GAOG;AACH,wBAAsB,iCAAiC,CACrD,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,EAChB,cAAc,CAAC,EAAE,MAAM,EAAE,EACzB,cAAc,CAAC,EAAE,MAAM,GACtB,OAAO,CAAC,sBAAsB,EAAE,CAAC,CAQnC"}
1
+ {"version":3,"file":"radiologyInvestigationService.d.ts","sourceRoot":"","sources":["../../src/radiologyInvestigationService/radiologyInvestigationService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAG/D;;;;;;;GAOG;AACH,wBAAsB,sCAAsC,CAC1D,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,EAChB,cAAc,CAAC,EAAE,MAAM,EAAE,EACzB,cAAc,CAAC,EAAE,MAAM,GACtB,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAOjC;AAED;;;;;;;GAOG;AACH,wBAAsB,sDAAsD,CAC1E,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,EAChB,cAAc,CAAC,EAAE,MAAM,EAAE,EACzB,cAAc,CAAC,EAAE,MAAM,GACtB,OAAO,CAAC,MAAM,CAAC,cAAc,GAAG,YAAY,CAAC,CAAC,CAQhD;AAED;;;;;;;GAOG;AACH,wBAAsB,iCAAiC,CACrD,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,EAChB,cAAc,CAAC,EAAE,MAAM,EAAE,EACzB,cAAc,CAAC,EAAE,MAAM,GACtB,OAAO,CAAC,cAAc,EAAE,CAAC,CAY3B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bahmni/services",
3
- "version": "0.0.1-dev.93",
3
+ "version": "0.0.1-dev.96",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -1,13 +0,0 @@
1
- /**
2
- * Interface for formatted radiology investigation data for display purposes
3
- */
4
- export interface RadiologyInvestigation {
5
- id: string;
6
- testName: string;
7
- priority: string;
8
- orderedBy: string;
9
- orderedDate: string;
10
- replaces?: string[];
11
- note?: string;
12
- }
13
- //# sourceMappingURL=models.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/radiologyInvestigationService/models.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,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,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}