@bahmni/services 0.0.1-dev.190 → 0.0.1-dev.191
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"documentReferenceService.d.ts","sourceRoot":"","sources":["../../src/documentReferenceService/documentReferenceService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAGpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"documentReferenceService.d.ts","sourceRoot":"","sources":["../../src/documentReferenceService/documentReferenceService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAGpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAsC7C;;;;;;GAMG;AACH,wBAAsB,qBAAqB,CACzC,WAAW,EAAE,MAAM,EACnB,cAAc,CAAC,EAAE,MAAM,EAAE,GACxB,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,CAGpC;AAED;;;;;;GAMG;AACH,wBAAsB,8BAA8B,CAClD,WAAW,EAAE,MAAM,EACnB,cAAc,CAAC,EAAE,MAAM,EAAE,GACxB,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAM9B"}
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interface representing a single attachment within a document
|
|
3
|
+
*/
|
|
4
|
+
export interface Attachment {
|
|
5
|
+
readonly url: string;
|
|
6
|
+
readonly contentType?: string;
|
|
7
|
+
}
|
|
1
8
|
/**
|
|
2
9
|
* Interface representing a formatted document for easier consumption by components
|
|
3
10
|
*/
|
|
@@ -9,5 +16,6 @@ export interface DocumentViewModel {
|
|
|
9
16
|
readonly uploadedBy?: string;
|
|
10
17
|
readonly contentType?: string;
|
|
11
18
|
readonly documentUrl: string;
|
|
19
|
+
readonly attachments: Attachment[];
|
|
12
20
|
}
|
|
13
21
|
//# sourceMappingURL=models.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/documentReferenceService/models.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/documentReferenceService/models.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,WAAW,EAAE,UAAU,EAAE,CAAC;CACpC"}
|
package/dist/index.js
CHANGED
|
@@ -12433,15 +12433,16 @@ const Dn = "consultation:saved", Jw = (e) => {
|
|
|
12433
12433
|
};
|
|
12434
12434
|
function ty(e) {
|
|
12435
12435
|
return e.filter((t) => t.resource?.resourceType === "DocumentReference").map((t) => {
|
|
12436
|
-
const r = t.resource, n = r.
|
|
12436
|
+
const r = t.resource, n = r.masterIdentifier?.value ?? r.id ?? "", s = (r.content ?? []).map((o) => o.attachment).filter((o) => !!o).map((o) => ({ url: o.url ?? "", contentType: o.contentType })), a = s[0];
|
|
12437
12437
|
return {
|
|
12438
|
-
id: r.id ??
|
|
12439
|
-
documentIdentifier:
|
|
12438
|
+
id: r.id ?? n,
|
|
12439
|
+
documentIdentifier: n,
|
|
12440
12440
|
documentType: r.type?.coding?.[0]?.display ?? r.category?.[0]?.coding?.[0]?.display,
|
|
12441
12441
|
uploadedOn: r.date ?? "",
|
|
12442
12442
|
uploadedBy: r.author?.[0]?.display,
|
|
12443
|
-
contentType:
|
|
12444
|
-
documentUrl:
|
|
12443
|
+
contentType: a?.contentType,
|
|
12444
|
+
documentUrl: a?.url ?? "",
|
|
12445
|
+
attachments: s
|
|
12445
12446
|
};
|
|
12446
12447
|
});
|
|
12447
12448
|
}
|