Skip to content

Commit

Permalink
AdvanceDirective.svelte - finesse which DocumentReference fields to
Browse files Browse the repository at this point in the history
display.
  • Loading branch information
mcjustin committed May 18, 2024
1 parent 49f83fb commit be02e34
Showing 1 changed file with 32 additions and 4 deletions.
36 changes: 32 additions & 4 deletions src/lib/resource-templates/AdvanceDirective.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
export let resource; // Define a prop to pass the data to the component
</script>

<!--
Type: {resource.resourceType}
<br />
Text:
Expand All @@ -11,15 +12,42 @@ Text:
<i>No text provided in resource</i>
{/if}
<br />
-->

Category:
{#if resource.category && resource.category[0] && resource.category[0].coding && resource.category[0].coding[0]}
{resource.category[0].coding[0].display}
{resource.category[0].coding[0].display} (LOINC {resource.category[0].coding[0].code})
{/if}
<br />
Type:
<!-- 42348-3 is for "Advance Directive"; per cthon, it's presence here is redundant w/ category above. -->
{#if resource.type && resource.type.coding && resource.type.coding[0] && resource.type.coding[0].code != '42348-3'}
{resource.type.coding[0].display} (LOINC {resource.type.coding[0].code})
{/if}
{#if resource.type && resource.type.coding && resource.type.coding[1] && resource.type.coding[1].code != '42348-3'}
{resource.type.coding[1].display} (LOINC {resource.type.coding[1].code}).
{/if}
<br />
Description:
{#if resource.description}
{resource.description}
{/if}
<br />
Intent:
{#if resource.provision && resource.provision.code && resource.provision.code[0] && resource.provision.code[0].coding && resource.provision.code[0].coding[0]}
{resource.provision.code[0].coding[0].display}
Date:
{#if resource.date}
{resource.date}
{/if}
<br />
Status:
{#if resource.status}
{resource.status}
{/if}
<br />
docStatus:
{#if resource.docStatus}
{resource.docStatus}
{/if}
<br />
{#if resource.description && resource.description.text}
{resource.description.text}
{/if}

0 comments on commit be02e34

Please sign in to comment.