Skip to content

Commit

Permalink
Merge pull request #23 from hl7-eu/master
Browse files Browse the repository at this point in the history
Merge to upgrade demo changes
  • Loading branch information
joofio authored Oct 3, 2024
2 parents e8e54fc + fdc3fc8 commit fda486e
Show file tree
Hide file tree
Showing 9 changed files with 1,518 additions and 11 deletions.
39 changes: 39 additions & 0 deletions ig-template/package/content/assets/css/ips-viewer.css
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,47 @@ ul {

}

.diagnostic {

background: #e5cffa;

}

.results {

background: #d6aeff;

}

.vs {

background: #ffaed4;

}
.vital {

background: #fbdcea;

}

.nonumbers::before {
content: "" !important;
}


.socialhistory {

background: #ffdfae;

}

.socialhistoryitem {

background: #f7ecdc;

}


.patient {

background: #f1e2f5;
Expand Down
186 changes: 182 additions & 4 deletions ig-template/package/includes/ips.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,11 @@
{{ pat.birthDate }}<br/>{% endif %}

</div>
<br/>
<h3>Sections:</h3>
<br/>
<h3 class="nonumbers">Sections</h3>


{% for sec in composition.section %}
<h4>{{ sec.title }}</h4>
<h4 class="nonumbers">{{ sec.title }}</h4>

{% if sec.title == "Allergies and Intolerances" %}
{% assign allergies = bundle.entry | where: "resource.resourceType", "AllergyIntolerance" %}
Expand Down Expand Up @@ -168,4 +166,184 @@
{% endif %}


{% if sec.title == "Relevant diagnostic tests &/or laboratory data" %}

<div class="results block">

{% for obsrid in sec.entry %}
{% if obsrid.reference contains "Observation" %}
{% assign obsid = obsrid.reference | replace: 'Observation/', '' %}

{% assign obsr = bundle.entry | where: "resource.id", obsid | first %}


{% assign obs = obsr.resource %}
<div class="diagnostic indent block">
<b>Observation:</b>
{{ obs.code.text }} <br/>


{% if obs.status %}
<b>Status:</b>
{{ obs.status }} <br/>{% endif %}

{% if obs.issued %}
<b>Issued:</b>
{{ obs.issued }} <br/>{% endif %}

{% if obs.valueQuantity %}
<b>Result:</b>
{{ obs.valueQuantity.value }} {{obs.valueQuantity.unit}} {% if obs.interpretation[0].coding[0].display %} ({{obs.interpretation[0].coding[0].display}}){% endif %} {% if obs.referenceRange[0].low %} [{{obs.referenceRange[0].low.value}} {{obs.referenceRange[0].low.unit}}-{{obs.referenceRange[0].high.value}} {{obs.referenceRange[0].high.unit}}]{% endif %}<br/>{% endif %}
{% if obs.component %}
<b>Result:</b>

{% for comp in obs.component %}
{% if comp.valueInteger %}
{{ comp.code.text }} || {{comp.valueInteger}} <br/>{% endif %}
{% if comp.valueQuantity %}
<br/>
{{ comp.code.text }} || {{ comp.valueQuantity.value }} {{comp.valueQuantity.unit}} {% endif %}

{% endfor %}

{% endif %}


</div>
{% endif %}

{% if obsrid.reference contains "DocumentReference" %}

{% assign obsid = obsrid.reference | replace: 'DocumentReference/', '' %}

{% assign obsr = bundle.entry | where: "resource.id", obsid | first %}


{% assign obs = obsr.resource %}
<div class="diagnostic indent block">
<b>Document Reference:</b>
{{ obs.category[0].text }} <br/>


{% if obs.status %}
<b>Status:</b>
{{ obs.status }} <br/>{% endif %}

{% if obs.date %}
<b>Date:</b>
{{ obs.date }} <br/>{% endif %}




</div>

{% endif %}

{% endfor %}
</div>
{% endif %}


{% if sec.title == "Vital signs" %}

<div class="vs block">

{% for obsrid in sec.entry %}

{% assign obsid = obsrid.reference | replace: 'Observation/', '' %}

{% assign obsr = bundle.entry | where: "resource.id", obsid | first %}


{% assign obs = obsr.resource %}
<div class="vital indent block">
<b>Code:</b>
{{ obs.code.text }} <br/>


{% if obs.status %}
<b>Status:</b>
{{ obs.status }} <br/>{% endif %}

{% if obs.issued %}
<b>Issued:</b>
{{ obs.issued }} <br/>{% endif %}

{% if obs.valueQuantity %}
<b>Result:</b>
{{ obs.valueQuantity.value }} {{obs.valueQuantity.unit}} {% if obs.interpretation[0].coding[0].display %} ({{obs.interpretation[0].coding[0].display}}){% endif %} {% if obs.referenceRange[0].low %} [{{obs.referenceRange[0].low.value}} {{obs.referenceRange[0].low.unit}}-{{obs.referenceRange[0].high.value}} {{obs.referenceRange[0].high.unit}}]{% endif %}<br/>{% endif %}
{% if obs.component %}
<b>Result:</b>

{% for comp in obs.component %}
{% if comp.valueInteger %}
{{ comp.code.text }} || {{comp.valueInteger}} <br/>{% endif %}
{% if comp.valueQuantity %}
<br/>
{{ comp.code.text }} || {{ comp.valueQuantity.value }} {{comp.valueQuantity.unit}} {% endif %}

{% endfor %}

{% endif %}

</div>

{% endfor %}
</div>
{% endif %}


{% if sec.title == "Social history Narrative" %}

<div class="socialhistory block">

{% for obsrid in sec.entry %}

{% assign obsid = obsrid.reference | replace: 'Observation/', '' %}

{% assign obsr = bundle.entry | where: "resource.id", obsid | first %}


{% assign obs = obsr.resource %}
<div class="socialhistoryitem indent block">
<b>Code:</b>
{{ obs.code.text }} <br/>


{% if obs.status %}
<b>status:</b>
{{ obs.status }} <br/>{% endif %}

{% if obs.issued %}
<b>issued:</b>
{{ obs.issued }} <br/>{% endif %}

{% if obs.valueQuantity %}
<b>Result:</b>
{{ obs.valueQuantity.value }} {{obs.valueQuantity.unit}} {% if obs.interpretation[0].coding[0].display %} ({{obs.interpretation[0].coding[0].display}}){% endif %} {% if obs.referenceRange[0].low %} [{{obs.referenceRange[0].low.value}} {{obs.referenceRange[0].low.unit}}-{{obs.referenceRange[0].high.value}} {{obs.referenceRange[0].high.unit}}]{% endif %}<br/>{% endif %}
{% if obs.component %}
<b>Result:</b>

{% for comp in obs.component %}
<br/>

{% if comp.valueInteger %}
{{ comp.code.text }} || {{comp.valueInteger}} <br/>{% endif %}
{% if comp.valueQuantity %}

{{ comp.code.text }} || {{ comp.valueQuantity.value }} {{comp.valueQuantity.unit}} {% endif %}

{% endfor %}

{% endif %}


</div>

{% endfor %}
</div>
{% endif %}


{% endfor %}
1 change: 1 addition & 0 deletions input/fsh/aliases.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Alias: $phpid = https://www.who-umc.org/phpid
Alias: $gs1 = https://www.gs1.org/gtin
Alias: $absent-unknown-uv-ips = http://hl7.org/fhir/uv/ips/CodeSystem/absent-unknown-uv-ips

Alias: $list-empty-reason = http://terminology.hl7.org/CodeSystem/list-empty-reason


// =========== Extensions =======
Expand Down
2 changes: 1 addition & 1 deletion input/fsh/examples/Alicia.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ Overweight
* identifier[0].system = "https://www.gravitatehealth.eu/sid/doc"
* identifier[=].value = "alicia-1"
* identifier[+].system = "keycloak-id"
* identifier[=].value = "2a59b833-7132-4d53-b1c3-78710145f0a1"
* identifier[=].value = "31297ad1-cb3c-4138-a132-e64016170e1d"
* active = true
* name.family = "Gravitate"
* name.given = "Alicia"
Expand Down
2 changes: 1 addition & 1 deletion input/fsh/examples/IPS-1.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Usage: #inline
Maria Gravitate, Female, 75 years old (1946-05-05)
</div>"
* identifier[0].system = "https://www.gravitatehealth.eu/sid/doc"
* identifier[=].value = "maria-1"
* identifier[=].value = "ips-1"
* active = true
* name.family = "Gravitate"
* name.given = "IPS"
Expand Down
8 changes: 4 additions & 4 deletions input/fsh/examples/IPS-4.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ Description: "Example of International Patient Summary for Gravitate"
* entry[=].resource = bh


* entry[+].fullUrl = "https://myserver.org/Observation/bp" // BP (Observation)
* entry[=].resource = bp
* entry[+].fullUrl = "https://myserver.org/Observation/ips4-bp" // BP (Observation)
* entry[=].resource = ips4-bp

* entry[+].fullUrl = "https://myserver.org/Observation/glucose" // Glucose (Observation)
* entry[=].resource = glucose
Expand Down Expand Up @@ -101,7 +101,7 @@ Usage: #inline
* section[=].code = $loinc#8716-3 "Vital Signs"
* section[=].entry[+] = Reference(bw) "Body weight"
* section[=].entry[+] = Reference(bh) "Body height"
* section[=].entry[+] = Reference(bp) "Blood pressure"
* section[=].entry[+] = Reference(ips4-bp) "Blood pressure"


// ======== Results
Expand Down Expand Up @@ -343,7 +343,7 @@ Usage: #inline

* valueQuantity = 170 'cm'

Instance: bp
Instance: ips4-bp
InstanceOf: Observation
Usage: #inline

Expand Down
2 changes: 1 addition & 1 deletion input/fsh/examples/Pedro.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ Depression
* identifier[0].system = "https://www.gravitatehealth.eu/sid/doc"
* identifier[=].value = "Pedro-1"
* identifier[+].system = "keycloak-id"
* identifier[=].value = "b951ba0c-9a89-4c3e-9f6a-c1f40d9279b2"
* identifier[=].value = "b17f0a96-cb4a-45cd-be09-cbadbe428948"
* active = true
* name.family = "Gravitate"
* name.given = "Pedro"
Expand Down
Loading

0 comments on commit fda486e

Please sign in to comment.