From 44596ce1122d56685a3720c161fc640318b59bcc Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Fri, 25 Sep 2020 03:23:14 +1000 Subject: [PATCH 1/2] Add various test cases --- input/examples/Patient-example.xml | 6 + input/myig.xml | 17 ++ input/resources/library-example-image.xml | 14 + input/resources/library-example-sql.xml | 14 + input/resources/myObservation.xml | 46 +++ templates/liquid/Library.liquid | 325 ---------------------- 6 files changed, 97 insertions(+), 325 deletions(-) create mode 100644 input/resources/library-example-image.xml create mode 100644 input/resources/library-example-sql.xml delete mode 100644 templates/liquid/Library.liquid diff --git a/input/examples/Patient-example.xml b/input/examples/Patient-example.xml index 7153880..16c961b 100644 --- a/input/examples/Patient-example.xml +++ b/input/examples/Patient-example.xml @@ -1,4 +1,10 @@ + + diff --git a/input/myig.xml b/input/myig.xml index 4852cf9..5d34303 100644 --- a/input/myig.xml +++ b/input/myig.xml @@ -38,6 +38,11 @@ + + + + + @@ -47,6 +52,18 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/liquid/Library.liquid b/templates/liquid/Library.liquid deleted file mode 100644 index 0514403..0000000 --- a/templates/liquid/Library.liquid +++ /dev/null @@ -1,325 +0,0 @@ -
- - {% if Library.id.exists() %} - - - - - {% endif %} - {% if Library.url.exists() %} - - - - - {% endif %} - {% if Library.version.exists() %} - - - - - {% endif %} - {% for identifier in Library.identifier %} - - - - - {% endfor %} - {% if Library.name.exists() %} - - - - - {% endif %} - {% if Library.title.exists() %} - - - - - {% endif %} - {% if Library.subtitle.exists() %} - - - - - {% endif %} - {% if Library.status.exists() %} - - - - - {% endif %} - {% if Library.experimental.exists() %} - - - - - {% endif %} - {% if Library.type.exists() %} - - - - - {% endif %} - {% if Library.subject.exists() %} - - - {%if Library.subject is CodeableConcept %} - - {% endif %} - {% if Library.subject is Reference %} - - {% endif %} - - {% endif %} - {% if Library.date.exists() %} - - - - - {% endif %} - {% if Library.publisher.exists() %} - - - - - {% endif %} - {% if Library.description.exists() %} - - - - - {% endif %} - {% if Library.useContext.exists() %} - - - - - {% endif %} - {% if Library.jurisdiction.exists() %} - - - - - {% endif %} - {% if Library.purpose.exists() %} - - - - - {% endif %} - {% if Library.usage.exists() %} - - - - - {% endif %} - {% if Library.copyright.exists() %} - - - - - {% endif %} - {% if Library.approvalDate.exists() %} - - - - - {% endif %} - {% if Library.lastReviewDate.exists() %} - - - - - {% endif %} - {% if Library.effectivePeriod.exists() %} - - - - - {% endif %} - {% if Library.relatedArtifact.exists() %} - - - - - {% endif %} - {% if Library.parameter.exists() %} - - - - - {% endif %} - {% if Library.dataRequirement.exists() %} - - - - - {% endif %} - {% for c in Library.content %} - {% if c.contentType = 'text/cql' %} - -
Id: {{Library.id}}
Url: {{Library.url}}
Version: {{Library.version}}
Identifier: - {% if identifier.type.exists() %} -

- type: {{identifier.type.value}} -

- {% endif %} - {% if identifier.value.exists() %} -

- value: {{identifier.value}} -

- {% endif %} -
Name: {{Library.name}}
Title: {{Library.title}}
Subtitle: {{Library.subtitle}}
Status: {{Library.status.value}}
Experimental: {{Library.experimental.value}}
Type: - {% if Library.type.coding.exists() %} - {% for coding in Library.type.coding %} - {% if coding.system.exists() %} -

- system: {{coding.system}} -

- {% endif %} - {% if coding.code.exists() %} -

- code: {{coding.code}} -

- {% endif %} - {% if coding.display.exists() %} -

- display: {{coding.display}} -

- {% endif %} - {% endfor %} - {% endif %} - {% if Library.type.coding.exists().not and Library.type.text.exists() %} - {{Library.type.text}} - {% endif %} -
Subject: - {% if Library.subject.coding.exists() %} - {% for coding in Library.subject.coding %} - {% if coding.system.exists() %} -

- system: {{coding.system}} -

- {% endif %} - {% if coding.code.exists() %} -

- code: {{coding.code}} -

- {% endif %} - {% if coding.display.exists() %} -

- display: {{coding.display}} -

- {% endif %} - {% endfor %} - {% endif %} - {% if Library.subject.coding.exists().not and Library.subject.text.exists() %} - {{Library.subject.text}} - {% endif %} -
- {% if Library.subject.reference.exists() %} -

- reference: {{Library.subject.reference}} -

- {% endif %} - {% if Library.subject.type.exists() %} -

- type: {{Library.subject.type}} -

- {% endif %} - {% if Library.subject.display.exists() %} -

- code: {{Library.subject.display}} -

- {% endif %} -
Date: {{Library.date}}
Publisher: {{Library.publisher}}
Description: {{Library.description}}
Use Context: - - - {% for useContext in Library.useContext %} - - - - - {% endfor %} -
codevalue
{{useContext.code.code}}{{(useContext.value as CodeableConcept).coding.first().code}}
-
Jurisdiction: {{Library.jurisdiction.first().coding.first().code}}
Purpose: {{Library.purpose}}
Usage: {{Library.usage}}
Copyright: {{Library.copyright}}
Approval Date: {{Library.approvalDate}}
Last Review Date: {{Library.lastReviewDate}}
Effective Period: {{Library.effectivePeriod.start}}..{{Library.effectivePeriod.end}}
Related Artifacts: - - - {% for artifact in Library.relatedArtifact %} - - {% endfor %} -
TypeResource
{{artifact.type.value}}{{artifact.resource}}
-
Parameters: - - - {% for param in Library.parameter %} - - {% endfor %} -
NameTypeMinMaxIn/Out
{{param.name}}{{param.type}}{{param.min}}{{param.max}}{{param.use}}
-
Data Requirements: - - - {% for requirement in Library.dataRequirement %} - - - - - - - {% endfor %} -
TypeProfileMSCode Filter
{{requirement.type.value}}{% for profile in requirement.profile %}{{profile.value}}{% endfor %}{% for support in requirement.mustSupport %}{{mustSupport}};{% endfor %} - {% for cfilter in requirement.codeFilter %} -

- code filter: - {% if cfilter.path.exists() or cfilter.valueSet.exists() or cfilter.code.exists() %} -
- {% endif %} - {% if cfilter.path.exists() %} - - path: {{cfilter.path}} - - {% if cfilter.valueSet.exists() or cfilter.code.exists() %} -
- {% endif %} - {% endif %} - {% if cfilter.valueSet.exists() %} - - value set: {{cfilter.valueSet.value}} - - {% endif %} - {% for coding in cfilter.code %} - {% if coding.system.exists() %} -

- system: {{coding.system}} -

- {% endif %} - {% if coding.code.exists() %} -

- code: {{coding.code}} -

- {% endif %} - {% if coding.display.exists() %} -

- display: {{coding.display}} -

- {% endif %} - {% endfor %} -

- {% endfor %} -
-
- - -
Content: {{c.contentType}}
{{c.data.decode('base64').escape('html')}}
- - {% endif %} - {% if c.contentType != 'text/cql' %} - - - - -
Content: {{c.contentType}}
{{'Encoded data (' + c.data.length().toString() + ' characters)'}}
- - {% endif %} - {% endfor %} - -
From a853c935b85fb15772fe537222ce816d16bce760 Mon Sep 17 00:00:00 2001 From: Chris Moesel Date: Wed, 30 Sep 2020 09:34:06 -0400 Subject: [PATCH 2/2] Fix shebang in _updatePublisher.sh --- _updatePublisher.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_updatePublisher.sh b/_updatePublisher.sh index a8d4489..1a3484b 100755 --- a/_updatePublisher.sh +++ b/_updatePublisher.sh @@ -1,4 +1,4 @@ -#/bin/bash +#!/bin/bash pubsource=https://github.com/HL7/fhir-ig-publisher/releases/latest/download/ publisher_jar=publisher.jar dlurl=$pubsource$publisher_jar