Skip to content

Commit 1067d21

Browse files
committed
Added Git URLs, dropped EHRFM & V3 product families, filled in a bunch of missing ciBuilds, added QA checks for appropriate population of ciBuild, git, ballot and main URLs, and fixed a bunch of issues where URLs were incorrect.
1 parent ed18978 commit 1067d21

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+191
-262
lines changed

FHIR-saner.xml

Lines changed: 0 additions & 36 deletions
This file was deleted.

schemas/specification.xsd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,11 @@
147147
<xs:documentation>The URL for the current/most recent ballot of this specification. Used when validating URLs</xs:documentation>
148148
</xs:annotation>
149149
</xs:attribute>
150+
<xs:attribute name="gitUrl" type="website" use="optional">
151+
<xs:annotation>
152+
<xs:documentation>The base URL for the repository in which the source material for this specificaiton is maintained.</xs:documentation>
153+
</xs:annotation>
154+
</xs:attribute>
150155
<xs:attribute name="defaultWorkgroup" type="WorkGroup" use="optional">
151156
<xs:annotation>
152157
<xs:documentation>The work group typically associated with issues raised against this specification if a more specific work group isn't determined based on pages or artifacts</xs:documentation>

tools/buildCombinedSpecs.xslt

Lines changed: 0 additions & 27 deletions
This file was deleted.

tools/buildSpecJSON.xslt

Lines changed: 59 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<xsl:variable name="filename" select="concat('SPECS-', @key, '.xml')"/>
1717
<xsl:variable name="specs" select="document($filename, .)/specifications" as="element(specifications)?"/>
1818
<xsl:if test="not($specs)">
19-
<xsl:message terminate="yes" select="concat('Unable to find specifications for family ', @key, ' - looking for file ', $filename)"/>
19+
<xsl:message terminate="yes" select="concat('ERROR: Unable to find specifications for family ', @key, ' - looking for file ', $filename)"/>
2020
</xsl:if>
2121
<xsl:apply-templates mode="familySpecs" select="$specs">
2222
<xsl:with-param name="prefix" select="@key" tunnel="yes"/>
@@ -68,15 +68,15 @@
6868
<xsl:template mode="familySpecs" match="specifications/specification">
6969
<xsl:param name="prefix" tunnel="yes"/>
7070
<xsl:for-each select="page/@url[.=ancestor::specification/page/otherpage/@url]">
71-
<xsl:message terminate="yes" select="concat('The same name is present in both page/@url and page/otherpage/@url: ', .)"/>
71+
<xsl:message terminate="yes" select="concat('ERROR: The same name is present in both page/@url and page/otherpage/@url: ', .)"/>
7272
</xsl:for-each>
7373
<xsl:copy>
7474
<xsl:apply-templates mode="familySpecs" select="@*"/>
7575
<xsl:variable name="filename" select="concat($prefix, '-', @key, '.xml')"/>
7676
<xsl:variable name="spec" select="document($filename, .)/specification" as="element(specification)?"/>
7777
<xsl:variable name="specKey" select="@key"/>
7878
<xsl:if test="not($spec)">
79-
<xsl:message terminate="yes" select="concat('Unable to find specification ', @name, ' - looking for file ', $filename)"/>
79+
<xsl:message terminate="yes" select="concat('ERROR: Unable to find specification ', @name, ' - looking for file ', $filename)"/>
8080
</xsl:if>
8181
<xsl:for-each select="$spec">
8282
<xsl:apply-templates mode="familySpecs" select="@*|node()">
@@ -92,13 +92,13 @@
9292
<xsl:choose>
9393
<xsl:when test="@deprecated='true' or self::page"/>
9494
<xsl:when test="not(@id)">
95-
<xsl:message terminate="yes" select="concat('id attribute is mandatory for artifacts that are not deprecated - ', $key)"/>
95+
<xsl:message terminate="yes" select="concat('ERROR: id attribute is mandatory for artifacts that are not deprecated - ', $key)"/>
9696
</xsl:when>
9797
<xsl:when test="contains($prefix, 'FHIR') and not(matches(string(@id), '^([A-Z][a-z]+)+/[A-Za-z0-9\-\.]{1,64}$'))">
98-
<xsl:message terminate="yes" select="concat('In FHIR artifact ', $key, ', id value of ', @id, ' does not follow the pattern ResourceName/id')"/>
98+
<xsl:message terminate="yes" select="concat('ERROR: In FHIR artifact ', $key, ', id value of ', @id, ' does not follow the pattern ResourceName/id')"/>
9999
</xsl:when>
100100
<xsl:when test="contains($prefix, 'CDA') and not(matches(@id, '^[0-2](\.(0|[1-9][0-9]*))+$'))">
101-
<xsl:message terminate="yes" select="concat('In CDA artifact ', $key, ', id value of ', @id, ' is not an OID', matches(@id, '^[0-2](\\.(0|[1-9][0-9]*))+$'))"/>
101+
<xsl:message terminate="yes" select="concat('ERROR: In CDA artifact ', $key, ', id value of ', @id, ' is not an OID', matches(@id, '^[0-2](\\.(0|[1-9][0-9]*))+$'))"/>
102102
</xsl:when>
103103
</xsl:choose>
104104
<xsl:copy>
@@ -123,28 +123,77 @@
123123
- Main process
124124
-->
125125
<xsl:template match="/">
126+
<!-- Check cross-specification validation rules -->
127+
<xsl:for-each select="$ballotSpecs/specification[not(starts-with(@gitUrl, 'https://github.com/HL7/')) and not(@deprecated='true') and starts-with(@key, 'FHIR-')]">
128+
<xsl:message terminate="yes" select="concat('ERROR: FHIR specifications that are not deprecated must have a gitUrl attribute that starts with ''https://github.com/HL7/'' ', @key)"/>
129+
</xsl:for-each>
130+
<xsl:for-each select="$ballotSpecs/specification[not(starts-with(@ciUrl, 'http://build.fhir.org')) and not(@deprecated='true') and starts-with(@key, 'FHIR-')]">
131+
<xsl:message select="concat('WARNING: FHIR specifications that are not deprecated SHOULD have a ciUrl attribute that starts with ''http://build.fhir.org'' ', @key, ' - actual was: ', @ciUrl)"/>
132+
</xsl:for-each>
133+
<xsl:for-each select="$ballotSpecs/specification[not(starts-with(@url, 'http://hl7.org/fhir')) and not(@deprecated='true') and starts-with(@key, 'FHIR-')]">
134+
<xsl:message select="concat('WARNING: FHIR specifications that are not deprecated SHOULD have a url attribute that starts with ''http://hl7.org/fhir'' ', @key, ' - actual was: ', @url)"/>
135+
</xsl:for-each>
136+
<xsl:for-each select="$ballotSpecs/specification[@ballotUrl and not(starts-with(@ballotUrl, 'http://hl7.org/'))]">
137+
<xsl:message terminate="yes" select="concat('ERROR: If present, ballotUrl must start with ''http://hl7.org/'' ', @key, ' - actual was: ', @ballotUrl)"/>
138+
</xsl:for-each>
139+
<xsl:for-each select="distinct-values($ballotSpecs/specification/@gitUrl)">
140+
<xsl:if test="count($ballotSpecs/specification[@gitUrl=current()])!=1">
141+
<xsl:variable name="dupSpecs" select="string-join($ballotSpecs/specification[@gitUrl=current()]/@key, ', ')"/>
142+
<xsl:message select="concat('WARNING: Multiple FHIR specifications with the same gitUrl of ''', ., ''': ', $dupSpecs)"/>
143+
</xsl:if>
144+
</xsl:for-each>
145+
<xsl:for-each select="$ballotSpecs/specification[@gitUrl[not(starts-with(., 'https://github.com/'))]]">
146+
<xsl:message select="concat('ERROR: GitUrl for specification ', @key, ' must start with ''https://github.com/'': ', @gitUrl)"/>
147+
</xsl:for-each>
148+
<xsl:for-each select="$ballotSpecs/specification[@gitUrl[not(starts-with(., 'https://github.com/HL7/'))]]">
149+
<xsl:message select="concat('WARNING: GitUrl for specification ', @key, ' SHOULD must start with ''https://github.com/HL7/'': ', @gitUrl)"/>
150+
</xsl:for-each>
151+
<xsl:for-each select="distinct-values($ballotSpecs/specification/@url)">
152+
<xsl:if test="count($ballotSpecs/specification[@url=current()])!=1">
153+
<xsl:variable name="dupSpecs" select="string-join($ballotSpecs/specification[@url=current()]/@key, ', ')"/>
154+
<xsl:message terminate="yes" select="concat('ERROR: Multiple FHIR specifications with the same url of ''', ., ''': ', $dupSpecs)"/>
155+
</xsl:if>
156+
</xsl:for-each>
157+
<xsl:for-each select="distinct-values($ballotSpecs/specification/@ciUrl)">
158+
<xsl:if test="count($ballotSpecs/specification[@ciUrl=current()])!=1">
159+
<xsl:variable name="dupSpecs" select="string-join($ballotSpecs/specification[@ciUrl=current()]/@key, ', ')"/>
160+
<xsl:message terminate="yes" select="concat('ERROR: Multiple FHIR specifications with the same ciUrl of ''', ., ''': ', $dupSpecs)"/>
161+
</xsl:if>
162+
</xsl:for-each>
163+
<xsl:for-each select="distinct-values($ballotSpecs/specification/@ballotUrl)">
164+
<xsl:if test="count($ballotSpecs/specification[@ballotUrl=current()])!=1">
165+
<xsl:variable name="dupSpecs" select="string-join($ballotSpecs/specification[@ballotUrl=current()]/@key, ', ')"/>
166+
<xsl:message terminate="yes" select="concat('ERROR: Multiple FHIR specifications with the same ballotUrl of ''', ., ''': ', $dupSpecs)"/>
167+
</xsl:if>
168+
</xsl:for-each>
169+
<xsl:for-each select="distinct-values($ballotSpecs/specification/@ballotUrl)">
170+
<xsl:if test="count($ballotSpecs/specification[@ballotUrl=current()])!=1">
171+
<xsl:variable name="dupSpecs" select="string-join($ballotSpecs/specification[@ballotUrl=current()]/@key, ', ')"/>
172+
<xsl:message terminate="yes" select="concat('ERROR: Multiple FHIR specifications with the same ballotUrl of ''', ., ''': ', $dupSpecs)"/>
173+
</xsl:if>
174+
</xsl:for-each>
126175
<!-- Check to see if any keys have been removed or changed -->
127176
<xsl:for-each select="$oldSpecs/specification">
128177
<xsl:variable name="newSpec" select="$ballotSpecs/specification[@key=current()/@key]" as="element(specification)?"/>
129178
<xsl:if test="not($newSpec)">
130-
<xsl:message terminate="yes" select="concat('Specification with effective key ', @key, ' has been removed or changed. Keys should never change - just change the name. Keys should also not usually be removed. Instead, set the ''deprecated'' flag to true. Keys can only be removed if no JIRA tracker references that specification. If this is the case and the key should really be removed, please coordinate with an administrator.')"/>
179+
<xsl:message terminate="yes" select="concat('ERROR: Specification with effective key ', @key, ' has been removed or changed. Keys should never change - just change the name. Keys should also not usually be removed. Instead, set the ''deprecated'' flag to true. Keys can only be removed if no JIRA tracker references that specification. If this is the case and the key should really be removed, please coordinate with an administrator.')"/>
131180
</xsl:if>
132181
<xsl:for-each select="version">
133182
<xsl:variable name="newVersion" select="$newSpec/version[@code=current()/@code]" as="element(version)?"/>
134183
<xsl:if test="not($newVersion)">
135-
<xsl:message terminate="yes" select="concat('Version with code ', @code, ' in specification ', parent::specification/@key, ' has been removed or changed. Versions should never change. Keys should also not be removed. Versions can only be removed if no JIRA tracker references that version. If this is the case and the version should really be removed, please coordinate with an administrator.')"/>
184+
<xsl:message terminate="yes" select="concat('ERROR: Version with code ', @code, ' in specification ', parent::specification/@key, ' has been removed or changed. Versions should never change. Keys should also not be removed. Versions can only be removed if no JIRA tracker references that version. If this is the case and the version should really be removed, please coordinate with an administrator.')"/>
136185
</xsl:if>
137186
</xsl:for-each>
138187
<xsl:for-each select="artifact">
139188
<xsl:variable name="newArtifact" select="$newSpec/artifact[@key=current()/@key]" as="element(artifact)?"/>
140189
<xsl:if test="not($newArtifact)">
141-
<xsl:message terminate="yes" select="concat('Artifact with key ', @key, ' in specification ', parent::specification/@key, ' has been removed or changed. Keys should never change - just change the name. Keys should also not usually be removed. Instead, set the ''deprecated'' flag to true. Keys can only be removed if no JIRA tracker references that artifact. If this is the case and the key should really be removed, please coordinate with an administrator.')"/>
190+
<xsl:message terminate="yes" select="concat('ERROR: Artifact with key ', @key, ' in specification ', parent::specification/@key, ' has been removed or changed. Keys should never change - just change the name. Keys should also not usually be removed. Instead, set the ''deprecated'' flag to true. Keys can only be removed if no JIRA tracker references that artifact. If this is the case and the key should really be removed, please coordinate with an administrator.')"/>
142191
</xsl:if>
143192
</xsl:for-each>
144193
<xsl:for-each select="page">
145194
<xsl:variable name="newPage" select="$newSpec/page[@key=current()/@key]" as="element(page)?"/>
146195
<xsl:if test="not($newPage)">
147-
<xsl:message terminate="yes" select="concat('Page with key ', @key, ' in specification ', parent::specification/@key, ' has been removed or changed. Keys should never change - just change the name. Keys should also not usually be removed. Instead, set the ''deprecated'' flag to true. Keys can only be removed if no JIRA tracker references that page. If this is the case and the key should really be removed, please coordinate with an administrator.')"/>
196+
<xsl:message terminate="yes" select="concat('ERROR: Page with key ', @key, ' in specification ', parent::specification/@key, ' has been removed or changed. Keys should never change - just change the name. Keys should also not usually be removed. Instead, set the ''deprecated'' flag to true. Keys can only be removed if no JIRA tracker references that page. If this is the case and the key should really be removed, please coordinate with an administrator.')"/>
148197
</xsl:if>
149198
</xsl:for-each>
150199
</xsl:for-each>

xml/EHRFM-core.xml

Lines changed: 0 additions & 7 deletions
This file was deleted.

xml/FHIR-bulkdata.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<specification url="http://hl7.org/fhir/uv/bulkdata" defaultWorkgroup="fhir-i" defaultVersion="1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../schemas/specification.xsd">
2+
<specification gitUrl="https://github.com/HL7/bulk-data" url="http://hl7.org/fhir/uv/bulkdata" ciUrl="http://build.fhir.org/ig/HL7/bulk-data-export" defaultWorkgroup="fhir-i" defaultVersion="1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../schemas/specification.xsd">
33
<version code="2.0.0"/>
44
<version code="1.0.0"/>
55
<version code="0.1" deprecated="true"/>

xml/FHIR-cdisc-lab.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<specification url="http://hl7.org/fhir/uv/cdisc-lab" defaultWorkgroup="brr" defaultVersion="0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../schemas/specification.xsd">
2+
<specification gitUrl="https://github.com/HL7/cdisc-lab" url="http://hl7.org/fhir/uv/cdisc-lab" ciUrl="http://build.fhir.org/ig/HL7/cdisc-lab" defaultWorkgroup="brr" defaultVersion="0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../schemas/specification.xsd">
33
<version code="0.1"/>
44
<artifactPageExtension value="-definitions"/>
55
<artifactPageExtension value="-examples"/>

xml/FHIR-cds-hooks-patient-view.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<specification url="https://cds-hooks.hl7.org/hooks/patient-view" ciUrl="http://cds-hooks.org/hooks/patient-view" defaultWorkgroup="cds" defaultVersion="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../schemas/specification.xsd">
2+
<specification gitUrl="https://github.com/HL7/cds-hooks-hl7-site" url="https://cds-hooks.hl7.org/hooks/patient-view" ciUrl="http://cds-hooks.org/hooks/patient-view" defaultWorkgroup="cds" defaultVersion="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../schemas/specification.xsd">
33
<version code="1.0"/>
44
<artifact name="Definition" key="Definition" deprecated="true"/>
55
<page name="index" key="index"/>

xml/FHIR-cds-hooks.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<specification url="http://cds-hooks.hl7.org" ciUrl="http://cds-hooks.org" defaultWorkgroup="cds" defaultVersion="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../schemas/specification.xsd">
2+
<specification url="http://cds-hooks.hl7.org" gitUrl="https://github.com/HL7/cds-hooks-hl7-site" ciUrl="http://cds-hooks.org" defaultWorkgroup="cds" defaultVersion="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../schemas/specification.xsd">
33
<version code="1.0"/>
44
<artifact name="Conformance" key="Conformance" deprecated="true"/>
55
<page name="(NA)" key="NA"/>

0 commit comments

Comments
 (0)