-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply common elements to resource templates; include OccupationalData…
… template option in Observation for viewer support
- Loading branch information
1 parent
adc15dc
commit 3fd9727
Showing
15 changed files
with
111 additions
and
454 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,13 @@ | ||
<script lang="ts"> | ||
import type { Location } from "fhir/r4"; | ||
import Address from "./Address.svelte"; | ||
import ContactPoint from "./ContactPoint.svelte"; | ||
export let resource: Location; // Define a prop to pass the data to the component | ||
</script> | ||
|
||
<strong>{resource.name ?? ""}</strong> | ||
<br /> | ||
{#if resource.telecom} | ||
<table class="table table-bordered table-sm"> | ||
<thead> | ||
<tr><th colspan="3">Contact Information</th></tr> | ||
</thead> | ||
<tr> | ||
{#each resource.telecom as telecom} | ||
<td>{telecom.system ?? ""}</td> | ||
<td>{telecom.use ?? ""}</td> | ||
<td>{telecom.value ?? ""}</td> | ||
{/each} | ||
</tr> | ||
</table> | ||
{/if} | ||
{#if resource.address} | ||
{#if resource.address.line} | ||
{#if resource.address.line.length > 0} | ||
{#each resource.address.line as line} | ||
{#if line !== ""} | ||
{line}<br /> | ||
{/if} | ||
{/each} | ||
{:else} | ||
{resource.address.line} | ||
{/if} | ||
{/if} | ||
{resource.address.city ?? "" | ||
}{resource.address.state | ||
? `, ${resource.address.state}` | ||
: '' | ||
}{resource.address.country | ||
? `, ${resource.address.country}` | ||
: ''} | ||
{resource.address.postalCode ?? ""} | ||
{/if} | ||
<ContactPoint contactPoint={resource.telecom} /> | ||
<Address address={resource.address} /> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,33 @@ | ||
<script lang="ts"> | ||
import { Badge} from 'sveltestrap'; | ||
import type { Medication } from "fhir/r4"; | ||
import CodeableConcept from '$lib/components/resource-templates/CodeableConcept.svelte'; | ||
export let resource: Medication; // Define a prop to pass the data to the component | ||
</script> | ||
|
||
{#if resource.code} | ||
{#if resource.code.coding} | ||
<Badge color="primary">{resource.code.coding[0].system} : {resource.code.coding[0].code}</Badge> | ||
<br /> | ||
{#if resource.code.coding[0].display} | ||
<strong>{resource.code.coding[0].display}</strong><br> | ||
{:else if resource.code.text} | ||
<strong>{resource.code.text}</strong><br> | ||
{/if} | ||
{:else if resource.code.text} | ||
<strong>{resource.code.text}</strong><br> | ||
{/if} | ||
{/if} | ||
<CodeableConcept codeableConcept={resource.code} /> | ||
{#if resource.ingredient} | ||
<table class="table table-bordered table-sm"> | ||
<thead> | ||
<tr><th colspan="5">Composition</th></tr> | ||
<tr> | ||
<th scope="col">Ingredient</th> | ||
<th scope="col">Strength Numerator Qty</th> | ||
<th scope="col">Unit</th> | ||
<th scope="col">Strength Denominator Qty</th> | ||
<th scope="col">Strength Denominator Unit</th> | ||
</tr> | ||
</thead> | ||
{#each resource.ingredient as ingredient} | ||
<tr> | ||
<td>{ingredient.itemCodeableConcept?.coding?.[0].display}</td> | ||
<td>{ingredient.strength?.numerator?.value}</td> | ||
<td>{ingredient.strength?.numerator?.unit}</td> | ||
<td>{ingredient.strength?.denominator?.value}</td> | ||
<td>{ingredient.strength?.denominator?.unit}</td> | ||
</tr> | ||
{/each} | ||
</table> | ||
<div class="ips-section-table"> | ||
<table class="table table-bordered table-sm"> | ||
<thead> | ||
<tr><th colspan="5">Composition</th></tr> | ||
<tr> | ||
<th scope="col">Ingredient</th> | ||
<th scope="col">Strength Numerator Qty</th> | ||
<th scope="col">Unit</th> | ||
<th scope="col">Strength Denominator Qty</th> | ||
<th scope="col">Strength Denominator Unit</th> | ||
</tr> | ||
</thead> | ||
{#each resource.ingredient as ingredient} | ||
<tr> | ||
<td>{ingredient.itemCodeableConcept?.coding?.[0].display}</td> | ||
<td>{ingredient.strength?.numerator?.value}</td> | ||
<td>{ingredient.strength?.numerator?.unit}</td> | ||
<td>{ingredient.strength?.denominator?.value}</td> | ||
<td>{ingredient.strength?.denominator?.unit}</td> | ||
</tr> | ||
{/each} | ||
</table> | ||
</div> | ||
{/if} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.