Skip to content
Merged
110 changes: 55 additions & 55 deletions _build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,34 @@ IF EXIST "%input_cache_path%%publisher_jar%" (
) ELSE (
SET "jar_location=not_found"
SET "default_choice=1"
SET "default_reason=publisher not found"
ECHO publisher.jar not found in input-cache or parent folder
)
)


:: Handle command-line argument to bypass the menu
IF NOT "%~1"=="" (
IF /I "%~1"=="update" SET "userChoice=1"
IF /I "%~1"=="build" SET "userChoice=2"
IF /I "%~1"=="nosushi" SET "userChoice=3"
IF /I "%~1"=="notx" SET "userChoice=4"
IF /I "%~1"=="jekyll" SET "userChoice=5"
IF /I "%~1"=="clean" SET "userChoice=6"
IF /I "%~1"=="exit" SET "userChoice=0"
GOTO executeChoice
)
:: Known first arguments select a menu option; anything else is passed through to the publisher
SET "extraArgs="
IF "%~1"=="" GOTO showMenu
IF /I "%~1"=="update" SET "userChoice=1" & GOTO parseExtra
IF /I "%~1"=="build" SET "userChoice=2" & GOTO parseExtra
IF /I "%~1"=="nosushi" SET "userChoice=3" & GOTO parseExtra
IF /I "%~1"=="notx" SET "userChoice=4" & GOTO parseExtra
IF /I "%~1"=="jekyll" SET "userChoice=5" & GOTO parseExtra
IF /I "%~1"=="clean" SET "userChoice=6" & GOTO parseExtra
IF /I "%~1"=="exit" SET "userChoice=0" & GOTO parseExtra
:: Unknown first arg - default to build, pass all args through
SET "userChoice=2"
GOTO collectArgs
:parseExtra
SHIFT
:collectArgs
IF "%~1"=="" GOTO executeChoice
SET "extraArgs=!extraArgs! %1"
SHIFT
GOTO collectArgs
:showMenu

echo ---------------------------------------------------------------
ECHO Checking internet connection...
Expand All @@ -53,10 +65,14 @@ IF "%online_status%"=="true" (
SET "latest_version=!latest_version: =!"
SET "latest_version=!latest_version:~0,-1!"
) ELSE (
ECHO We're offline or tx.fhir.org is not available, can only run the publisher without TX...
ECHO.
ECHO *** WARNING: Working offline - this is not the normal mode.
ECHO Some features (e.g. terminology rendering) will not work.
ECHO.
SET "txoption=-tx n/a"
SET "latest_version=unknown"
SET "default_choice=4"
SET "default_reason=working offline"
)

echo ---------------------------------------------------------------
Expand All @@ -79,9 +95,11 @@ IF NOT "%online_status%"=="true" (
IF NOT "!publisher_version!"=="!latest_version!" (
ECHO An update is recommended.
SET "default_choice=1"
SET "default_reason=newer version available"
) ELSE (
ECHO Publisher is up to date.
SET "default_choice=2"
SET "default_reason=publisher is up to date"
)
)

Expand All @@ -96,12 +114,9 @@ echo 4. Build IG - force no TX server
echo 5. Jekyll build
echo 6. Clean up temp directories
echo 0. Exit
:: echo [Press Enter for default (%default_choice%) or type an option number:]
echo.

:: Using CHOICE to handle input with timeout
:: ECHO [Enter=Continue, 1-7=Option, 0=Exit]
choice /C 12345670 /N /CS /D %default_choice% /T 5 /M "Choose an option number or wait 5 seconds for default (%default_choice%):"
choice /C 12345670 /N /CS /D %default_choice% /T 5 /M "Choose an option number or wait 5 seconds for default (%default_choice% - %default_reason%):"
SET "userChoice=%ERRORLEVEL%"


Expand All @@ -115,15 +130,12 @@ IF "%userChoice%"=="4" GOTO publish_notx
IF "%userChoice%"=="5" GOTO debugjekyll
IF "%userChoice%"=="6" GOTO clean
IF "%userChoice%"=="0" EXIT /B

:end


GOTO endscript

:debugjekyll
echo Running Jekyll build...
jekyll build -s temp/pages -d output
GOTO end
GOTO endscript


:clean
Expand Down Expand Up @@ -152,10 +164,7 @@ GOTO end
echo Removed: .\template
)

GOTO end



GOTO endscript


:downloadpublisher
Expand Down Expand Up @@ -198,7 +207,7 @@ IF DEFINED FORCE (
GOTO download
)

IF "%skipPrompts%"=="y" (
IF "%skipPrompts%"=="true" (
SET create=Y
) ELSE (
SET /p create="Download? (Y/N) "
Expand All @@ -211,7 +220,7 @@ IF /I "%create%"=="Y" (
GOTO done

:upgrade
IF "%skipPrompts%"=="y" (
IF "%skipPrompts%"=="true" (
SET overwrite=Y
) ELSE (
SET /p overwrite="Overwrite %jarlocation%? (Y/N) "
Expand Down Expand Up @@ -265,15 +274,15 @@ GOTO done

ECHO.
ECHO Updating scripts
IF "%skipPrompts%"=="y" (
IF "%skipPrompts%"=="true" (
SET updateScripts=Y
) ELSE (
SET /p updateScripts="Update scripts? (Y/N) "
)
IF /I "%updateScripts%"=="Y" (
GOTO scripts
)
GOTO end
GOTO endscript


:scripts
Expand All @@ -299,27 +308,28 @@ ECHO Updating _build.bat
call POWERSHELL -command if ('System.Net.WebClient' -as [type]) {(new-object System.Net.WebClient).DownloadFile(\"%build_bat_url%\",\"_build.new.bat\") } else { Invoke-WebRequest -Uri "%build_bat_url%" -Outfile "_build.new.bat" }
if %ERRORLEVEL% == 0 goto upd_script_2
echo "Errors encountered during download: %errorlevel%"
goto end
goto endscript
:upd_script_2
start copy /y "_build.new.bat" "_build.bat" ^&^& del "_build.new.bat" ^&^& exit


GOTO end
GOTO endscript


:publish_once

SET JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8

:: Debugging statements before running publisher
ECHO 1jar_location is: %jar_location%
ECHO jar_location is: %jar_location%
IF NOT "%jar_location%"=="not_found" (
java %JAVA_OPTS% -jar "%jar_location%" -ig . %txoption% %*
ECHO IG Publisher FOUND, Publishing...
java %JAVA_OPTS% -jar "%jar_location%" -ig . %txoption% %extraArgs%
) ELSE (
ECHO IG Publisher NOT FOUND in input-cache or parent folder. Please run _updatePublisher. Aborting...
)

GOTO end
GOTO endscript



Expand All @@ -328,14 +338,14 @@ GOTO end
SET JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8

:: Debugging statements before running publisher
ECHO 3jar_location is: %jar_location%
ECHO jar_location is: %jar_location%
IF NOT "%jar_location%"=="not_found" (
java %JAVA_OPTS% -jar "%jar_location%" -ig . %txoption% -no-sushi %*
java %JAVA_OPTS% -jar "%jar_location%" -ig . %txoption% -no-sushi %extraArgs%
) ELSE (
ECHO IG Publisher NOT FOUND in input-cache or parent folder. Please run _updatePublisher. Aborting...
)

GOTO end
GOTO endscript


:publish_notx
Expand All @@ -344,43 +354,33 @@ SET txoption=-tx n/a
SET JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8

:: Debugging statements before running publisher
ECHO 2jar_location is: %jar_location%
ECHO jar_location is: %jar_location%
IF NOT "%jar_location%"=="not_found" (
java %JAVA_OPTS% -jar "%jar_location%" -ig . %txoption% %*
java %JAVA_OPTS% -jar "%jar_location%" -ig . %txoption% %extraArgs%
) ELSE (
ECHO IG Publisher NOT FOUND in input-cache or parent folder. Please run _updatePublisher. Aborting...
)

GOTO end


GOTO endscript


:publish_continuous

SET JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8

:: Debugging statements before running publisher
ECHO Checking %input_cache_path% for publisher.jar
IF EXIST "%input_cache_path%\%publisher_jar%" (
java %JAVA_OPTS% -jar "%input_cache_path%\%publisher_jar%" -ig . %txoption% -watch %*
ECHO jar_location is: %jar_location%
IF NOT "%jar_location%"=="not_found" (
java %JAVA_OPTS% -jar "%jar_location%" -ig . %txoption% -watch %extraArgs%
) ELSE (
ECHO Checking %upper_path% for publisher.jar
IF EXIST "..\%publisher_jar%" (
java %JAVA_OPTS% -jar "..\%publisher_jar%" -ig . %txoption% -watch %*
) ELSE (
ECHO IG Publisher NOT FOUND in input-cache or parent folder. Please run _updatePublisher. Aborting...
)
ECHO IG Publisher NOT FOUND in input-cache or parent folder. Please run _updatePublisher. Aborting...
)

GOTO end
GOTO endscript


:end
:endscript

:: Pausing at the end


IF NOT "%skipPrompts%"=="true" (
PAUSE
)
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ Description: "Mapping des éléments du modèle métier FRLMExpositionRadiations
* group[=].element[=].target[=].equivalence = #equivalent
// Entrée observation de grossesse
* group[=].element[+].code = #FRLMExpositionRadiations.entree.observationGrossesse
* group[=].element[=].target[+].code = #FRCDADICOMExpositionAuxRadiations.entry:frDICOMObservation
* group[=].element[=].target[+].code = #FRCDADICOMExpositionAuxRadiations.entry:frDicomObservationGrossesse
* group[=].element[=].target[=].equivalence = #equivalent
// Entrée observation indication
* group[=].element[+].code = #FRLMExpositionRadiations.entree.observationIndication
* group[=].element[=].target[+].code = #FRCDADICOMExpositionAuxRadiations.entry:frDICOMObservation
* group[=].element[=].target[+].code = #FRCDADICOMExpositionAuxRadiations.entry:frDicomObservationIndication
* group[=].element[=].target[=].equivalence = #equivalent

// Groupe Mapping 2 : CDA → FHIR
Expand Down Expand Up @@ -78,10 +78,10 @@ Description: "Mapping des éléments du modèle métier FRLMExpositionRadiations
* group[=].element[=].target[+].code = #FRCompositionDocument.section:exposureRadiation.entry:FRObservationRadiationExposureDocument.partOf:medicationAdministrationRef
* group[=].element[=].target[=].equivalence = #equivalent
// Entrée observation de grossesse
* group[=].element[+].code = #FRCDADICOMExpositionAuxRadiations.entry:frDICOMObservation
* group[=].element[+].code = #FRCDADICOMExpositionAuxRadiations.entry:frDicomObservationGrossesse
* group[=].element[=].target[+].code = #FRCompositionDocument.section:exposureRadiation.entry:FRObservationRadiationExposureDocument.hasMember:observationGrossesse
* group[=].element[=].target[=].equivalence = #equivalent
// Entrée observation indication
* group[=].element[+].code = #FRCDADICOMExpositionAuxRadiations.entry:frDICOMObservation
* group[=].element[+].code = #FRCDADICOMExpositionAuxRadiations.entry:frDicomObservationIndication
* group[=].element[=].target[+].code = #FRCompositionDocument.section:exposureRadiation.entry:FRObservationRadiationExposureDocument.hasMember:observationIndication
* group[=].element[=].target[=].equivalence = #equivalent
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
Profile: FRCDAResultats
Parent: http://hl7.org/cda/stds/core/StructureDefinition/Organizer
Id: fr-cda-resultats
Title: "CDA - FR resultats"
Description: "Entrée FR-resultats: L'entrée 'FR-Resultats' est une entrée de type 'organizer' regroupant les types des résultats classés par type d’examens (BIO, IMG, etc…)."
* classCode MS
* classCode = #CLUSTER
* moodCode MS
* id 1..1
* id ^short = "Identifiant de l'entrée"
* id ^definition = "Identifiant de l'entrée"
* templateId 1..1
* templateId ^slicing.discriminator.type = #value
* templateId ^slicing.discriminator.path = "root"
* templateId ^slicing.rules = #open
* templateId contains frResultats 1..1
* templateId[frResultats] 1..1
* templateId[frResultats].root = "1.2.250.1.213.1.1.3.208"
* templateId[frResultats] ^short = "Conformité FR-Resultats (CI-SIS)"
* templateId[frResultats] ^definition = "Conformité FR-Resultats (CI-SIS)"
* code MS
* code 1..1
* code ^short = "Code de l'entrée en LOINC.
Type de résultat :
- 26436-6 Biologie polyvalente
- 18748-4 Imagerie
- 26438-2 Cytologie
- 27898-6 Pathologie
- 26435-8 Génétique humaine"
* code ^definition = "Code de l'entrée en LOINC"
* code from https://smt.esante.gouv.fr/fhir/ValueSet/jdv-resultat-type-cisis
* statusCode MS
* statusCode 1..1
* statusCode ^short = "Statut de l'entrée : completed"
* statusCode ^definition = "Statut de l'entrée"
* effectiveTime MS
* effectiveTime 0..1
* effectiveTime ^short = "Date"
* effectiveTime ^definition = "Date"
* performer 1..1
* performer ^short = "Exécutant"
* performer ^definition = "Exécutant"
* performer only FRCDALaboratoireExecutant
* author 1..1
* author ^short = "Auteur"
* author ^definition = "Auteur"
* author only FRCDAAuthor
* component MS
* component 1..1
* component ^slicing.discriminator.type = #type
* component ^slicing.discriminator.path = "$this"
* component ^slicing.rules = #open
* component contains
frResultat 1..1
* component[frResultat].observation 0..1
* component[frResultat].observation only FRCDAResultat
* component[frResultat].observation ^short = "Entrée FR-Resultat"
* component[frResultat].observation ^definition = "Entrée FR-Resultat"
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
Profile: FRCDASectionAllergiesEtHypersensibilites
Parent: http://hl7.org/cda/stds/core/StructureDefinition/Section
Id: fr-cda-allergies-et-hypersensibilites
Title: "CDA - FR Allergies et hypersensibilites"
Description: "IHE-PCC - Allergies-And-Other-Adverse-Reactions
- La section 'Allergies et hypersensibilités' permet de décrire la liste codée des allergies et hypersensibilités (médicaments, environnements, aliments,..) précisant notamment l'agent et les réactions observées."
* templateId 1..3
* templateId ^slicing.discriminator.type = #value
* templateId ^slicing.discriminator.path = "root"
* templateId ^slicing.rules = #open
* templateId contains iheAllergiesAndOtherAdverseReactionsSection 1..1
and ccdAlertsSection 1..1
and frSectionAllergiesEtHypersensibilites 1..1
* templateId[iheAllergiesAndOtherAdverseReactionsSection].root = "1.3.6.1.4.1.19376.1.5.3.1.3.13"
* templateId[iheAllergiesAndOtherAdverseReactionsSection] ^short = "Déclaration de conformité de la section aux spécifications IHE PCC"
* templateId[ccdAlertsSection].root = "2.16.840.1.113883.10.20.1.2"
* templateId[ccdAlertsSection] ^short = "Déclaration de conformité de la section aux spécifications C-CDA"
* templateId[frSectionAllergiesEtHypersensibilites].root = "1.2.250.1.213.1.1.2.137"
* templateId[frSectionAllergiesEtHypersensibilites] ^short = "Déclaration de conformité de la section aux spécifications CI-SIS"
* id MS
* id ^short = "Identifiant de la section"
* id ^definition = "Identifiant de la section"
* code MS
* code 1..1
* code ^short = "Code de la section"
* code ^definition = "Code de la section"
* code.code 1..1
* code.code = #48765-2
* code.displayName 1..1
* code.displayName = "Allergies et hypersensibilités"
* code.codeSystem 1..1
* code.codeSystem = "2.16.840.1.113883.6.1"
* code.codeSystemName = "LOINC"
* title 1..1
* title ^short = "Titre de la sectionFixé à 'Allergies et hypersensibilités'"
* title ^definition = "Titre de la section"
* text 1..1 MS
* text ^short = "Bloc narratif"
* text ^definition = "Bloc narratif"
* entry MS
* entry 1..*
* entry.act only FRCDAListeDesAllergiesEtHypersensibilites
* entry ^short = "Entrée Liste des allergies et hypersensibilités"
Loading
Loading