@bahmni/services 0.0.1-dev.299 → 0.0.1-dev.301
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.
|
@@ -21,9 +21,10 @@ export interface ConditionPage {
|
|
|
21
21
|
* @param patientUUID - The UUID of the patient
|
|
22
22
|
* @param count - Number of items per page (default 10)
|
|
23
23
|
* @param page - 1-based page number (default 1)
|
|
24
|
+
* @param clinicalStatus - Optional FHIR clinical-status filter: 'active' or 'inactive'. When omitted, all conditions are returned.
|
|
24
25
|
* @returns Promise resolving to a ConditionPage with conditions and total count
|
|
25
26
|
*/
|
|
26
|
-
export declare function getConditionPage(patientUUID: string, count?: number, page?: number): Promise<ConditionPage>;
|
|
27
|
+
export declare function getConditionPage(patientUUID: string, count?: number, page?: number, clinicalStatus?: 'active' | 'inactive'): Promise<ConditionPage>;
|
|
27
28
|
/**
|
|
28
29
|
* Marks a condition as inactive via FHIR PUT.
|
|
29
30
|
* Preserves all existing fields from the raw resource; only clinicalStatus is changed.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conditionService.d.ts","sourceRoot":"","sources":["../../src/conditionService/conditionService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAS5C;;;;GAIG;AACH,wBAAsB,mBAAmB,CACvC,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,MAAM,CAAC,CAEjB;AAED;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC,CAQ7E;AAED,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B;AAED
|
|
1
|
+
{"version":3,"file":"conditionService.d.ts","sourceRoot":"","sources":["../../src/conditionService/conditionService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAS5C;;;;GAIG;AACH,wBAAsB,mBAAmB,CACvC,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,MAAM,CAAC,CAEjB;AAED;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC,CAQ7E;AAED,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B;AAED;;;;;;;;GAQG;AACH,wBAAsB,gBAAgB,CACpC,WAAW,EAAE,MAAM,EACnB,KAAK,GAAE,MAAW,EAClB,IAAI,GAAE,MAAU,EAChB,cAAc,CAAC,EAAE,QAAQ,GAAG,UAAU,GACrC,OAAO,CAAC,aAAa,CAAC,CAaxB;AAED;;;;;GAKG;AACH,wBAAsB,uBAAuB,CAC3C,SAAS,EAAE,SAAS,GACnB,OAAO,CAAC,SAAS,CAAC,CAkBpB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const CONDITION_RESOURCE_URL: string;
|
|
2
2
|
export declare const PATIENT_CONDITION_RESOURCE_URL: (patientUUID: string) => string;
|
|
3
|
-
export declare const PATIENT_CONDITION_PAGE_URL: (patientUUID: string, count?: number, offset?: number) => string;
|
|
3
|
+
export declare const PATIENT_CONDITION_PAGE_URL: (patientUUID: string, count?: number, offset?: number, clinicalStatus?: "active" | "inactive") => string;
|
|
4
4
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/conditionService/constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,sBAAsB,QAAiC,CAAC;AAGrE,eAAO,MAAM,8BAA8B,GAAI,aAAa,MAAM,WAEoD,CAAC;AAGvH,eAAO,MAAM,0BAA0B,GACrC,aAAa,MAAM,EACnB,QAAO,MAAW,EAClB,SAAQ,MAAU,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/conditionService/constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,sBAAsB,QAAiC,CAAC;AAGrE,eAAO,MAAM,8BAA8B,GAAI,aAAa,MAAM,WAEoD,CAAC;AAGvH,eAAO,MAAM,0BAA0B,GACrC,aAAa,MAAM,EACnB,QAAO,MAAW,EAClB,SAAQ,MAAU,EAClB,iBAAiB,QAAQ,GAAG,UAAU,WAMvC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -7836,20 +7836,23 @@ function HE(t) {
|
|
|
7836
7836
|
const BE = "http://fhir.openmrs.org/code-system/encounter-type", zE = "http://terminology.hl7.org/CodeSystem/v3-ActCode", YE = "http://fhir.openmrs.org/ext/encounter-tag", Di = "problem-list-item", GE = "http://terminology.hl7.org/CodeSystem/condition-ver-status", Ci = "encounter-diagnosis", Gh = "http://terminology.hl7.org/CodeSystem/condition-clinical", KE = "http://terminology.hl7.org/CodeSystem/condition-category", WE = "http://fhir.bahmni.org/ext/lab-order-concept-type", JE = "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", QE = "http://fhir.bahmni.org/ext/observation/form-namespace-path", XE = "http://fhir.bahmni.org/ext/observation/obs-value-attachment", ZE = "Numeric", eb = "Complex", tb = "final", rb = "Observation", nb = /^\d{4}-\d{2}-\d{2}/, Kh = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/, sb = {
|
|
7837
7837
|
ABNORMAL: { code: "A", display: "Abnormal" },
|
|
7838
7838
|
NORMAL: { code: "N", display: "Normal" }
|
|
7839
|
-
}, Wh = ae + "/Condition", Jh = (t) => ae + `/Condition?category=${Di}&patient=${t}&_count=100&_sort=-_lastUpdated`, Qh = (t, e = 10, r = 0) =>
|
|
7839
|
+
}, Wh = ae + "/Condition", Jh = (t) => ae + `/Condition?category=${Di}&patient=${t}&_count=100&_sort=-_lastUpdated`, Qh = (t, e = 10, r = 0, n) => {
|
|
7840
|
+
const s = ae + `/Condition?category=${Di}&patient=${t}&_count=${e}&_getpagesoffset=${r}&_sort=-_lastUpdated`;
|
|
7841
|
+
return n ? `${s}&clinical-status=${n}` : s;
|
|
7842
|
+
};
|
|
7840
7843
|
async function Xh(t) {
|
|
7841
7844
|
return await H(`${Jh(t)}`);
|
|
7842
7845
|
}
|
|
7843
7846
|
async function ob(t) {
|
|
7844
7847
|
return (await Xh(t)).entry?.filter((n) => n.resource?.resourceType === "Condition").map((n) => n.resource) ?? [];
|
|
7845
7848
|
}
|
|
7846
|
-
async function ab(t, e = 10, r = 1) {
|
|
7847
|
-
const
|
|
7848
|
-
Qh(t, e, n)
|
|
7849
|
+
async function ab(t, e = 10, r = 1, n) {
|
|
7850
|
+
const s = (r - 1) * e, o = await H(
|
|
7851
|
+
Qh(t, e, s, n)
|
|
7849
7852
|
);
|
|
7850
7853
|
return {
|
|
7851
|
-
conditions:
|
|
7852
|
-
total:
|
|
7854
|
+
conditions: o.entry?.filter((i) => i.resource?.resourceType === "Condition").map((i) => i.resource) ?? [],
|
|
7855
|
+
total: o.total
|
|
7853
7856
|
};
|
|
7854
7857
|
}
|
|
7855
7858
|
async function ib(t) {
|