-
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.
Initial conversion mirroring viewer templates
- Loading branch information
1 parent
278958a
commit 7a16ff1
Showing
8 changed files
with
284 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<script> | ||
import { | ||
Card, | ||
CardBody | ||
} from 'sveltestrap'; | ||
export let resource; // Define a prop to pass the data to the component | ||
</script> | ||
|
||
<Card> | ||
<CardBody> | ||
Type: {resource.resourceType} | ||
<br/> | ||
Text: | ||
{#if resource.text && resource.text.div} | ||
{resource.text.div} | ||
{:else} | ||
<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} | ||
{/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} | ||
{/if} | ||
{#if resource.description && resource.description.text} | ||
{resource.description.text} | ||
{/if} | ||
</CardBody> | ||
</Card> |
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<script lang="ts"> | ||
import { | ||
Card, | ||
CardBody | ||
} from 'sveltestrap'; | ||
export let resource:any; // Define a prop to pass the data to the component | ||
function badgeColor(criticality: string | undefined) { | ||
if (criticality) { | ||
if (criticality == "high") { | ||
return "badge-danger"; | ||
} else { | ||
return "badge-primary"; | ||
} | ||
} else { | ||
return "badge-secondary"; | ||
} | ||
} | ||
</script> | ||
|
||
<Card> | ||
<CardBody> | ||
<span class={"badge " + badgeColor(resource.criticality ?? "")}>{resource.type ?? ""} - {resource.category && resource.category.length > 0 ? resource.criticality[0] : ""} - Criticality: {resource.criticality ?? ""}</span> | ||
{#if resource.code && resource.code.coding} | ||
<br> | ||
{resource.code.coding[0].display} ({resource.code.coding[0].code}) | ||
{/if} | ||
</CardBody> | ||
</Card> |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<script> | ||
import { | ||
Card, | ||
CardBody | ||
} from 'sveltestrap'; | ||
export let resource; // Define a prop to pass the data to the component | ||
</script> | ||
|
||
<Card> | ||
<CardBody> | ||
<span><b>{resource.occurrenceDateTime}</b></span> | ||
<br/> | ||
<span> | ||
{#if resource.vaccineCode.coding[0].display} | ||
{resource.vaccineCode.coding[0].display} | ||
{:else} | ||
{resource.vaccineCode.text} | ||
{/if} | ||
</span> | ||
<br/> | ||
<span class="badge badge-primary">{resource.vaccineCode.coding[0].system}</span>{resource.vaccineCode.coding[0].code} | ||
<br/> | ||
</CardBody> | ||
</Card> | ||
|
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 |
---|---|---|
@@ -0,0 +1,80 @@ | ||
<script> | ||
import { | ||
Card, | ||
CardBody | ||
} from 'sveltestrap'; | ||
export let resource; // Define a prop to pass the data to the component | ||
</script> | ||
|
||
<Card> | ||
<CardBody> | ||
<!-- {resource.statement.resourceType} --> | ||
<!-- <br /> --> | ||
{#if resource.code && resource.code.coding && resource.code.coding.length} | ||
{#each resource.code.coding as code} | ||
<span class="badge badge-primary">{code.system}</span> | ||
<br> | ||
{code.display} | ||
{#if code.code} | ||
({code.code}) | ||
{/if} | ||
<br> | ||
{/each} | ||
{:else} | ||
<span class="badge badge-secondary">uncoded</span> | ||
<br> | ||
{#if resource.code && resource.code.text} | ||
{resource.code.text} | ||
{:else} | ||
{resource.statement.resourceReference.display} | ||
{/if} | ||
<br> | ||
{/if} | ||
{#if resource.ingredient && resource.ingredient.resourceCodeableConcept} | ||
{#each resource.ingredient as 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> | ||
<tr> | ||
<td>{ingredient.resourceCodeableConcept.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> | ||
</table> | ||
{/each} | ||
{/if} | ||
{#if resource.statement.dosage && resource.statement.dosage[0].route && resource.statement.dosage[0].route.coding && resource.statement.dosage[0].doseAndRate} | ||
<table class="table table-bordered table-sm"> | ||
<thead> | ||
<tr><th colspan="5">Dosage</th></tr> | ||
<tr> | ||
<th scope="col">Route</th> | ||
<th scope="col">Qty</th> | ||
<th scope="col">Unit</th> | ||
<th scope="col">Freq. Qty</th> | ||
<th scope="col">Freq. Period</th> | ||
</tr> | ||
</thead> | ||
<tr> | ||
<td>{resource.statement.dosage[0].route.coding[0].display}</td> | ||
<td>{resource.statement.dosage[0].doseAndRate[0].doseQuantity.value}</td> | ||
<td>{resource.statement.dosage[0].doseAndRate[0].doseQuantity.unit}</td> | ||
{#if resource.statement.dosage[0].timing && resource.statement.dosage[0].timing.repeat} | ||
<td>{resource.statement.dosage[0].timing.repeat.count}</td> | ||
<td>{resource.statement.dosage[0].timing.repeat.periodUnit}</td> | ||
{/if} | ||
</tr> | ||
</table> | ||
{/if} | ||
</CardBody> | ||
</Card> |
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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<script> | ||
import { | ||
Card, | ||
CardBody, | ||
Col, | ||
Row | ||
} from 'sveltestrap'; | ||
export let resource; // Define a prop to pass the data to the component | ||
</script> | ||
|
||
<Card> | ||
<CardBody> | ||
<Row> | ||
<Col> | ||
Name: | ||
{#if resource.code && resource.code.coding} | ||
{resource.code.coding[0].display} | ||
({resource.code.coding[0].code}) | ||
{/if} | ||
{#if resource.code && resource.code.text} | ||
[Uncoded text shown]: {resource.code.text} | ||
{/if} | ||
</Col> | ||
<Col> | ||
Date: | ||
{#if resource.effectiveDateTime} | ||
{resource.effectiveDateTime} | ||
{/if} | ||
</Col> | ||
</Row> | ||
<Row> | ||
<Col> | ||
Value: | ||
{#if resource.valueCodeableConcept} | ||
{resource.valueCodeableConcept.coding[0].display} | ||
{/if} | ||
{#if resource.valueQuantity} | ||
{resource.valueQuantity.value} {resource.valueQuantity.unit} | ||
{/if} | ||
{#if resource.valueString} | ||
{resource.valueString} | ||
{/if} | ||
</Col> | ||
{#if resource.category && resource.category[0] && resource.category[0].coding && resource.category[0].coding[0]} | ||
<Col>Category: {resource.category[0].coding[0].code}</Col> | ||
{/if} | ||
</Row> | ||
</CardBody> | ||
</Card> | ||
|
||
|
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<script> | ||
import { | ||
Card, | ||
CardBody, | ||
CardText | ||
} from "sveltestrap"; | ||
export let resource; | ||
</script> | ||
|
||
<Card> | ||
<CardBody> | ||
<CardText> | ||
Name: {resource.name[0].given}, {resource.name[0].family} | ||
<br> | ||
Birth Date: {resource.birthDate} | ||
</CardText> | ||
</CardBody> | ||
</Card> | ||
|
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<script> | ||
import { | ||
Card, | ||
CardBody | ||
} from 'sveltestrap'; | ||
export let resource; // Define a prop to pass the data to the component | ||
</script> | ||
|
||
<Card> | ||
<CardBody> | ||
{#if resource.onsetDateTime} | ||
<!-- Insert content here if onsetDateTime exists --> | ||
{/if} | ||
{#if resource.code && resource.code.coding && resource.code.coding[0]} | ||
<span class="badge badge-primary">{resource.code.coding[0].system}</span> | ||
<br> | ||
{resource.code.coding[0].display} ({resource.code.coding[0].code}) | ||
{/if} | ||
{#if resource.code && resource.code.text} | ||
[Uncoded text shown]: {resource.code.text} | ||
{/if} | ||
</CardBody> | ||
</Card> | ||
|