@imranq2/fhirpatientsummary 1.0.36 → 1.0.37
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/dist/index.cjs +91 -5
- package/dist/index.js +91 -5
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -923,6 +923,18 @@ var TemplateUtilities = class {
|
|
|
923
923
|
}
|
|
924
924
|
return "";
|
|
925
925
|
}
|
|
926
|
+
/**
|
|
927
|
+
* Returns the owner tag from the resource meta.security array.
|
|
928
|
+
* @param resource - FHIR resource with meta tag
|
|
929
|
+
* @returns The owner display or code if found, otherwise undefined
|
|
930
|
+
*/
|
|
931
|
+
getOwnerTag(resource) {
|
|
932
|
+
if (!resource?.meta?.security) return "";
|
|
933
|
+
const ownerEntry = resource.meta.security.find(
|
|
934
|
+
(sec) => sec.system === "https://www.icanbwell.com/owner" && !!sec.code
|
|
935
|
+
);
|
|
936
|
+
return ownerEntry?.display || ownerEntry?.code;
|
|
937
|
+
}
|
|
926
938
|
/**
|
|
927
939
|
* Public method to render plain text as HTML, escaping special characters and replacing newlines with <br />.
|
|
928
940
|
* This method should be used whenever displaying user-supplied or FHIR resource text in HTML to prevent XSS vulnerabilities
|
|
@@ -1858,6 +1870,7 @@ var AllergyIntoleranceTemplate = class _AllergyIntoleranceTemplate {
|
|
|
1858
1870
|
<th>Code (System)</th>
|
|
1859
1871
|
<th>Criticality</th>
|
|
1860
1872
|
<th>Recorded Date</th>
|
|
1873
|
+
<th>Source</th>
|
|
1861
1874
|
</tr>
|
|
1862
1875
|
</thead>
|
|
1863
1876
|
<tbody>`;
|
|
@@ -1877,6 +1890,9 @@ var AllergyIntoleranceTemplate = class _AllergyIntoleranceTemplate {
|
|
|
1877
1890
|
case "Recorded Date":
|
|
1878
1891
|
data["recordedDate"] = templateUtilities.renderTextAsHtml(columnData.text?.div ?? "");
|
|
1879
1892
|
break;
|
|
1893
|
+
case "Source":
|
|
1894
|
+
data["source"] = templateUtilities.renderTextAsHtml(columnData.text?.div ?? "");
|
|
1895
|
+
break;
|
|
1880
1896
|
default:
|
|
1881
1897
|
break;
|
|
1882
1898
|
}
|
|
@@ -1891,6 +1907,7 @@ var AllergyIntoleranceTemplate = class _AllergyIntoleranceTemplate {
|
|
|
1891
1907
|
<td>${data["codeSystem"] ?? ""}</td>
|
|
1892
1908
|
<td>${data["criticality"] ?? ""}</td>
|
|
1893
1909
|
<td>${templateUtilities.renderTime(data["recordedDate"], timezone) ?? ""}</td>
|
|
1910
|
+
<td>${data["source"] ?? ""}</td>
|
|
1894
1911
|
</tr>`;
|
|
1895
1912
|
}
|
|
1896
1913
|
}
|
|
@@ -1944,6 +1961,7 @@ var AllergyIntoleranceTemplate = class _AllergyIntoleranceTemplate {
|
|
|
1944
1961
|
<th>Reaction</th>
|
|
1945
1962
|
<th>Onset Date</th>
|
|
1946
1963
|
<th>Comments</th>
|
|
1964
|
+
<th>Source</th>
|
|
1947
1965
|
</tr>
|
|
1948
1966
|
</thead>
|
|
1949
1967
|
<tbody>`;
|
|
@@ -1973,6 +1991,7 @@ var AllergyIntoleranceTemplate = class _AllergyIntoleranceTemplate {
|
|
|
1973
1991
|
<th>Onset Date</th>
|
|
1974
1992
|
<th>Comments</th>
|
|
1975
1993
|
<th>Resolved Date</th>
|
|
1994
|
+
<th>Source</th>
|
|
1976
1995
|
</tr>
|
|
1977
1996
|
</thead>
|
|
1978
1997
|
<tbody>`;
|
|
@@ -2013,7 +2032,8 @@ var AllergyIntoleranceTemplate = class _AllergyIntoleranceTemplate {
|
|
|
2013
2032
|
<td class="Category">${templateUtilities.renderTextAsHtml(templateUtilities.safeConcat(allergy.category)) || ""}</td>
|
|
2014
2033
|
<td class="Reaction">${templateUtilities.renderTextAsHtml(templateUtilities.concatReactionManifestation(allergy.reaction)) || ""}</td>
|
|
2015
2034
|
<td class="OnsetDate">${templateUtilities.renderTextAsHtml(templateUtilities.renderTime(allergy.onsetDateTime, timezone)) || ""}</td>
|
|
2016
|
-
<td class="Comments">${templateUtilities.renderNotes(allergy.note, timezone, { styled: true, warning: true })}</td
|
|
2035
|
+
<td class="Comments">${templateUtilities.renderNotes(allergy.note, timezone, { styled: true, warning: true })}</td>
|
|
2036
|
+
<td class="Source">${templateUtilities.getOwnerTag(allergy)}</td>`;
|
|
2017
2037
|
if (includeResolved) {
|
|
2018
2038
|
let endDate = "";
|
|
2019
2039
|
if (allergy.extension && Array.isArray(allergy.extension)) {
|
|
@@ -2069,6 +2089,7 @@ var MedicationSummaryTemplate = class _MedicationSummaryTemplate {
|
|
|
2069
2089
|
<th>Sig</th>
|
|
2070
2090
|
<th>Days of Supply</th>
|
|
2071
2091
|
<th>Start Date</th>
|
|
2092
|
+
<th>Source</th>
|
|
2072
2093
|
</tr>
|
|
2073
2094
|
</thead>
|
|
2074
2095
|
<tbody>`;
|
|
@@ -2097,6 +2118,9 @@ var MedicationSummaryTemplate = class _MedicationSummaryTemplate {
|
|
|
2097
2118
|
case "Authored On Date":
|
|
2098
2119
|
data["startDate"] = templateUtilities.renderTextAsHtml(columnData.text?.div ?? "");
|
|
2099
2120
|
break;
|
|
2121
|
+
case "Source":
|
|
2122
|
+
data["source"] = templateUtilities.renderTextAsHtml(columnData.text?.div ?? "");
|
|
2123
|
+
break;
|
|
2100
2124
|
default:
|
|
2101
2125
|
break;
|
|
2102
2126
|
}
|
|
@@ -2124,6 +2148,7 @@ var MedicationSummaryTemplate = class _MedicationSummaryTemplate {
|
|
|
2124
2148
|
<td>${templateUtilities.renderTextAsHtml(data["sig-prescriber"] || data["sig-pharmacy"])}</td>
|
|
2125
2149
|
<td>${templateUtilities.renderTextAsHtml(data["daysOfSupply"])}</td>
|
|
2126
2150
|
<td>${templateUtilities.renderTime(data["startDate"], timezone)}</td>
|
|
2151
|
+
<td>${data["source"] ?? ""}</td>
|
|
2127
2152
|
</tr>`;
|
|
2128
2153
|
}
|
|
2129
2154
|
}
|
|
@@ -2249,6 +2274,7 @@ var MedicationSummaryTemplate = class _MedicationSummaryTemplate {
|
|
|
2249
2274
|
<th>Sig</th>
|
|
2250
2275
|
<th>Dispense Quantity</th>
|
|
2251
2276
|
<th>Start Date</th>
|
|
2277
|
+
<th>Source</th>
|
|
2252
2278
|
</tr>
|
|
2253
2279
|
</thead>
|
|
2254
2280
|
<tbody>`;
|
|
@@ -2307,6 +2333,7 @@ var MedicationSummaryTemplate = class _MedicationSummaryTemplate {
|
|
|
2307
2333
|
<td>${sig}</td>
|
|
2308
2334
|
<td>${dispenseQuantity}</td>
|
|
2309
2335
|
<td>${startDate}</td>
|
|
2336
|
+
<td>${templateUtilities.getOwnerTag(medication.resource)}</td>
|
|
2310
2337
|
</tr>`;
|
|
2311
2338
|
}
|
|
2312
2339
|
html += `
|
|
@@ -2351,6 +2378,7 @@ var ImmunizationsTemplate = class _ImmunizationsTemplate {
|
|
|
2351
2378
|
<th>Code (System)</th>
|
|
2352
2379
|
<th>Status</th>
|
|
2353
2380
|
<th>Date</th>
|
|
2381
|
+
<th>Source</th>
|
|
2354
2382
|
</tr>
|
|
2355
2383
|
</thead>
|
|
2356
2384
|
<tbody>`;
|
|
@@ -2370,6 +2398,9 @@ var ImmunizationsTemplate = class _ImmunizationsTemplate {
|
|
|
2370
2398
|
case "occurrenceDateTime":
|
|
2371
2399
|
data["occurrenceDateTime"] = templateUtilities.renderTextAsHtml(columnData.text?.div ?? "");
|
|
2372
2400
|
break;
|
|
2401
|
+
case "Source":
|
|
2402
|
+
data["source"] = templateUtilities.renderTextAsHtml(columnData.text?.div ?? "");
|
|
2403
|
+
break;
|
|
2373
2404
|
default:
|
|
2374
2405
|
break;
|
|
2375
2406
|
}
|
|
@@ -2385,6 +2416,7 @@ var ImmunizationsTemplate = class _ImmunizationsTemplate {
|
|
|
2385
2416
|
<td>${data["codeSystem"] ?? ""}</td>
|
|
2386
2417
|
<td>${data["status"] ?? ""}</td>
|
|
2387
2418
|
<td>${templateUtilities.renderTime(data["occurrenceDateTime"], timezone) ?? ""}</td>
|
|
2419
|
+
<td>${data["source"] ?? ""}</td>
|
|
2388
2420
|
</tr>`;
|
|
2389
2421
|
}
|
|
2390
2422
|
}
|
|
@@ -2415,6 +2447,7 @@ var ImmunizationsTemplate = class _ImmunizationsTemplate {
|
|
|
2415
2447
|
<th>Lot Number</th>
|
|
2416
2448
|
<th>Comments</th>
|
|
2417
2449
|
<th>Date</th>
|
|
2450
|
+
<th>Source</th>
|
|
2418
2451
|
</tr>
|
|
2419
2452
|
</thead>
|
|
2420
2453
|
<tbody>`;
|
|
@@ -2436,6 +2469,7 @@ var ImmunizationsTemplate = class _ImmunizationsTemplate {
|
|
|
2436
2469
|
<td>${imm.lotNumber || ""}</td>
|
|
2437
2470
|
<td>${templateUtilities.renderNotes(imm.note, timezone)}</td>
|
|
2438
2471
|
<td>${templateUtilities.renderTime(imm.occurrenceDateTime, timezone)}</td>
|
|
2472
|
+
<td>${templateUtilities.getOwnerTag(imm)}</td>
|
|
2439
2473
|
</tr>`;
|
|
2440
2474
|
}
|
|
2441
2475
|
}
|
|
@@ -2476,6 +2510,7 @@ var ProblemListTemplate = class _ProblemListTemplate {
|
|
|
2476
2510
|
<th>Is Chronic</th>
|
|
2477
2511
|
<th>Onset Date</th>
|
|
2478
2512
|
<th>Last Confirmed Date</th>
|
|
2513
|
+
<th>Source</th>
|
|
2479
2514
|
</tr>
|
|
2480
2515
|
</thead>
|
|
2481
2516
|
<tbody>`;
|
|
@@ -2500,6 +2535,7 @@ var ProblemListTemplate = class _ProblemListTemplate {
|
|
|
2500
2535
|
<td>${data["Is Chronic"] ?? ""}</td>
|
|
2501
2536
|
<td>${templateUtilities.renderTime(data["Onset Date"], timezone) ?? ""}</td>
|
|
2502
2537
|
<td>${templateUtilities.renderTime(data["Last Confirmed Date"], timezone) ?? ""}</td>
|
|
2538
|
+
<td>${data["Source"] ?? ""}</td>
|
|
2503
2539
|
</tr>`;
|
|
2504
2540
|
}
|
|
2505
2541
|
}
|
|
@@ -2538,6 +2574,7 @@ var ProblemListTemplate = class _ProblemListTemplate {
|
|
|
2538
2574
|
<th>Code (System)</th>
|
|
2539
2575
|
<th>Onset Date</th>
|
|
2540
2576
|
<th>Recorded Date</th>
|
|
2577
|
+
<th>Source</th>
|
|
2541
2578
|
</tr>
|
|
2542
2579
|
</thead>
|
|
2543
2580
|
<tbody>`;
|
|
@@ -2557,6 +2594,7 @@ var ProblemListTemplate = class _ProblemListTemplate {
|
|
|
2557
2594
|
<td class="CodeSystem">${codeAndSystem}</td>
|
|
2558
2595
|
<td class="OnsetDate">${templateUtilities.renderDate(cond.onsetDateTime)}</td>
|
|
2559
2596
|
<td class="RecordedDate">${templateUtilities.renderDate(cond.recordedDate)}</td>
|
|
2597
|
+
<td class="Source">${templateUtilities.getOwnerTag(cond)}</td>
|
|
2560
2598
|
</tr>`;
|
|
2561
2599
|
}
|
|
2562
2600
|
html += `</tbody>
|
|
@@ -2596,6 +2634,7 @@ var VitalSignsTemplate = class _VitalSignsTemplate {
|
|
|
2596
2634
|
<th>Code (System)</th>
|
|
2597
2635
|
<th>Result</th>
|
|
2598
2636
|
<th>Date</th>
|
|
2637
|
+
<th>Source</th>
|
|
2599
2638
|
</tr>
|
|
2600
2639
|
</thead>
|
|
2601
2640
|
<tbody>`;
|
|
@@ -2638,6 +2677,7 @@ var VitalSignsTemplate = class _VitalSignsTemplate {
|
|
|
2638
2677
|
<td>${data["codeSystem"] ?? ""}</td>
|
|
2639
2678
|
<td>${templateUtilities.extractObservationSummaryValue(data, timezone) ?? ""}</td>
|
|
2640
2679
|
<td>${templateUtilities.extractObservationSummaryEffectiveTime(data, timezone) ?? ""}</td>
|
|
2680
|
+
<td>${data["Source"] ?? ""}</td>
|
|
2641
2681
|
</tr>`;
|
|
2642
2682
|
}
|
|
2643
2683
|
}
|
|
@@ -2675,6 +2715,7 @@ var VitalSignsTemplate = class _VitalSignsTemplate {
|
|
|
2675
2715
|
<th>Component(s)</th>
|
|
2676
2716
|
<th>Comments</th>
|
|
2677
2717
|
<th>Date</th>
|
|
2718
|
+
<th>Source</th>
|
|
2678
2719
|
</tr>
|
|
2679
2720
|
</thead>
|
|
2680
2721
|
<tbody>`;
|
|
@@ -2693,6 +2734,7 @@ var VitalSignsTemplate = class _VitalSignsTemplate {
|
|
|
2693
2734
|
<td>${templateUtilities.renderComponent(obs.component)}</td>
|
|
2694
2735
|
<td>${templateUtilities.renderNotes(obs.note, timezone)}</td>
|
|
2695
2736
|
<td>${obs.effectiveDateTime ? templateUtilities.renderTime(obs.effectiveDateTime, timezone) : obs.effectivePeriod ? templateUtilities.renderPeriod(obs.effectivePeriod, timezone) : ""}</td>
|
|
2737
|
+
<td>${templateUtilities.getOwnerTag(obs)}</td>
|
|
2696
2738
|
</tr>`;
|
|
2697
2739
|
}
|
|
2698
2740
|
html += `
|
|
@@ -2729,6 +2771,7 @@ var MedicalDevicesTemplate = class _MedicalDevicesTemplate {
|
|
|
2729
2771
|
<th>Status</th>
|
|
2730
2772
|
<th>Comments</th>
|
|
2731
2773
|
<th>Date Recorded</th>
|
|
2774
|
+
<th>Source</th>
|
|
2732
2775
|
</tr>
|
|
2733
2776
|
</thead>
|
|
2734
2777
|
<tbody>`;
|
|
@@ -2750,6 +2793,7 @@ var MedicalDevicesTemplate = class _MedicalDevicesTemplate {
|
|
|
2750
2793
|
<td>${templateUtilities.renderTextAsHtml(dus.status || "")}</td>
|
|
2751
2794
|
<td>${templateUtilities.renderNotes(dus.note, timezone)}</td>
|
|
2752
2795
|
<td>${templateUtilities.renderTextAsHtml(templateUtilities.renderRecorded(dus.recordedOn, timezone))}</td>
|
|
2796
|
+
<td>${templateUtilities.getOwnerTag(dus)}</td>
|
|
2753
2797
|
</tr>`;
|
|
2754
2798
|
}
|
|
2755
2799
|
html += `
|
|
@@ -2902,6 +2946,9 @@ var DiagnosticResultsTemplate = class _DiagnosticResultsTemplate {
|
|
|
2902
2946
|
case "effectivePeriod.end":
|
|
2903
2947
|
targetData["effectivePeriodEnd"] = templateUtilities.renderTextAsHtml(column.text?.div ?? "");
|
|
2904
2948
|
break;
|
|
2949
|
+
case "Source":
|
|
2950
|
+
targetData["source"] = templateUtilities.renderTextAsHtml(column.text?.div ?? "");
|
|
2951
|
+
break;
|
|
2905
2952
|
// valueQuantity
|
|
2906
2953
|
case "valueQuantity.value":
|
|
2907
2954
|
targetData["value"] = templateUtilities.renderTextAsHtml(column.text?.div ?? "");
|
|
@@ -3120,6 +3167,7 @@ var DiagnosticResultsTemplate = class _DiagnosticResultsTemplate {
|
|
|
3120
3167
|
<th>Result</th>
|
|
3121
3168
|
<th>Reference Range</th>
|
|
3122
3169
|
<th>Date</th>
|
|
3170
|
+
<th>Source</th>
|
|
3123
3171
|
</tr>
|
|
3124
3172
|
</thead>
|
|
3125
3173
|
<tbody>`;
|
|
@@ -3133,6 +3181,7 @@ var DiagnosticResultsTemplate = class _DiagnosticResultsTemplate {
|
|
|
3133
3181
|
<th>Report</th>
|
|
3134
3182
|
<th>Performer</th>
|
|
3135
3183
|
<th>Issued</th>
|
|
3184
|
+
<th>Source</th>
|
|
3136
3185
|
</tr>
|
|
3137
3186
|
</thead>
|
|
3138
3187
|
<tbody>`;
|
|
@@ -3179,6 +3228,8 @@ var DiagnosticResultsTemplate = class _DiagnosticResultsTemplate {
|
|
|
3179
3228
|
case "Status":
|
|
3180
3229
|
data["status"] = templateUtilities.renderTextAsHtml(columnData.text?.div ?? "");
|
|
3181
3230
|
break;
|
|
3231
|
+
case "Source":
|
|
3232
|
+
data["source"] = templateUtilities.renderTextAsHtml(columnData.text?.div ?? "");
|
|
3182
3233
|
break;
|
|
3183
3234
|
default:
|
|
3184
3235
|
break;
|
|
@@ -3216,6 +3267,7 @@ var DiagnosticResultsTemplate = class _DiagnosticResultsTemplate {
|
|
|
3216
3267
|
<td>${templateUtilities.renderTextAsHtml(component["formattedValue"]) ?? ""}</td>
|
|
3217
3268
|
<td>${templateUtilities.renderTextAsHtml(component["referenceRange"])?.trim() ?? ""}</td>
|
|
3218
3269
|
<td>${date ?? ""}</td>
|
|
3270
|
+
<td>${data["source"] ?? ""}</td>
|
|
3219
3271
|
</tr>`;
|
|
3220
3272
|
}
|
|
3221
3273
|
}
|
|
@@ -3235,6 +3287,7 @@ var DiagnosticResultsTemplate = class _DiagnosticResultsTemplate {
|
|
|
3235
3287
|
<td>${templateUtilities.renderTextAsHtml(data["formattedValue"]) ?? ""}</td>
|
|
3236
3288
|
<td>${templateUtilities.renderTextAsHtml(data["referenceRange"])?.trim() ?? ""}</td>
|
|
3237
3289
|
<td>${date ?? ""}</td>
|
|
3290
|
+
<td>${data["source"] ?? ""}</td>
|
|
3238
3291
|
</tr>`;
|
|
3239
3292
|
}
|
|
3240
3293
|
}
|
|
@@ -3256,6 +3309,7 @@ var DiagnosticResultsTemplate = class _DiagnosticResultsTemplate {
|
|
|
3256
3309
|
<td>${templateUtilities.capitalizeFirstLetter(data["report"] ?? "")}</td>
|
|
3257
3310
|
<td>${data["performer"] ?? ""}</td>
|
|
3258
3311
|
<td>${templateUtilities.renderTime(data["issued"], timezone) ?? ""}</td>
|
|
3312
|
+
<td>${data["source"] ?? ""}</td>
|
|
3259
3313
|
</tr>`;
|
|
3260
3314
|
}
|
|
3261
3315
|
}
|
|
@@ -3440,6 +3494,7 @@ var DiagnosticResultsTemplate = class _DiagnosticResultsTemplate {
|
|
|
3440
3494
|
<th>Result</th>
|
|
3441
3495
|
<th>Reference Range</th>
|
|
3442
3496
|
<th>Date</th>
|
|
3497
|
+
<th>Source</th>
|
|
3443
3498
|
</tr>
|
|
3444
3499
|
</thead>
|
|
3445
3500
|
<tbody>`;
|
|
@@ -3460,6 +3515,7 @@ var DiagnosticResultsTemplate = class _DiagnosticResultsTemplate {
|
|
|
3460
3515
|
<td>${templateUtilities.extractObservationValue(obs)}</td>
|
|
3461
3516
|
<td>${templateUtilities.concatReferenceRange(obs.referenceRange)}</td>
|
|
3462
3517
|
<td>${obs.effectiveDateTime ? templateUtilities.renderTime(obs.effectiveDateTime, timezone) : obs.effectivePeriod ? templateUtilities.renderPeriod(obs.effectivePeriod, timezone) : ""}</td>
|
|
3518
|
+
<td>${templateUtilities.getOwnerTag(obs)}</td>
|
|
3463
3519
|
</tr>`;
|
|
3464
3520
|
}
|
|
3465
3521
|
}
|
|
@@ -3486,6 +3542,7 @@ var DiagnosticResultsTemplate = class _DiagnosticResultsTemplate {
|
|
|
3486
3542
|
<th>Category</th>
|
|
3487
3543
|
<th>Result</th>
|
|
3488
3544
|
<th>Issued</th>
|
|
3545
|
+
<th>Source</th>
|
|
3489
3546
|
</tr>
|
|
3490
3547
|
</thead>
|
|
3491
3548
|
<tbody>`;
|
|
@@ -3510,6 +3567,7 @@ var DiagnosticResultsTemplate = class _DiagnosticResultsTemplate {
|
|
|
3510
3567
|
<td>${templateUtilities.firstFromCodeableConceptList(report.category)}</td>
|
|
3511
3568
|
<td>${resultCount}</td>
|
|
3512
3569
|
<td>${report.issued ? templateUtilities.renderTime(report.issued, timezone) : ""}</td>
|
|
3570
|
+
<td>${templateUtilities.getOwnerTag(report)}</td>
|
|
3513
3571
|
</tr>`;
|
|
3514
3572
|
}
|
|
3515
3573
|
}
|
|
@@ -3576,6 +3634,7 @@ var HistoryOfProceduresTemplate = class _HistoryOfProceduresTemplate {
|
|
|
3576
3634
|
<th>Code (System)</th>
|
|
3577
3635
|
<th>Performer</th>
|
|
3578
3636
|
<th>Date</th>
|
|
3637
|
+
<th>Source</th>
|
|
3579
3638
|
</tr>
|
|
3580
3639
|
</thead>
|
|
3581
3640
|
<tbody>`;
|
|
@@ -3595,6 +3654,8 @@ var HistoryOfProceduresTemplate = class _HistoryOfProceduresTemplate {
|
|
|
3595
3654
|
case "Performed Date":
|
|
3596
3655
|
data["date"] = columnData.text?.div ?? "";
|
|
3597
3656
|
break;
|
|
3657
|
+
case "Source":
|
|
3658
|
+
data["source"] = columnData.text?.div ?? "";
|
|
3598
3659
|
break;
|
|
3599
3660
|
default:
|
|
3600
3661
|
break;
|
|
@@ -3610,6 +3671,7 @@ var HistoryOfProceduresTemplate = class _HistoryOfProceduresTemplate {
|
|
|
3610
3671
|
<td>${data["codeSystem"] ?? ""}</td>
|
|
3611
3672
|
<td>${data["performer"] ?? ""}</td>
|
|
3612
3673
|
<td>${templateUtilities.renderTime(data["date"], timezone) ?? ""}</td>
|
|
3674
|
+
<td>${data["source"] ?? ""}</td>
|
|
3613
3675
|
</tr>`;
|
|
3614
3676
|
}
|
|
3615
3677
|
}
|
|
@@ -3637,6 +3699,7 @@ var HistoryOfProceduresTemplate = class _HistoryOfProceduresTemplate {
|
|
|
3637
3699
|
<th>Code (System)</th>
|
|
3638
3700
|
<th>Comments</th>
|
|
3639
3701
|
<th>Date</th>
|
|
3702
|
+
<th>Source</th>
|
|
3640
3703
|
</tr>
|
|
3641
3704
|
</thead>
|
|
3642
3705
|
<tbody>`;
|
|
@@ -3652,6 +3715,7 @@ var HistoryOfProceduresTemplate = class _HistoryOfProceduresTemplate {
|
|
|
3652
3715
|
<td>${templateUtilities.codeableConceptCoding(proc.code)}</td>
|
|
3653
3716
|
<td>${templateUtilities.renderNotes(proc.note, timezone)}</td>
|
|
3654
3717
|
<td>${templateUtilities.renderTime(proc.performedDateTime || proc.performedPeriod?.start, timezone)}</td>
|
|
3718
|
+
<td>${templateUtilities.getOwnerTag(proc)}</td>
|
|
3655
3719
|
</tr>`;
|
|
3656
3720
|
}
|
|
3657
3721
|
html += `
|
|
@@ -3693,6 +3757,7 @@ var SocialHistoryTemplate = class _SocialHistoryTemplate {
|
|
|
3693
3757
|
<th>Result</th>
|
|
3694
3758
|
<th>Date</th>
|
|
3695
3759
|
<th>Comments</th>
|
|
3760
|
+
<th>Source</th>
|
|
3696
3761
|
</tr>
|
|
3697
3762
|
</thead>
|
|
3698
3763
|
<tbody>`;
|
|
@@ -3718,6 +3783,7 @@ var SocialHistoryTemplate = class _SocialHistoryTemplate {
|
|
|
3718
3783
|
<td>${templateUtilities.extractObservationSummaryValue(data, timezone) ?? ""}</td>
|
|
3719
3784
|
<td>${templateUtilities.extractObservationSummaryEffectiveTime(data, timezone) ?? ""}</td>
|
|
3720
3785
|
<td>${data["Notes"] ?? ""}</td>
|
|
3786
|
+
<td>${data["Source"] ?? ""}</td>
|
|
3721
3787
|
</tr>`;
|
|
3722
3788
|
}
|
|
3723
3789
|
}
|
|
@@ -3753,6 +3819,7 @@ var SocialHistoryTemplate = class _SocialHistoryTemplate {
|
|
|
3753
3819
|
<th>Unit</th>
|
|
3754
3820
|
<th>Comments</th>
|
|
3755
3821
|
<th>Date</th>
|
|
3822
|
+
<th>Source</th>
|
|
3756
3823
|
</tr>
|
|
3757
3824
|
</thead>
|
|
3758
3825
|
<tbody>`;
|
|
@@ -3772,6 +3839,7 @@ var SocialHistoryTemplate = class _SocialHistoryTemplate {
|
|
|
3772
3839
|
<td>${templateUtilities.extractObservationValueUnit(obs)}</td>
|
|
3773
3840
|
<td>${templateUtilities.renderNotes(obs.note, timezone)}</td>
|
|
3774
3841
|
<td>${obs.effectiveDateTime ? templateUtilities.renderTime(obs.effectiveDateTime, timezone) : obs.effectivePeriod ? templateUtilities.renderPeriod(obs.effectivePeriod, timezone) : ""}</td>
|
|
3842
|
+
<td>${templateUtilities.getOwnerTag(obs)}</td>
|
|
3775
3843
|
</tr>`;
|
|
3776
3844
|
}
|
|
3777
3845
|
}
|
|
@@ -3822,6 +3890,7 @@ var PastHistoryOfIllnessTemplate = class {
|
|
|
3822
3890
|
<th>Onset Date</th>
|
|
3823
3891
|
<th>Recorded Date</th>
|
|
3824
3892
|
<th>Resolved Date</th>
|
|
3893
|
+
<th>Source</th>
|
|
3825
3894
|
</tr>
|
|
3826
3895
|
</thead>
|
|
3827
3896
|
<tbody>`;
|
|
@@ -3839,6 +3908,7 @@ var PastHistoryOfIllnessTemplate = class {
|
|
|
3839
3908
|
<td class="OnsetDate">${templateUtilities.renderDate(cond.onsetDateTime)}</td>
|
|
3840
3909
|
<td class="RecordedDate">${templateUtilities.renderDate(cond.recordedDate)}</td>
|
|
3841
3910
|
<td class="ResolvedDate">${templateUtilities.renderDate(cond.abatementDateTime)}</td>
|
|
3911
|
+
<td class="Source">${templateUtilities.getOwnerTag(cond)}</td>
|
|
3842
3912
|
</tr>`;
|
|
3843
3913
|
}
|
|
3844
3914
|
}
|
|
@@ -3874,6 +3944,7 @@ var PastHistoryOfIllnessTemplate = class {
|
|
|
3874
3944
|
<th>Onset Date</th>
|
|
3875
3945
|
<th>Last Confirmed Date</th>
|
|
3876
3946
|
<th>Resolved Date</th>
|
|
3947
|
+
<th>Source</th>
|
|
3877
3948
|
</tr>
|
|
3878
3949
|
</thead>
|
|
3879
3950
|
<tbody>`;
|
|
@@ -3903,6 +3974,7 @@ var PastHistoryOfIllnessTemplate = class {
|
|
|
3903
3974
|
<td>${templateUtilities.renderTime(data["Onset Date"], timezone) ?? ""}</td>
|
|
3904
3975
|
<td>${templateUtilities.renderTime(data["Last Confirmed Date"], timezone) ?? ""}</td>
|
|
3905
3976
|
<td>${templateUtilities.renderTime(data["Resolved Date"], timezone) ?? ""}</td>
|
|
3977
|
+
<td>${data["Source"] ?? ""}</td>
|
|
3906
3978
|
</tr>`;
|
|
3907
3979
|
}
|
|
3908
3980
|
}
|
|
@@ -3946,6 +4018,7 @@ var PlanOfCareTemplate = class {
|
|
|
3946
4018
|
<th>Comments</th>
|
|
3947
4019
|
<th>Planned Start</th>
|
|
3948
4020
|
<th>Planned End</th>
|
|
4021
|
+
<th>Source</th>
|
|
3949
4022
|
</tr>
|
|
3950
4023
|
</thead>
|
|
3951
4024
|
<tbody>`;
|
|
@@ -3961,6 +4034,7 @@ var PlanOfCareTemplate = class {
|
|
|
3961
4034
|
<td>${templateUtilities.concat(cp.note, "text")}</td>
|
|
3962
4035
|
<td>${cp.period?.start ? templateUtilities.renderTime(cp.period?.start, timezone) : ""}</td>
|
|
3963
4036
|
<td>${cp.period?.end ? templateUtilities.renderTime(cp.period?.end, timezone) : ""}</td>
|
|
4037
|
+
<td>${templateUtilities.getOwnerTag(cp)}</td>
|
|
3964
4038
|
</tr>`;
|
|
3965
4039
|
}
|
|
3966
4040
|
html += `
|
|
@@ -3988,6 +4062,7 @@ var PlanOfCareTemplate = class {
|
|
|
3988
4062
|
<th>Created</th>
|
|
3989
4063
|
<th>Planned Start</th>
|
|
3990
4064
|
<th>Planned End</th>
|
|
4065
|
+
<th>Source</th>
|
|
3991
4066
|
</tr>
|
|
3992
4067
|
</thead>
|
|
3993
4068
|
<tbody>`;
|
|
@@ -4012,6 +4087,7 @@ var PlanOfCareTemplate = class {
|
|
|
4012
4087
|
<td>${templateUtilities.renderTime(data["created"], timezone) ?? ""}</td>
|
|
4013
4088
|
<td>${templateUtilities.renderTime(data["period.start"], timezone) ?? ""}</td>
|
|
4014
4089
|
<td>${templateUtilities.renderTime(data["period.end"], timezone) ?? ""}</td>
|
|
4090
|
+
<td>${data["Source"] ?? ""}</td>
|
|
4015
4091
|
</tr>`;
|
|
4016
4092
|
}
|
|
4017
4093
|
}
|
|
@@ -4056,6 +4132,7 @@ var FunctionalStatusTemplate = class _FunctionalStatusTemplate {
|
|
|
4056
4132
|
<th>Code (System)</th>
|
|
4057
4133
|
<th>Onset Date</th>
|
|
4058
4134
|
<th>Recorded Date</th>
|
|
4135
|
+
<th>Source</th>
|
|
4059
4136
|
</tr>
|
|
4060
4137
|
</thead>
|
|
4061
4138
|
<tbody>`;
|
|
@@ -4070,6 +4147,7 @@ var FunctionalStatusTemplate = class _FunctionalStatusTemplate {
|
|
|
4070
4147
|
<th>Code (System)</th>
|
|
4071
4148
|
<th>Description</th>
|
|
4072
4149
|
<th>Summary</th>
|
|
4150
|
+
<th>Source</th>
|
|
4073
4151
|
</tr>
|
|
4074
4152
|
</thead>
|
|
4075
4153
|
<tbody>`;
|
|
@@ -4109,6 +4187,7 @@ var FunctionalStatusTemplate = class _FunctionalStatusTemplate {
|
|
|
4109
4187
|
<td>${templateUtilities.codeableConceptCoding(sectionCodeableConcept)}</td>
|
|
4110
4188
|
<td>${date}</td>
|
|
4111
4189
|
<td>${templateUtilities.renderTime(data["recordedDate"], timezone) ?? ""}</td>
|
|
4190
|
+
<td>${data["Source"] ?? ""}</td>
|
|
4112
4191
|
</tr>`;
|
|
4113
4192
|
}
|
|
4114
4193
|
} else if (resourceItem.title === "Clinical Impression|Clinical Impression Summary") {
|
|
@@ -4135,6 +4214,7 @@ var FunctionalStatusTemplate = class _FunctionalStatusTemplate {
|
|
|
4135
4214
|
<td>${templateUtilities.codeableConceptCoding(sectionCodeableConcept)}</td>
|
|
4136
4215
|
<td>${data["Description"] ?? ""}</td>
|
|
4137
4216
|
<td>${data["Summary"] ?? ""}</td>
|
|
4217
|
+
<td>${data["Source"] ?? ""}</td>
|
|
4138
4218
|
</tr>`;
|
|
4139
4219
|
}
|
|
4140
4220
|
}
|
|
@@ -4188,7 +4268,7 @@ var FunctionalStatusTemplate = class _FunctionalStatusTemplate {
|
|
|
4188
4268
|
return getImpressionDate(b) - getImpressionDate(a);
|
|
4189
4269
|
});
|
|
4190
4270
|
if (functionalObservations.length > 0) {
|
|
4191
|
-
html += `<table><thead><tr><th>Observation</th><th>Value</th><th>Date</th><th>Interpretation</th><th>Comments</th></tr></thead><tbody>`;
|
|
4271
|
+
html += `<table><thead><tr><th>Observation</th><th>Value</th><th>Date</th><th>Interpretation</th><th>Comments</th><th>Source</th></tr></thead><tbody>`;
|
|
4192
4272
|
for (const obs of functionalObservations) {
|
|
4193
4273
|
const observation = obs;
|
|
4194
4274
|
const obsName = templateUtilities.codeableConceptDisplay(observation.code);
|
|
@@ -4205,12 +4285,13 @@ var FunctionalStatusTemplate = class _FunctionalStatusTemplate {
|
|
|
4205
4285
|
<td>${date}</td>
|
|
4206
4286
|
<td>${interpretation}</td>
|
|
4207
4287
|
<td>${comments}</td>
|
|
4288
|
+
<td>${templateUtilities.getOwnerTag(observation)}</td>
|
|
4208
4289
|
</tr>`;
|
|
4209
4290
|
}
|
|
4210
4291
|
html += `</tbody></table>`;
|
|
4211
4292
|
}
|
|
4212
4293
|
if (clinicalImpressions.length > 0) {
|
|
4213
|
-
html += `<table><thead><tr><th>Date</th><th>Status</th><th>Description</th><th>Summary</th><th>Findings</th></tr></thead><tbody>`;
|
|
4294
|
+
html += `<table><thead><tr><th>Date</th><th>Status</th><th>Description</th><th>Summary</th><th>Findings</th><th>Source</th></tr></thead><tbody>`;
|
|
4214
4295
|
for (const impression of clinicalImpressions) {
|
|
4215
4296
|
let formattedDate = "";
|
|
4216
4297
|
if (impression.effectiveDateTime) {
|
|
@@ -4236,6 +4317,7 @@ var FunctionalStatusTemplate = class _FunctionalStatusTemplate {
|
|
|
4236
4317
|
<td>${impression.description || ""}</td>
|
|
4237
4318
|
<td>${impression.summary || ""}</td>
|
|
4238
4319
|
<td>${findingsHtml}</td>
|
|
4320
|
+
<td>${templateUtilities.getOwnerTag(impression)}</td>
|
|
4239
4321
|
</tr>`;
|
|
4240
4322
|
}
|
|
4241
4323
|
html += `</tbody></table>`;
|
|
@@ -4302,10 +4384,11 @@ var PregnancyTemplate = class _PregnancyTemplate {
|
|
|
4302
4384
|
<th>Code (System)</th>
|
|
4303
4385
|
<th>Comments</th>
|
|
4304
4386
|
<th>Date</th>
|
|
4387
|
+
<th>Source</th>
|
|
4305
4388
|
</tr>
|
|
4306
4389
|
</thead>
|
|
4307
4390
|
<tbody>`;
|
|
4308
|
-
function renderRow({ result, comments, date, codeSystem }) {
|
|
4391
|
+
function renderRow({ result, comments, date, codeSystem, resource }) {
|
|
4309
4392
|
if (result?.toLowerCase() === "unknown") {
|
|
4310
4393
|
return;
|
|
4311
4394
|
}
|
|
@@ -4315,6 +4398,7 @@ var PregnancyTemplate = class _PregnancyTemplate {
|
|
|
4315
4398
|
<td class="CodeSystem">${codeSystem}</td>
|
|
4316
4399
|
<td class="Comments">${comments}</td>
|
|
4317
4400
|
<td class="Date">${date}</td>
|
|
4401
|
+
<td class="Source">${templateUtilities.getOwnerTag(resource)}</td>
|
|
4318
4402
|
</tr>`;
|
|
4319
4403
|
}
|
|
4320
4404
|
const rowResources = [];
|
|
@@ -4368,7 +4452,7 @@ var PregnancyTemplate = class _PregnancyTemplate {
|
|
|
4368
4452
|
const rowKey = `${result}|${codeSystem}`;
|
|
4369
4453
|
if (!addedRows.has(rowKey)) {
|
|
4370
4454
|
addedRows.add(rowKey);
|
|
4371
|
-
renderRow({ result, comments, date: dateStr, codeSystem });
|
|
4455
|
+
renderRow({ result, comments, date: dateStr, codeSystem, resource });
|
|
4372
4456
|
}
|
|
4373
4457
|
}
|
|
4374
4458
|
html += `
|
|
@@ -4412,6 +4496,7 @@ var AdvanceDirectivesTemplate = class _AdvanceDirectivesTemplate {
|
|
|
4412
4496
|
<th>Status</th>
|
|
4413
4497
|
<th>Action Controlled</th>
|
|
4414
4498
|
<th>Date</th>
|
|
4499
|
+
<th>Source</th>
|
|
4415
4500
|
</tr>
|
|
4416
4501
|
</thead>
|
|
4417
4502
|
<tbody>`;
|
|
@@ -4429,6 +4514,7 @@ var AdvanceDirectivesTemplate = class _AdvanceDirectivesTemplate {
|
|
|
4429
4514
|
<td>${consent.status || ""}</td>
|
|
4430
4515
|
<td>${consent.provision?.action ? templateUtilities.concatCodeableConcept(consent.provision.action) : ""}</td>
|
|
4431
4516
|
<td>${consent.dateTime || ""}</td>
|
|
4517
|
+
<td>${templateUtilities.getOwnerTag(consent)}</td>
|
|
4432
4518
|
</tr>`;
|
|
4433
4519
|
}
|
|
4434
4520
|
html += `
|
package/dist/index.js
CHANGED
|
@@ -895,6 +895,18 @@ var TemplateUtilities = class {
|
|
|
895
895
|
}
|
|
896
896
|
return "";
|
|
897
897
|
}
|
|
898
|
+
/**
|
|
899
|
+
* Returns the owner tag from the resource meta.security array.
|
|
900
|
+
* @param resource - FHIR resource with meta tag
|
|
901
|
+
* @returns The owner display or code if found, otherwise undefined
|
|
902
|
+
*/
|
|
903
|
+
getOwnerTag(resource) {
|
|
904
|
+
if (!resource?.meta?.security) return "";
|
|
905
|
+
const ownerEntry = resource.meta.security.find(
|
|
906
|
+
(sec) => sec.system === "https://www.icanbwell.com/owner" && !!sec.code
|
|
907
|
+
);
|
|
908
|
+
return ownerEntry?.display || ownerEntry?.code;
|
|
909
|
+
}
|
|
898
910
|
/**
|
|
899
911
|
* Public method to render plain text as HTML, escaping special characters and replacing newlines with <br />.
|
|
900
912
|
* This method should be used whenever displaying user-supplied or FHIR resource text in HTML to prevent XSS vulnerabilities
|
|
@@ -1830,6 +1842,7 @@ var AllergyIntoleranceTemplate = class _AllergyIntoleranceTemplate {
|
|
|
1830
1842
|
<th>Code (System)</th>
|
|
1831
1843
|
<th>Criticality</th>
|
|
1832
1844
|
<th>Recorded Date</th>
|
|
1845
|
+
<th>Source</th>
|
|
1833
1846
|
</tr>
|
|
1834
1847
|
</thead>
|
|
1835
1848
|
<tbody>`;
|
|
@@ -1849,6 +1862,9 @@ var AllergyIntoleranceTemplate = class _AllergyIntoleranceTemplate {
|
|
|
1849
1862
|
case "Recorded Date":
|
|
1850
1863
|
data["recordedDate"] = templateUtilities.renderTextAsHtml(columnData.text?.div ?? "");
|
|
1851
1864
|
break;
|
|
1865
|
+
case "Source":
|
|
1866
|
+
data["source"] = templateUtilities.renderTextAsHtml(columnData.text?.div ?? "");
|
|
1867
|
+
break;
|
|
1852
1868
|
default:
|
|
1853
1869
|
break;
|
|
1854
1870
|
}
|
|
@@ -1863,6 +1879,7 @@ var AllergyIntoleranceTemplate = class _AllergyIntoleranceTemplate {
|
|
|
1863
1879
|
<td>${data["codeSystem"] ?? ""}</td>
|
|
1864
1880
|
<td>${data["criticality"] ?? ""}</td>
|
|
1865
1881
|
<td>${templateUtilities.renderTime(data["recordedDate"], timezone) ?? ""}</td>
|
|
1882
|
+
<td>${data["source"] ?? ""}</td>
|
|
1866
1883
|
</tr>`;
|
|
1867
1884
|
}
|
|
1868
1885
|
}
|
|
@@ -1916,6 +1933,7 @@ var AllergyIntoleranceTemplate = class _AllergyIntoleranceTemplate {
|
|
|
1916
1933
|
<th>Reaction</th>
|
|
1917
1934
|
<th>Onset Date</th>
|
|
1918
1935
|
<th>Comments</th>
|
|
1936
|
+
<th>Source</th>
|
|
1919
1937
|
</tr>
|
|
1920
1938
|
</thead>
|
|
1921
1939
|
<tbody>`;
|
|
@@ -1945,6 +1963,7 @@ var AllergyIntoleranceTemplate = class _AllergyIntoleranceTemplate {
|
|
|
1945
1963
|
<th>Onset Date</th>
|
|
1946
1964
|
<th>Comments</th>
|
|
1947
1965
|
<th>Resolved Date</th>
|
|
1966
|
+
<th>Source</th>
|
|
1948
1967
|
</tr>
|
|
1949
1968
|
</thead>
|
|
1950
1969
|
<tbody>`;
|
|
@@ -1985,7 +2004,8 @@ var AllergyIntoleranceTemplate = class _AllergyIntoleranceTemplate {
|
|
|
1985
2004
|
<td class="Category">${templateUtilities.renderTextAsHtml(templateUtilities.safeConcat(allergy.category)) || ""}</td>
|
|
1986
2005
|
<td class="Reaction">${templateUtilities.renderTextAsHtml(templateUtilities.concatReactionManifestation(allergy.reaction)) || ""}</td>
|
|
1987
2006
|
<td class="OnsetDate">${templateUtilities.renderTextAsHtml(templateUtilities.renderTime(allergy.onsetDateTime, timezone)) || ""}</td>
|
|
1988
|
-
<td class="Comments">${templateUtilities.renderNotes(allergy.note, timezone, { styled: true, warning: true })}</td
|
|
2007
|
+
<td class="Comments">${templateUtilities.renderNotes(allergy.note, timezone, { styled: true, warning: true })}</td>
|
|
2008
|
+
<td class="Source">${templateUtilities.getOwnerTag(allergy)}</td>`;
|
|
1989
2009
|
if (includeResolved) {
|
|
1990
2010
|
let endDate = "";
|
|
1991
2011
|
if (allergy.extension && Array.isArray(allergy.extension)) {
|
|
@@ -2041,6 +2061,7 @@ var MedicationSummaryTemplate = class _MedicationSummaryTemplate {
|
|
|
2041
2061
|
<th>Sig</th>
|
|
2042
2062
|
<th>Days of Supply</th>
|
|
2043
2063
|
<th>Start Date</th>
|
|
2064
|
+
<th>Source</th>
|
|
2044
2065
|
</tr>
|
|
2045
2066
|
</thead>
|
|
2046
2067
|
<tbody>`;
|
|
@@ -2069,6 +2090,9 @@ var MedicationSummaryTemplate = class _MedicationSummaryTemplate {
|
|
|
2069
2090
|
case "Authored On Date":
|
|
2070
2091
|
data["startDate"] = templateUtilities.renderTextAsHtml(columnData.text?.div ?? "");
|
|
2071
2092
|
break;
|
|
2093
|
+
case "Source":
|
|
2094
|
+
data["source"] = templateUtilities.renderTextAsHtml(columnData.text?.div ?? "");
|
|
2095
|
+
break;
|
|
2072
2096
|
default:
|
|
2073
2097
|
break;
|
|
2074
2098
|
}
|
|
@@ -2096,6 +2120,7 @@ var MedicationSummaryTemplate = class _MedicationSummaryTemplate {
|
|
|
2096
2120
|
<td>${templateUtilities.renderTextAsHtml(data["sig-prescriber"] || data["sig-pharmacy"])}</td>
|
|
2097
2121
|
<td>${templateUtilities.renderTextAsHtml(data["daysOfSupply"])}</td>
|
|
2098
2122
|
<td>${templateUtilities.renderTime(data["startDate"], timezone)}</td>
|
|
2123
|
+
<td>${data["source"] ?? ""}</td>
|
|
2099
2124
|
</tr>`;
|
|
2100
2125
|
}
|
|
2101
2126
|
}
|
|
@@ -2221,6 +2246,7 @@ var MedicationSummaryTemplate = class _MedicationSummaryTemplate {
|
|
|
2221
2246
|
<th>Sig</th>
|
|
2222
2247
|
<th>Dispense Quantity</th>
|
|
2223
2248
|
<th>Start Date</th>
|
|
2249
|
+
<th>Source</th>
|
|
2224
2250
|
</tr>
|
|
2225
2251
|
</thead>
|
|
2226
2252
|
<tbody>`;
|
|
@@ -2279,6 +2305,7 @@ var MedicationSummaryTemplate = class _MedicationSummaryTemplate {
|
|
|
2279
2305
|
<td>${sig}</td>
|
|
2280
2306
|
<td>${dispenseQuantity}</td>
|
|
2281
2307
|
<td>${startDate}</td>
|
|
2308
|
+
<td>${templateUtilities.getOwnerTag(medication.resource)}</td>
|
|
2282
2309
|
</tr>`;
|
|
2283
2310
|
}
|
|
2284
2311
|
html += `
|
|
@@ -2323,6 +2350,7 @@ var ImmunizationsTemplate = class _ImmunizationsTemplate {
|
|
|
2323
2350
|
<th>Code (System)</th>
|
|
2324
2351
|
<th>Status</th>
|
|
2325
2352
|
<th>Date</th>
|
|
2353
|
+
<th>Source</th>
|
|
2326
2354
|
</tr>
|
|
2327
2355
|
</thead>
|
|
2328
2356
|
<tbody>`;
|
|
@@ -2342,6 +2370,9 @@ var ImmunizationsTemplate = class _ImmunizationsTemplate {
|
|
|
2342
2370
|
case "occurrenceDateTime":
|
|
2343
2371
|
data["occurrenceDateTime"] = templateUtilities.renderTextAsHtml(columnData.text?.div ?? "");
|
|
2344
2372
|
break;
|
|
2373
|
+
case "Source":
|
|
2374
|
+
data["source"] = templateUtilities.renderTextAsHtml(columnData.text?.div ?? "");
|
|
2375
|
+
break;
|
|
2345
2376
|
default:
|
|
2346
2377
|
break;
|
|
2347
2378
|
}
|
|
@@ -2357,6 +2388,7 @@ var ImmunizationsTemplate = class _ImmunizationsTemplate {
|
|
|
2357
2388
|
<td>${data["codeSystem"] ?? ""}</td>
|
|
2358
2389
|
<td>${data["status"] ?? ""}</td>
|
|
2359
2390
|
<td>${templateUtilities.renderTime(data["occurrenceDateTime"], timezone) ?? ""}</td>
|
|
2391
|
+
<td>${data["source"] ?? ""}</td>
|
|
2360
2392
|
</tr>`;
|
|
2361
2393
|
}
|
|
2362
2394
|
}
|
|
@@ -2387,6 +2419,7 @@ var ImmunizationsTemplate = class _ImmunizationsTemplate {
|
|
|
2387
2419
|
<th>Lot Number</th>
|
|
2388
2420
|
<th>Comments</th>
|
|
2389
2421
|
<th>Date</th>
|
|
2422
|
+
<th>Source</th>
|
|
2390
2423
|
</tr>
|
|
2391
2424
|
</thead>
|
|
2392
2425
|
<tbody>`;
|
|
@@ -2408,6 +2441,7 @@ var ImmunizationsTemplate = class _ImmunizationsTemplate {
|
|
|
2408
2441
|
<td>${imm.lotNumber || ""}</td>
|
|
2409
2442
|
<td>${templateUtilities.renderNotes(imm.note, timezone)}</td>
|
|
2410
2443
|
<td>${templateUtilities.renderTime(imm.occurrenceDateTime, timezone)}</td>
|
|
2444
|
+
<td>${templateUtilities.getOwnerTag(imm)}</td>
|
|
2411
2445
|
</tr>`;
|
|
2412
2446
|
}
|
|
2413
2447
|
}
|
|
@@ -2448,6 +2482,7 @@ var ProblemListTemplate = class _ProblemListTemplate {
|
|
|
2448
2482
|
<th>Is Chronic</th>
|
|
2449
2483
|
<th>Onset Date</th>
|
|
2450
2484
|
<th>Last Confirmed Date</th>
|
|
2485
|
+
<th>Source</th>
|
|
2451
2486
|
</tr>
|
|
2452
2487
|
</thead>
|
|
2453
2488
|
<tbody>`;
|
|
@@ -2472,6 +2507,7 @@ var ProblemListTemplate = class _ProblemListTemplate {
|
|
|
2472
2507
|
<td>${data["Is Chronic"] ?? ""}</td>
|
|
2473
2508
|
<td>${templateUtilities.renderTime(data["Onset Date"], timezone) ?? ""}</td>
|
|
2474
2509
|
<td>${templateUtilities.renderTime(data["Last Confirmed Date"], timezone) ?? ""}</td>
|
|
2510
|
+
<td>${data["Source"] ?? ""}</td>
|
|
2475
2511
|
</tr>`;
|
|
2476
2512
|
}
|
|
2477
2513
|
}
|
|
@@ -2510,6 +2546,7 @@ var ProblemListTemplate = class _ProblemListTemplate {
|
|
|
2510
2546
|
<th>Code (System)</th>
|
|
2511
2547
|
<th>Onset Date</th>
|
|
2512
2548
|
<th>Recorded Date</th>
|
|
2549
|
+
<th>Source</th>
|
|
2513
2550
|
</tr>
|
|
2514
2551
|
</thead>
|
|
2515
2552
|
<tbody>`;
|
|
@@ -2529,6 +2566,7 @@ var ProblemListTemplate = class _ProblemListTemplate {
|
|
|
2529
2566
|
<td class="CodeSystem">${codeAndSystem}</td>
|
|
2530
2567
|
<td class="OnsetDate">${templateUtilities.renderDate(cond.onsetDateTime)}</td>
|
|
2531
2568
|
<td class="RecordedDate">${templateUtilities.renderDate(cond.recordedDate)}</td>
|
|
2569
|
+
<td class="Source">${templateUtilities.getOwnerTag(cond)}</td>
|
|
2532
2570
|
</tr>`;
|
|
2533
2571
|
}
|
|
2534
2572
|
html += `</tbody>
|
|
@@ -2568,6 +2606,7 @@ var VitalSignsTemplate = class _VitalSignsTemplate {
|
|
|
2568
2606
|
<th>Code (System)</th>
|
|
2569
2607
|
<th>Result</th>
|
|
2570
2608
|
<th>Date</th>
|
|
2609
|
+
<th>Source</th>
|
|
2571
2610
|
</tr>
|
|
2572
2611
|
</thead>
|
|
2573
2612
|
<tbody>`;
|
|
@@ -2610,6 +2649,7 @@ var VitalSignsTemplate = class _VitalSignsTemplate {
|
|
|
2610
2649
|
<td>${data["codeSystem"] ?? ""}</td>
|
|
2611
2650
|
<td>${templateUtilities.extractObservationSummaryValue(data, timezone) ?? ""}</td>
|
|
2612
2651
|
<td>${templateUtilities.extractObservationSummaryEffectiveTime(data, timezone) ?? ""}</td>
|
|
2652
|
+
<td>${data["Source"] ?? ""}</td>
|
|
2613
2653
|
</tr>`;
|
|
2614
2654
|
}
|
|
2615
2655
|
}
|
|
@@ -2647,6 +2687,7 @@ var VitalSignsTemplate = class _VitalSignsTemplate {
|
|
|
2647
2687
|
<th>Component(s)</th>
|
|
2648
2688
|
<th>Comments</th>
|
|
2649
2689
|
<th>Date</th>
|
|
2690
|
+
<th>Source</th>
|
|
2650
2691
|
</tr>
|
|
2651
2692
|
</thead>
|
|
2652
2693
|
<tbody>`;
|
|
@@ -2665,6 +2706,7 @@ var VitalSignsTemplate = class _VitalSignsTemplate {
|
|
|
2665
2706
|
<td>${templateUtilities.renderComponent(obs.component)}</td>
|
|
2666
2707
|
<td>${templateUtilities.renderNotes(obs.note, timezone)}</td>
|
|
2667
2708
|
<td>${obs.effectiveDateTime ? templateUtilities.renderTime(obs.effectiveDateTime, timezone) : obs.effectivePeriod ? templateUtilities.renderPeriod(obs.effectivePeriod, timezone) : ""}</td>
|
|
2709
|
+
<td>${templateUtilities.getOwnerTag(obs)}</td>
|
|
2668
2710
|
</tr>`;
|
|
2669
2711
|
}
|
|
2670
2712
|
html += `
|
|
@@ -2701,6 +2743,7 @@ var MedicalDevicesTemplate = class _MedicalDevicesTemplate {
|
|
|
2701
2743
|
<th>Status</th>
|
|
2702
2744
|
<th>Comments</th>
|
|
2703
2745
|
<th>Date Recorded</th>
|
|
2746
|
+
<th>Source</th>
|
|
2704
2747
|
</tr>
|
|
2705
2748
|
</thead>
|
|
2706
2749
|
<tbody>`;
|
|
@@ -2722,6 +2765,7 @@ var MedicalDevicesTemplate = class _MedicalDevicesTemplate {
|
|
|
2722
2765
|
<td>${templateUtilities.renderTextAsHtml(dus.status || "")}</td>
|
|
2723
2766
|
<td>${templateUtilities.renderNotes(dus.note, timezone)}</td>
|
|
2724
2767
|
<td>${templateUtilities.renderTextAsHtml(templateUtilities.renderRecorded(dus.recordedOn, timezone))}</td>
|
|
2768
|
+
<td>${templateUtilities.getOwnerTag(dus)}</td>
|
|
2725
2769
|
</tr>`;
|
|
2726
2770
|
}
|
|
2727
2771
|
html += `
|
|
@@ -2874,6 +2918,9 @@ var DiagnosticResultsTemplate = class _DiagnosticResultsTemplate {
|
|
|
2874
2918
|
case "effectivePeriod.end":
|
|
2875
2919
|
targetData["effectivePeriodEnd"] = templateUtilities.renderTextAsHtml(column.text?.div ?? "");
|
|
2876
2920
|
break;
|
|
2921
|
+
case "Source":
|
|
2922
|
+
targetData["source"] = templateUtilities.renderTextAsHtml(column.text?.div ?? "");
|
|
2923
|
+
break;
|
|
2877
2924
|
// valueQuantity
|
|
2878
2925
|
case "valueQuantity.value":
|
|
2879
2926
|
targetData["value"] = templateUtilities.renderTextAsHtml(column.text?.div ?? "");
|
|
@@ -3092,6 +3139,7 @@ var DiagnosticResultsTemplate = class _DiagnosticResultsTemplate {
|
|
|
3092
3139
|
<th>Result</th>
|
|
3093
3140
|
<th>Reference Range</th>
|
|
3094
3141
|
<th>Date</th>
|
|
3142
|
+
<th>Source</th>
|
|
3095
3143
|
</tr>
|
|
3096
3144
|
</thead>
|
|
3097
3145
|
<tbody>`;
|
|
@@ -3105,6 +3153,7 @@ var DiagnosticResultsTemplate = class _DiagnosticResultsTemplate {
|
|
|
3105
3153
|
<th>Report</th>
|
|
3106
3154
|
<th>Performer</th>
|
|
3107
3155
|
<th>Issued</th>
|
|
3156
|
+
<th>Source</th>
|
|
3108
3157
|
</tr>
|
|
3109
3158
|
</thead>
|
|
3110
3159
|
<tbody>`;
|
|
@@ -3151,6 +3200,8 @@ var DiagnosticResultsTemplate = class _DiagnosticResultsTemplate {
|
|
|
3151
3200
|
case "Status":
|
|
3152
3201
|
data["status"] = templateUtilities.renderTextAsHtml(columnData.text?.div ?? "");
|
|
3153
3202
|
break;
|
|
3203
|
+
case "Source":
|
|
3204
|
+
data["source"] = templateUtilities.renderTextAsHtml(columnData.text?.div ?? "");
|
|
3154
3205
|
break;
|
|
3155
3206
|
default:
|
|
3156
3207
|
break;
|
|
@@ -3188,6 +3239,7 @@ var DiagnosticResultsTemplate = class _DiagnosticResultsTemplate {
|
|
|
3188
3239
|
<td>${templateUtilities.renderTextAsHtml(component["formattedValue"]) ?? ""}</td>
|
|
3189
3240
|
<td>${templateUtilities.renderTextAsHtml(component["referenceRange"])?.trim() ?? ""}</td>
|
|
3190
3241
|
<td>${date ?? ""}</td>
|
|
3242
|
+
<td>${data["source"] ?? ""}</td>
|
|
3191
3243
|
</tr>`;
|
|
3192
3244
|
}
|
|
3193
3245
|
}
|
|
@@ -3207,6 +3259,7 @@ var DiagnosticResultsTemplate = class _DiagnosticResultsTemplate {
|
|
|
3207
3259
|
<td>${templateUtilities.renderTextAsHtml(data["formattedValue"]) ?? ""}</td>
|
|
3208
3260
|
<td>${templateUtilities.renderTextAsHtml(data["referenceRange"])?.trim() ?? ""}</td>
|
|
3209
3261
|
<td>${date ?? ""}</td>
|
|
3262
|
+
<td>${data["source"] ?? ""}</td>
|
|
3210
3263
|
</tr>`;
|
|
3211
3264
|
}
|
|
3212
3265
|
}
|
|
@@ -3228,6 +3281,7 @@ var DiagnosticResultsTemplate = class _DiagnosticResultsTemplate {
|
|
|
3228
3281
|
<td>${templateUtilities.capitalizeFirstLetter(data["report"] ?? "")}</td>
|
|
3229
3282
|
<td>${data["performer"] ?? ""}</td>
|
|
3230
3283
|
<td>${templateUtilities.renderTime(data["issued"], timezone) ?? ""}</td>
|
|
3284
|
+
<td>${data["source"] ?? ""}</td>
|
|
3231
3285
|
</tr>`;
|
|
3232
3286
|
}
|
|
3233
3287
|
}
|
|
@@ -3412,6 +3466,7 @@ var DiagnosticResultsTemplate = class _DiagnosticResultsTemplate {
|
|
|
3412
3466
|
<th>Result</th>
|
|
3413
3467
|
<th>Reference Range</th>
|
|
3414
3468
|
<th>Date</th>
|
|
3469
|
+
<th>Source</th>
|
|
3415
3470
|
</tr>
|
|
3416
3471
|
</thead>
|
|
3417
3472
|
<tbody>`;
|
|
@@ -3432,6 +3487,7 @@ var DiagnosticResultsTemplate = class _DiagnosticResultsTemplate {
|
|
|
3432
3487
|
<td>${templateUtilities.extractObservationValue(obs)}</td>
|
|
3433
3488
|
<td>${templateUtilities.concatReferenceRange(obs.referenceRange)}</td>
|
|
3434
3489
|
<td>${obs.effectiveDateTime ? templateUtilities.renderTime(obs.effectiveDateTime, timezone) : obs.effectivePeriod ? templateUtilities.renderPeriod(obs.effectivePeriod, timezone) : ""}</td>
|
|
3490
|
+
<td>${templateUtilities.getOwnerTag(obs)}</td>
|
|
3435
3491
|
</tr>`;
|
|
3436
3492
|
}
|
|
3437
3493
|
}
|
|
@@ -3458,6 +3514,7 @@ var DiagnosticResultsTemplate = class _DiagnosticResultsTemplate {
|
|
|
3458
3514
|
<th>Category</th>
|
|
3459
3515
|
<th>Result</th>
|
|
3460
3516
|
<th>Issued</th>
|
|
3517
|
+
<th>Source</th>
|
|
3461
3518
|
</tr>
|
|
3462
3519
|
</thead>
|
|
3463
3520
|
<tbody>`;
|
|
@@ -3482,6 +3539,7 @@ var DiagnosticResultsTemplate = class _DiagnosticResultsTemplate {
|
|
|
3482
3539
|
<td>${templateUtilities.firstFromCodeableConceptList(report.category)}</td>
|
|
3483
3540
|
<td>${resultCount}</td>
|
|
3484
3541
|
<td>${report.issued ? templateUtilities.renderTime(report.issued, timezone) : ""}</td>
|
|
3542
|
+
<td>${templateUtilities.getOwnerTag(report)}</td>
|
|
3485
3543
|
</tr>`;
|
|
3486
3544
|
}
|
|
3487
3545
|
}
|
|
@@ -3548,6 +3606,7 @@ var HistoryOfProceduresTemplate = class _HistoryOfProceduresTemplate {
|
|
|
3548
3606
|
<th>Code (System)</th>
|
|
3549
3607
|
<th>Performer</th>
|
|
3550
3608
|
<th>Date</th>
|
|
3609
|
+
<th>Source</th>
|
|
3551
3610
|
</tr>
|
|
3552
3611
|
</thead>
|
|
3553
3612
|
<tbody>`;
|
|
@@ -3567,6 +3626,8 @@ var HistoryOfProceduresTemplate = class _HistoryOfProceduresTemplate {
|
|
|
3567
3626
|
case "Performed Date":
|
|
3568
3627
|
data["date"] = columnData.text?.div ?? "";
|
|
3569
3628
|
break;
|
|
3629
|
+
case "Source":
|
|
3630
|
+
data["source"] = columnData.text?.div ?? "";
|
|
3570
3631
|
break;
|
|
3571
3632
|
default:
|
|
3572
3633
|
break;
|
|
@@ -3582,6 +3643,7 @@ var HistoryOfProceduresTemplate = class _HistoryOfProceduresTemplate {
|
|
|
3582
3643
|
<td>${data["codeSystem"] ?? ""}</td>
|
|
3583
3644
|
<td>${data["performer"] ?? ""}</td>
|
|
3584
3645
|
<td>${templateUtilities.renderTime(data["date"], timezone) ?? ""}</td>
|
|
3646
|
+
<td>${data["source"] ?? ""}</td>
|
|
3585
3647
|
</tr>`;
|
|
3586
3648
|
}
|
|
3587
3649
|
}
|
|
@@ -3609,6 +3671,7 @@ var HistoryOfProceduresTemplate = class _HistoryOfProceduresTemplate {
|
|
|
3609
3671
|
<th>Code (System)</th>
|
|
3610
3672
|
<th>Comments</th>
|
|
3611
3673
|
<th>Date</th>
|
|
3674
|
+
<th>Source</th>
|
|
3612
3675
|
</tr>
|
|
3613
3676
|
</thead>
|
|
3614
3677
|
<tbody>`;
|
|
@@ -3624,6 +3687,7 @@ var HistoryOfProceduresTemplate = class _HistoryOfProceduresTemplate {
|
|
|
3624
3687
|
<td>${templateUtilities.codeableConceptCoding(proc.code)}</td>
|
|
3625
3688
|
<td>${templateUtilities.renderNotes(proc.note, timezone)}</td>
|
|
3626
3689
|
<td>${templateUtilities.renderTime(proc.performedDateTime || proc.performedPeriod?.start, timezone)}</td>
|
|
3690
|
+
<td>${templateUtilities.getOwnerTag(proc)}</td>
|
|
3627
3691
|
</tr>`;
|
|
3628
3692
|
}
|
|
3629
3693
|
html += `
|
|
@@ -3665,6 +3729,7 @@ var SocialHistoryTemplate = class _SocialHistoryTemplate {
|
|
|
3665
3729
|
<th>Result</th>
|
|
3666
3730
|
<th>Date</th>
|
|
3667
3731
|
<th>Comments</th>
|
|
3732
|
+
<th>Source</th>
|
|
3668
3733
|
</tr>
|
|
3669
3734
|
</thead>
|
|
3670
3735
|
<tbody>`;
|
|
@@ -3690,6 +3755,7 @@ var SocialHistoryTemplate = class _SocialHistoryTemplate {
|
|
|
3690
3755
|
<td>${templateUtilities.extractObservationSummaryValue(data, timezone) ?? ""}</td>
|
|
3691
3756
|
<td>${templateUtilities.extractObservationSummaryEffectiveTime(data, timezone) ?? ""}</td>
|
|
3692
3757
|
<td>${data["Notes"] ?? ""}</td>
|
|
3758
|
+
<td>${data["Source"] ?? ""}</td>
|
|
3693
3759
|
</tr>`;
|
|
3694
3760
|
}
|
|
3695
3761
|
}
|
|
@@ -3725,6 +3791,7 @@ var SocialHistoryTemplate = class _SocialHistoryTemplate {
|
|
|
3725
3791
|
<th>Unit</th>
|
|
3726
3792
|
<th>Comments</th>
|
|
3727
3793
|
<th>Date</th>
|
|
3794
|
+
<th>Source</th>
|
|
3728
3795
|
</tr>
|
|
3729
3796
|
</thead>
|
|
3730
3797
|
<tbody>`;
|
|
@@ -3744,6 +3811,7 @@ var SocialHistoryTemplate = class _SocialHistoryTemplate {
|
|
|
3744
3811
|
<td>${templateUtilities.extractObservationValueUnit(obs)}</td>
|
|
3745
3812
|
<td>${templateUtilities.renderNotes(obs.note, timezone)}</td>
|
|
3746
3813
|
<td>${obs.effectiveDateTime ? templateUtilities.renderTime(obs.effectiveDateTime, timezone) : obs.effectivePeriod ? templateUtilities.renderPeriod(obs.effectivePeriod, timezone) : ""}</td>
|
|
3814
|
+
<td>${templateUtilities.getOwnerTag(obs)}</td>
|
|
3747
3815
|
</tr>`;
|
|
3748
3816
|
}
|
|
3749
3817
|
}
|
|
@@ -3794,6 +3862,7 @@ var PastHistoryOfIllnessTemplate = class {
|
|
|
3794
3862
|
<th>Onset Date</th>
|
|
3795
3863
|
<th>Recorded Date</th>
|
|
3796
3864
|
<th>Resolved Date</th>
|
|
3865
|
+
<th>Source</th>
|
|
3797
3866
|
</tr>
|
|
3798
3867
|
</thead>
|
|
3799
3868
|
<tbody>`;
|
|
@@ -3811,6 +3880,7 @@ var PastHistoryOfIllnessTemplate = class {
|
|
|
3811
3880
|
<td class="OnsetDate">${templateUtilities.renderDate(cond.onsetDateTime)}</td>
|
|
3812
3881
|
<td class="RecordedDate">${templateUtilities.renderDate(cond.recordedDate)}</td>
|
|
3813
3882
|
<td class="ResolvedDate">${templateUtilities.renderDate(cond.abatementDateTime)}</td>
|
|
3883
|
+
<td class="Source">${templateUtilities.getOwnerTag(cond)}</td>
|
|
3814
3884
|
</tr>`;
|
|
3815
3885
|
}
|
|
3816
3886
|
}
|
|
@@ -3846,6 +3916,7 @@ var PastHistoryOfIllnessTemplate = class {
|
|
|
3846
3916
|
<th>Onset Date</th>
|
|
3847
3917
|
<th>Last Confirmed Date</th>
|
|
3848
3918
|
<th>Resolved Date</th>
|
|
3919
|
+
<th>Source</th>
|
|
3849
3920
|
</tr>
|
|
3850
3921
|
</thead>
|
|
3851
3922
|
<tbody>`;
|
|
@@ -3875,6 +3946,7 @@ var PastHistoryOfIllnessTemplate = class {
|
|
|
3875
3946
|
<td>${templateUtilities.renderTime(data["Onset Date"], timezone) ?? ""}</td>
|
|
3876
3947
|
<td>${templateUtilities.renderTime(data["Last Confirmed Date"], timezone) ?? ""}</td>
|
|
3877
3948
|
<td>${templateUtilities.renderTime(data["Resolved Date"], timezone) ?? ""}</td>
|
|
3949
|
+
<td>${data["Source"] ?? ""}</td>
|
|
3878
3950
|
</tr>`;
|
|
3879
3951
|
}
|
|
3880
3952
|
}
|
|
@@ -3918,6 +3990,7 @@ var PlanOfCareTemplate = class {
|
|
|
3918
3990
|
<th>Comments</th>
|
|
3919
3991
|
<th>Planned Start</th>
|
|
3920
3992
|
<th>Planned End</th>
|
|
3993
|
+
<th>Source</th>
|
|
3921
3994
|
</tr>
|
|
3922
3995
|
</thead>
|
|
3923
3996
|
<tbody>`;
|
|
@@ -3933,6 +4006,7 @@ var PlanOfCareTemplate = class {
|
|
|
3933
4006
|
<td>${templateUtilities.concat(cp.note, "text")}</td>
|
|
3934
4007
|
<td>${cp.period?.start ? templateUtilities.renderTime(cp.period?.start, timezone) : ""}</td>
|
|
3935
4008
|
<td>${cp.period?.end ? templateUtilities.renderTime(cp.period?.end, timezone) : ""}</td>
|
|
4009
|
+
<td>${templateUtilities.getOwnerTag(cp)}</td>
|
|
3936
4010
|
</tr>`;
|
|
3937
4011
|
}
|
|
3938
4012
|
html += `
|
|
@@ -3960,6 +4034,7 @@ var PlanOfCareTemplate = class {
|
|
|
3960
4034
|
<th>Created</th>
|
|
3961
4035
|
<th>Planned Start</th>
|
|
3962
4036
|
<th>Planned End</th>
|
|
4037
|
+
<th>Source</th>
|
|
3963
4038
|
</tr>
|
|
3964
4039
|
</thead>
|
|
3965
4040
|
<tbody>`;
|
|
@@ -3984,6 +4059,7 @@ var PlanOfCareTemplate = class {
|
|
|
3984
4059
|
<td>${templateUtilities.renderTime(data["created"], timezone) ?? ""}</td>
|
|
3985
4060
|
<td>${templateUtilities.renderTime(data["period.start"], timezone) ?? ""}</td>
|
|
3986
4061
|
<td>${templateUtilities.renderTime(data["period.end"], timezone) ?? ""}</td>
|
|
4062
|
+
<td>${data["Source"] ?? ""}</td>
|
|
3987
4063
|
</tr>`;
|
|
3988
4064
|
}
|
|
3989
4065
|
}
|
|
@@ -4028,6 +4104,7 @@ var FunctionalStatusTemplate = class _FunctionalStatusTemplate {
|
|
|
4028
4104
|
<th>Code (System)</th>
|
|
4029
4105
|
<th>Onset Date</th>
|
|
4030
4106
|
<th>Recorded Date</th>
|
|
4107
|
+
<th>Source</th>
|
|
4031
4108
|
</tr>
|
|
4032
4109
|
</thead>
|
|
4033
4110
|
<tbody>`;
|
|
@@ -4042,6 +4119,7 @@ var FunctionalStatusTemplate = class _FunctionalStatusTemplate {
|
|
|
4042
4119
|
<th>Code (System)</th>
|
|
4043
4120
|
<th>Description</th>
|
|
4044
4121
|
<th>Summary</th>
|
|
4122
|
+
<th>Source</th>
|
|
4045
4123
|
</tr>
|
|
4046
4124
|
</thead>
|
|
4047
4125
|
<tbody>`;
|
|
@@ -4081,6 +4159,7 @@ var FunctionalStatusTemplate = class _FunctionalStatusTemplate {
|
|
|
4081
4159
|
<td>${templateUtilities.codeableConceptCoding(sectionCodeableConcept)}</td>
|
|
4082
4160
|
<td>${date}</td>
|
|
4083
4161
|
<td>${templateUtilities.renderTime(data["recordedDate"], timezone) ?? ""}</td>
|
|
4162
|
+
<td>${data["Source"] ?? ""}</td>
|
|
4084
4163
|
</tr>`;
|
|
4085
4164
|
}
|
|
4086
4165
|
} else if (resourceItem.title === "Clinical Impression|Clinical Impression Summary") {
|
|
@@ -4107,6 +4186,7 @@ var FunctionalStatusTemplate = class _FunctionalStatusTemplate {
|
|
|
4107
4186
|
<td>${templateUtilities.codeableConceptCoding(sectionCodeableConcept)}</td>
|
|
4108
4187
|
<td>${data["Description"] ?? ""}</td>
|
|
4109
4188
|
<td>${data["Summary"] ?? ""}</td>
|
|
4189
|
+
<td>${data["Source"] ?? ""}</td>
|
|
4110
4190
|
</tr>`;
|
|
4111
4191
|
}
|
|
4112
4192
|
}
|
|
@@ -4160,7 +4240,7 @@ var FunctionalStatusTemplate = class _FunctionalStatusTemplate {
|
|
|
4160
4240
|
return getImpressionDate(b) - getImpressionDate(a);
|
|
4161
4241
|
});
|
|
4162
4242
|
if (functionalObservations.length > 0) {
|
|
4163
|
-
html += `<table><thead><tr><th>Observation</th><th>Value</th><th>Date</th><th>Interpretation</th><th>Comments</th></tr></thead><tbody>`;
|
|
4243
|
+
html += `<table><thead><tr><th>Observation</th><th>Value</th><th>Date</th><th>Interpretation</th><th>Comments</th><th>Source</th></tr></thead><tbody>`;
|
|
4164
4244
|
for (const obs of functionalObservations) {
|
|
4165
4245
|
const observation = obs;
|
|
4166
4246
|
const obsName = templateUtilities.codeableConceptDisplay(observation.code);
|
|
@@ -4177,12 +4257,13 @@ var FunctionalStatusTemplate = class _FunctionalStatusTemplate {
|
|
|
4177
4257
|
<td>${date}</td>
|
|
4178
4258
|
<td>${interpretation}</td>
|
|
4179
4259
|
<td>${comments}</td>
|
|
4260
|
+
<td>${templateUtilities.getOwnerTag(observation)}</td>
|
|
4180
4261
|
</tr>`;
|
|
4181
4262
|
}
|
|
4182
4263
|
html += `</tbody></table>`;
|
|
4183
4264
|
}
|
|
4184
4265
|
if (clinicalImpressions.length > 0) {
|
|
4185
|
-
html += `<table><thead><tr><th>Date</th><th>Status</th><th>Description</th><th>Summary</th><th>Findings</th></tr></thead><tbody>`;
|
|
4266
|
+
html += `<table><thead><tr><th>Date</th><th>Status</th><th>Description</th><th>Summary</th><th>Findings</th><th>Source</th></tr></thead><tbody>`;
|
|
4186
4267
|
for (const impression of clinicalImpressions) {
|
|
4187
4268
|
let formattedDate = "";
|
|
4188
4269
|
if (impression.effectiveDateTime) {
|
|
@@ -4208,6 +4289,7 @@ var FunctionalStatusTemplate = class _FunctionalStatusTemplate {
|
|
|
4208
4289
|
<td>${impression.description || ""}</td>
|
|
4209
4290
|
<td>${impression.summary || ""}</td>
|
|
4210
4291
|
<td>${findingsHtml}</td>
|
|
4292
|
+
<td>${templateUtilities.getOwnerTag(impression)}</td>
|
|
4211
4293
|
</tr>`;
|
|
4212
4294
|
}
|
|
4213
4295
|
html += `</tbody></table>`;
|
|
@@ -4274,10 +4356,11 @@ var PregnancyTemplate = class _PregnancyTemplate {
|
|
|
4274
4356
|
<th>Code (System)</th>
|
|
4275
4357
|
<th>Comments</th>
|
|
4276
4358
|
<th>Date</th>
|
|
4359
|
+
<th>Source</th>
|
|
4277
4360
|
</tr>
|
|
4278
4361
|
</thead>
|
|
4279
4362
|
<tbody>`;
|
|
4280
|
-
function renderRow({ result, comments, date, codeSystem }) {
|
|
4363
|
+
function renderRow({ result, comments, date, codeSystem, resource }) {
|
|
4281
4364
|
if (result?.toLowerCase() === "unknown") {
|
|
4282
4365
|
return;
|
|
4283
4366
|
}
|
|
@@ -4287,6 +4370,7 @@ var PregnancyTemplate = class _PregnancyTemplate {
|
|
|
4287
4370
|
<td class="CodeSystem">${codeSystem}</td>
|
|
4288
4371
|
<td class="Comments">${comments}</td>
|
|
4289
4372
|
<td class="Date">${date}</td>
|
|
4373
|
+
<td class="Source">${templateUtilities.getOwnerTag(resource)}</td>
|
|
4290
4374
|
</tr>`;
|
|
4291
4375
|
}
|
|
4292
4376
|
const rowResources = [];
|
|
@@ -4340,7 +4424,7 @@ var PregnancyTemplate = class _PregnancyTemplate {
|
|
|
4340
4424
|
const rowKey = `${result}|${codeSystem}`;
|
|
4341
4425
|
if (!addedRows.has(rowKey)) {
|
|
4342
4426
|
addedRows.add(rowKey);
|
|
4343
|
-
renderRow({ result, comments, date: dateStr, codeSystem });
|
|
4427
|
+
renderRow({ result, comments, date: dateStr, codeSystem, resource });
|
|
4344
4428
|
}
|
|
4345
4429
|
}
|
|
4346
4430
|
html += `
|
|
@@ -4384,6 +4468,7 @@ var AdvanceDirectivesTemplate = class _AdvanceDirectivesTemplate {
|
|
|
4384
4468
|
<th>Status</th>
|
|
4385
4469
|
<th>Action Controlled</th>
|
|
4386
4470
|
<th>Date</th>
|
|
4471
|
+
<th>Source</th>
|
|
4387
4472
|
</tr>
|
|
4388
4473
|
</thead>
|
|
4389
4474
|
<tbody>`;
|
|
@@ -4401,6 +4486,7 @@ var AdvanceDirectivesTemplate = class _AdvanceDirectivesTemplate {
|
|
|
4401
4486
|
<td>${consent.status || ""}</td>
|
|
4402
4487
|
<td>${consent.provision?.action ? templateUtilities.concatCodeableConcept(consent.provision.action) : ""}</td>
|
|
4403
4488
|
<td>${consent.dateTime || ""}</td>
|
|
4489
|
+
<td>${templateUtilities.getOwnerTag(consent)}</td>
|
|
4404
4490
|
</tr>`;
|
|
4405
4491
|
}
|
|
4406
4492
|
html += `
|