Skip to content

Commit

Permalink
Update POLST formatting and add treatment type to comfort treatment l…
Browse files Browse the repository at this point in the history
…ines
  • Loading branch information
daniellrgn committed Dec 5, 2024
1 parent 5264f9b commit 96c6a5f
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions src/lib/components/resource-templates/AdvanceDirective.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -109,50 +109,50 @@ Text:

{#if resource.isPolst && (resource.isCpr || resource.isComfortTreatments || resource.isAdditionalTx || resource.isMedicallyAssisted)}
<br/>
<b>
POLST Details:
<b>POLST Details:</b>
<ul>
{#if resource.isCpr}
<ol>
{#if resource.doNotPerformCpr}
This includes an order to NOT perform CPR.
{:else}
This includes an order to perform CPR.
{/if}
<b>
{#if resource.doNotPerformCpr}
This includes an order to NOT perform CPR.
{:else}
This includes an order to perform CPR.
{/if}
</b>
</ol>
{/if}

{#if resource.isComfortTreatments}
<ol>
{#if resource.doNotPerformComfortTreatments}
This includes an order to NOT perform comfort-focused treatments: {@html resource.detailComfortTreatments}
<b>This includes an order to NOT perform treatments:</b> {@html resource.detailComfortTreatments}
{:else}
This includes an order to perform comfort-focused treatments: {@html resource.detailComfortTreatments}
<b>This includes an order to perform {resource.typeComfortTreatments ? `${resource.typeComfortTreatments.toLowerCase()}` : 'treatments'}:</b> {@html resource.detailComfortTreatments}
{/if}
</ol>
{/if}

{#if resource.isAdditionalTx}
<ol>
{#if resource.doNotPerformAdditionalTx}
This includes an order to NOT perform additional treatments: {@html resource.detailAdditionalTx}
<b>This includes an order to NOT perform additional treatments:</b> {@html resource.detailAdditionalTx}
{:else}
This includes an order to perform additional treatments: {@html resource.detailAdditionalTx}
<b>This includes an order to perform additional treatments:</b> {@html resource.detailAdditionalTx}
{/if}
</ol>
{/if}

{#if resource.isMedicallyAssisted}
<ol>
{#if resource.doNotPerformMedicallyAssisted}
This includes an order to NOT perform medically assisted nutrition: {@html resource.detailMedicallyAssisted}
<b>This includes an order to NOT perform medically assisted nutrition:</b> {@html resource.detailMedicallyAssisted}
{:else}
This includes an order to perform medically assisted nutrition: {@html resource.detailMedicallyAssisted}
<b>This includes an order to perform medically assisted nutrition:</b> {@html resource.detailMedicallyAssisted}
{/if}
</ol>
{/if}
</ul>
</b>
{/if}

{#if resource.content}
Expand All @@ -168,9 +168,11 @@ Text:
{/if}
{#each resource.content as content}
{#if content.attachment.contentType === "application/pdf" && content.attachment.data}
{#await base64toBlob(content.attachment.data, content.attachment.contentType) then url}
<b>PDF present:</b>
<a href={url} target="_blank" rel="noopener noreferrer">View</a>
<b>PDF present:</b>
{#await base64toBlob(content.attachment.data, content.attachment.contentType)}
Loading PDF...
{:then url}
<a href={url} target="_blank" rel="noopener noreferrer">View</a>
{/await}
{/if}
{/each}
Expand Down

0 comments on commit 96c6a5f

Please sign in to comment.