Skip to content

Commit 9e22d37

Browse files
committed
update publisher by hand because it was not the latest. Include XDS-I code with warning suppressed.
1 parent be4db44 commit 9e22d37

6 files changed

Lines changed: 111 additions & 42 deletions

File tree

_genonce.bat

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1-
@SET JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8
2-
JAVA -jar input-cache/org.hl7.fhir.publisher.jar -ig ig.ini
3-
@PAUSE
1+
@ECHO OFF
2+
SET publisher_jar=publisher.jar
3+
SET input_cache_path=%CD%\input-cache
4+
5+
ECHO Checking internet connection...
6+
PING tx.fhir.org -4 -n 1 -w 1000 | FINDSTR TTL && GOTO isonline
7+
ECHO We're offline...
8+
SET txoption=-tx n/a
9+
GOTO igpublish
10+
11+
:isonline
12+
ECHO We're online
13+
SET txoption=
14+
15+
:igpublish
16+
17+
SET JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8
18+
19+
IF EXIST "%input_cache_path%\%publisher_jar%" (
20+
JAVA -jar "%input_cache_path%\%publisher_jar%" -ig ig.ini %txoption% %*
21+
) ELSE If exist "..\%publisher_jar%" (
22+
JAVA -jar "..\%publisher_jar%" -ig ig.ini %txoption% %*
23+
) ELSE (
24+
ECHO IG Publisher NOT FOUND in input-cache or parent folder. Please run _updatePublisher. Aborting...
25+
)
26+
27+
PAUSE

_updatePublisher.bat

Lines changed: 66 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
SETLOCAL
44

5-
SET dlurl=https://storage.googleapis.com/ig-build/org.hl7.fhir.publisher.jar
6-
SET publisher_jar=org.hl7.fhir.publisher.jar
5+
SET dlurl=https://github.com/HL7/fhir-ig-publisher/releases/latest/download/publisher.jar
6+
SET publisher_jar=publisher.jar
77
SET input_cache_path=%CD%\input-cache\
88
SET skipPrompts=false
99

@@ -16,11 +16,10 @@ set update_sh_url=https://raw.githubusercontent.com/FHIR/sample-ig/master/_updat
1616

1717
IF "%~1"=="/f" SET skipPrompts=true
1818

19-
ECHO "%skipPrompts%"
20-
2119

20+
ECHO.
2221
ECHO Checking internet connection...
23-
PING tx.fhir.org -n 1 -w 1000 | FINDSTR TTL && GOTO isonline
22+
PING tx.fhir.org -4 -n 1 -w 1000 | FINDSTR TTL && GOTO isonline
2423
ECHO We're offline, nothing to do...
2524
GOTO end
2625

@@ -39,6 +38,7 @@ IF DEFINED ARG (
3938

4039
FOR %%x IN ("%CD%") DO SET upper_path=%%~dpx
4140

41+
ECHO.
4242
IF NOT EXIST "%input_cache_path%%publisher_jar%" (
4343
IF NOT EXIST "%upper_path%%publisher_jar%" (
4444
SET jarlocation="%input_cache_path%%publisher_jar%"
@@ -64,13 +64,14 @@ IF DEFINED FORCE (
6464
MKDIR "%input_cache_path%" 2> NUL
6565
GOTO download
6666
)
67-
ECHO Will place publisher jar here: %input_cache_path%%publisher_jar%
67+
6868
IF "%skipPrompts%"=="true" (
6969
SET create="Y"
7070
) ELSE (
7171
SET /p create="Ok? (Y/N) "
7272
)
7373
IF /I "%create%"=="Y" (
74+
ECHO Will place publisher jar here: %input_cache_path%%publisher_jar%
7475
MKDIR "%input_cache_path%" 2> NUL
7576
GOTO download
7677
)
@@ -129,7 +130,8 @@ GOTO done
129130

130131

131132

132-
ECHO Will place publisher jar here: %input_cache_path%%publisher_jar%
133+
ECHO.
134+
ECHO Updating scripts
133135
IF "%skipPrompts%"=="true" (
134136
SET updateScripts="Y"
135137
) ELSE (
@@ -147,32 +149,70 @@ REM Download all batch files (and this one with a new name)
147149

148150
SETLOCAL DisableDelayedExpansion
149151

150-
REM ==== For getting the sources online...
151-
152-
153-
rem POWERSHELL -command if ('System.Net.WebClient' -as [type]) {(new-object System.Net.WebClient).DownloadFile(\"%update_sh_url%\",\"_updatePublisher.sh\") } else { Invoke-WebRequest -Uri "%update_sh_url%" -Outfile "_updatePublisher.new.sh" }
154-
155-
156-
rem POWERSHELL -command if ('System.Net.WebClient' -as [type]) {(new-object System.Net.WebClient).DownloadFile(\"%gen_bat_url%\",\"_genonce.bat\") } else { Invoke-WebRequest -Uri "%gen_bat_url%" -Outfile "_genonce.bat" }
157152

158-
rem POWERSHELL -command if ('System.Net.WebClient' -as [type]) {(new-object System.Net.WebClient).DownloadFile(\"%gencont_bat_url%\",\"_gencontinuous.bat\") } else { Invoke-WebRequest -Uri "%gencont_bat_url%" -Outfile "_gencontinuous.bat" }
159-
160-
rem POWERSHELL -command if ('System.Net.WebClient' -as [type]) {(new-object System.Net.WebClient).DownloadFile(\"%gen_sh_url%\",\"_genonce.sh\") } else { Invoke-WebRequest -Uri "%gen_sh_url%" -Outfile "_genonce.sh" }
161-
162-
rem POWERSHELL -command if ('System.Net.WebClient' -as [type]) {(new-object System.Net.WebClient).DownloadFile(\"%gencont_sh_url%\",\"_gencontinuous.sh\") } else { Invoke-WebRequest -Uri "%gencont_sh_url%" -Outfile "_gencontinuous.sh" }
163153

154+
:dl_script_1
155+
ECHO Updating _updatePublisher.sh
156+
call POWERSHELL -command if ('System.Net.WebClient' -as [type]) {(new-object System.Net.WebClient).DownloadFile(\"%update_sh_url%\",\"_updatePublisher.new.sh\") } else { Invoke-WebRequest -Uri "%update_sh_url%" -Outfile "_updatePublisher.new.sh" }
157+
if %ERRORLEVEL% == 0 goto upd_script_1
158+
echo "Errors encountered during download: %errorlevel%"
159+
goto dl_script_2
160+
:upd_script_1
161+
start copy /y "_updatePublisher.new.sh" "_updatePublisher.sh" ^&^& del "_updatePublisher.new.sh" ^&^& exit
162+
163+
164+
:dl_script_2
165+
ECHO Updating _genonce.bat
166+
call POWERSHELL -command if ('System.Net.WebClient' -as [type]) {(new-object System.Net.WebClient).DownloadFile(\"%gen_bat_url%\",\"_genonce.new.bat\") } else { Invoke-WebRequest -Uri "%gen_bat_url%" -Outfile "_genonce.bat" }
167+
if %ERRORLEVEL% == 0 goto upd_script_2
168+
echo "Errors encountered during download: %errorlevel%"
169+
goto dl_script_3
170+
:upd_script_2
171+
start copy /y "_genonce.new.bat" "_genonce.bat" ^&^& del "_genonce.new.bat" ^&^& exit
172+
173+
:dl_script_3
174+
ECHO Updating _gencontinuous.bat
175+
call POWERSHELL -command if ('System.Net.WebClient' -as [type]) {(new-object System.Net.WebClient).DownloadFile(\"%gencont_bat_url%\",\"_gencontinuous.new.bat\") } else { Invoke-WebRequest -Uri "%gencont_bat_url%" -Outfile "_gencontinuous.bat" }
176+
if %ERRORLEVEL% == 0 goto upd_script_3
177+
echo "Errors encountered during download: %errorlevel%"
178+
goto dl_script_4
179+
:upd_script_3
180+
start copy /y "_gencontinuous.new.bat" "_gencontinuous.bat" ^&^& del "_gencontinuous.new.bat" ^&^& exit
181+
182+
183+
:dl_script_4
184+
ECHO Updating _genonce.sh
185+
call POWERSHELL -command if ('System.Net.WebClient' -as [type]) {(new-object System.Net.WebClient).DownloadFile(\"%gen_sh_url%\",\"_genonce.new.sh\") } else { Invoke-WebRequest -Uri "%gen_sh_url%" -Outfile "_genonce.sh" }
186+
if %ERRORLEVEL% == 0 goto upd_script_4
187+
echo "Errors encountered during download: %errorlevel%"
188+
goto dl_script_5
189+
:upd_script_4
190+
start copy /y "_genonce.new.sh" "_genonce.sh" ^&^& del "_genonce.new.sh" ^&^& exit
191+
192+
:dl_script_5
193+
ECHO Updating _gencontinuous.sh
194+
call POWERSHELL -command if ('System.Net.WebClient' -as [type]) {(new-object System.Net.WebClient).DownloadFile(\"%gencont_sh_url%\",\"_gencontinuous.new.sh\") } else { Invoke-WebRequest -Uri "%gencont_sh_url%" -Outfile "_gencontinuous.sh" }
195+
if %ERRORLEVEL% == 0 goto upd_script_5
196+
echo "Errors encountered during download: %errorlevel%"
197+
goto dl_script_6
198+
:upd_script_5
199+
start copy /y "_gencontinuous.new.sh" "_gencontinuous.sh" ^&^& del "_gencontinuous.new.sh" ^&^& exit
200+
201+
202+
203+
:dl_script_6
204+
ECHO Updating _updatePublisher.bat
164205
call POWERSHELL -command if ('System.Net.WebClient' -as [type]) {(new-object System.Net.WebClient).DownloadFile(\"%update_bat_url%\",\"_updatePublisher.new.bat\") } else { Invoke-WebRequest -Uri "%update_bat_url%" -Outfile "_updatePublisher.new.bat" }
165-
166-
if %ERRORLEVEL% == 0 goto next
167-
echo "Errors encountered during execution. Exited with status: %errorlevel%"
206+
if %ERRORLEVEL% == 0 goto upd_script_6
207+
echo "Errors encountered during download: %errorlevel%"
168208
goto end
169-
:next
170-
ECHO Updating this file...
171-
start copy /y "_updatePublisher.new.bat" "_updatePublisher2.bat" ^&^& del "_updatePublisher.new.bat" ^&^& exit
172-
REM ============================
209+
:upd_script_6
210+
start copy /y "_updatePublisher.new.bat" "_updatePublisher.bat" ^&^& del "_updatePublisher.new.bat" ^&^& exit
211+
173212

174213
:end
175214

215+
176216
IF "%skipPrompts%"=="true" (
177217
PAUSE
178218
}

input-cache/txcache/all-systems.cache

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,15 @@
33
"resourceType" : "ValueSet",
44
"compose" : {
55
"include" : [{
6-
"system" : "http://ihe.net/fhir/ihe.formatcode.fhir/CodeSystem/formatcode"
6+
"system" : "http://ihe.net/fhir/ihe.formatcode.fhir/CodeSystem/formatcode",
7+
"filter" : [{
8+
"property" : "notSelectable",
9+
"op" : "=",
10+
"value" : "false"
11+
}]
12+
},
13+
{
14+
"system" : "http://terminology.hl7.org/CodeSystem/hl7-document-format-codes"
715
},
816
{
917
"system" : "http://dicom.nema.org/resources/ontology/DCM",

input-cache/txcache/version.ctl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.335
1+
1.0.336

input/ignoreWarnings.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
== Suppressed Messages ==
22

3-
# The following code systems are external and not supported by terminology server
3+
# This is the IHE FormatCode code system, but is not HL7 so build warns that it can't support.
44
Error from server: Unable to provide support for code system http://ihe.net/fhir/ihe.formatcode.fhir/CodeSystem/formatcode
55

66
# The following code system should eventually show up in the terminology server
77
Code System URI "http://terminology.hl7.org/CodeSystem/hl7-document-format-codes" is unknown so the code cannot be validated
88

9-
# The valueset tries to import from dicom the SOP id for KOS which is identified as the FormatCode for XDS-I. But I get a warning from the IG build tool
10-
#The code 1.2.840.10008.5.1.4.1.1.88.59 is not valid in the system http://dicom.nema.org/resources/ontology/DCM
11-
# no need for this ignoreWarning as this warning causes the build to fail to expand, so I removed this from the ValueSet
9+
# The valueset import the XDS-I FormatCode from dicom the SOP id for KOS. But I get a warning from the IG build tool because DICOM does not have this code in their DCM, eventhough XDS-I indicates this is in that code system.
10+
The code 1.2.840.10008.5.1.4.1.1.88.59 is not valid in the system http://dicom.nema.org/resources/ontology/DCM

input/resources/valueset-formatcode.xml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,33 +40,31 @@
4040
<system value="http://ihe.net/fhir/ihe.formatcode.fhir/CodeSystem/formatcode"/>
4141
<!-- note that by default a compose only brings in active codes, so deprecated are automatically not included -->
4242

43-
<!-- TODO: really want to put this in there so that the valueset does not include the ontology items, or other not selectable items
44-
43+
<!-- Filter out the nonSelectable ontologies that are just representing the domains, and are not useable as FormatCode -->
4544
<filter>
4645
<property value="notSelectable" />
4746
<op value="=" />
4847
<value value="false" />
4948
</filter>
50-
-->
49+
5150
</include>
5251

53-
<!-- These codes are now defined by HL7, so import them from there https://build.fhir.org/ig/HL7/UTG/CodeSystem-hl7-document-format-codes.html -->
54-
<!-- TODO: can't include these until HL7 publishes them
52+
<!-- These codes are now defined by HL7, so import them from there http://terminology.hl7.org/CodeSystem/hl7-document-format-codes -->
53+
<!-- TODO: can't include these until HL7 publishes them
54+
5555
<include>
5656
<system value="http://terminology.hl7.org/CodeSystem/hl7-document-format-codes"/>
5757
</include>
5858
-->
5959

6060
<!-- This one concept is used as the FormatCode for XDS-I. It is the KOS document definition SOP. -->
61-
<!-- TODO: but the build tool complains and refuses to do any valueSet expansion (TODO fix at some point)
6261
<include>
6362
<system value="http://dicom.nema.org/resources/ontology/DCM" />
6463
<concept>
6564
<code value="1.2.840.10008.5.1.4.1.1.88.59" />
6665
<display value="Key Object Selection Document" />
6766
</concept>
6867
</include>
69-
-->
7068
</compose>
7169

7270

0 commit comments

Comments
 (0)