Skip to content

Commit be02e34

Browse files
committed
AdvanceDirective.svelte - finesse which DocumentReference fields to
display.
1 parent 49f83fb commit be02e34

File tree

1 file changed

+32
-4
lines changed

1 file changed

+32
-4
lines changed

src/lib/resource-templates/AdvanceDirective.svelte

+32-4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
export let resource; // Define a prop to pass the data to the component
33
</script>
44

5+
<!--
56
Type: {resource.resourceType}
67
<br />
78
Text:
@@ -11,15 +12,42 @@ Text:
1112
<i>No text provided in resource</i>
1213
{/if}
1314
<br />
15+
-->
16+
1417
Category:
1518
{#if resource.category && resource.category[0] && resource.category[0].coding && resource.category[0].coding[0]}
16-
{resource.category[0].coding[0].display}
19+
{resource.category[0].coding[0].display} (LOINC {resource.category[0].coding[0].code})
20+
{/if}
21+
<br />
22+
Type:
23+
<!-- 42348-3 is for "Advance Directive"; per cthon, it's presence here is redundant w/ category above. -->
24+
{#if resource.type && resource.type.coding && resource.type.coding[0] && resource.type.coding[0].code != '42348-3'}
25+
{resource.type.coding[0].display} (LOINC {resource.type.coding[0].code})
26+
{/if}
27+
{#if resource.type && resource.type.coding && resource.type.coding[1] && resource.type.coding[1].code != '42348-3'}
28+
{resource.type.coding[1].display} (LOINC {resource.type.coding[1].code}).
29+
{/if}
30+
<br />
31+
Description:
32+
{#if resource.description}
33+
{resource.description}
1734
{/if}
1835
<br />
19-
Intent:
20-
{#if resource.provision && resource.provision.code && resource.provision.code[0] && resource.provision.code[0].coding && resource.provision.code[0].coding[0]}
21-
{resource.provision.code[0].coding[0].display}
36+
Date:
37+
{#if resource.date}
38+
{resource.date}
2239
{/if}
40+
<br />
41+
Status:
42+
{#if resource.status}
43+
{resource.status}
44+
{/if}
45+
<br />
46+
docStatus:
47+
{#if resource.docStatus}
48+
{resource.docStatus}
49+
{/if}
50+
<br />
2351
{#if resource.description && resource.description.text}
2452
{resource.description.text}
2553
{/if}

0 commit comments

Comments
 (0)