diff --git a/.github/ISSUE_TEMPLATE/ig-issue-template.md b/.github/ISSUE_TEMPLATE/ig-issue-template.md new file mode 100644 index 0000000..4f0d190 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/ig-issue-template.md @@ -0,0 +1,16 @@ +--- +name: IG issue template +about: Issue template for ANS Implementation Guide +title: '' +labels: '' +assignees: '' + +--- + +## Description du problème + + +## Fichier•s concerné•s + + +## Solution proposée diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..cbeeca5 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,9 @@ +## Description des changements + +* [changement 1] +* [changement 2] +* ... + +## Preview + +https://ansforge.github.io/IG-fhir-[nom repo]/[ajouter_nom_de_la_branche]/ig \ No newline at end of file diff --git a/.github/workflows/fhir-release.yml b/.github/workflows/fhir-release.yml new file mode 100644 index 0000000..2dd0650 --- /dev/null +++ b/.github/workflows/fhir-release.yml @@ -0,0 +1,24 @@ +name: Workflow Release to IG-website-release +on: + workflow_call: + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: +jobs: + run-release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + path: igSource + - uses: ansforge/IG-workflows@v0.2.0 + with: + repo_ig: "./igSource" + github_page: "true" + github_page_token: ${{ secrets.GITHUB_TOKEN }} + bake: "true" + nos: "true" + validator_cli: "true" + publish_repo: "ansforge/IG-website-release" + publish_repo_token : ${{ secrets.ANS_IG_API_TOKEN }} + publish_path_outpout : "./IG-website-release/www/ig/fhir" \ No newline at end of file diff --git a/.github/workflows/fhir-workflows.yml b/.github/workflows/fhir-workflows.yml new file mode 100644 index 0000000..a34fed1 --- /dev/null +++ b/.github/workflows/fhir-workflows.yml @@ -0,0 +1,22 @@ +name: Workflow Sushi Tests gitHubpages +on: + workflow_call: + push: + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: +jobs: + run-sushi-tests_gitHubPages: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + path: igSource + - uses: ansforge/IG-workflows@v0.4.0 + with: + repo_ig: "./igSource" + github_page: "true" + github_page_token: ${{ secrets.GITHUB_TOKEN }} + bake: "false" + validator_cli: "true" + generate_testscript: "false" + generate_plantuml : "true" diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a98b334 --- /dev/null +++ b/.gitignore @@ -0,0 +1,37 @@ +# Temporary folders # +##################### +fsh-generated* +temp* +template* +output* +local-template* + +# Ignore large files and frequently changed files in input-cache # +################################################################## +input-cache* + +# OS generated files # +###################### +Thumbs.db +.DS_Store +.DS_Store? + +# backup files # +################ +*.bak + +# IDE generated files # +####################### +.vscode +.idea + +# Microsoft Office temp files # +############################### +~$*.xlsx + +# Automated testing +.classpath +.project +.settings/* +target/* +.mvn/wrapper/maven-wrapper.jar diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..6b506db --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Github de l'Agence du Numérique en Santé (ANS) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..205bc90 --- /dev/null +++ b/README.md @@ -0,0 +1,43 @@ +[A MODIFIER : remplacer avec votre logo s'il ne s'agit pas d'un projet CI-SIS] + +![Logo_LEF_CI-SIS](https://user-images.githubusercontent.com/48218773/227532484-eff82649-4e42-49c6-966a-dc3ea78cf59c.png) + +[A MODIFIER : adapter au lien du projet] + +[![Workflow Init](https://github.com/ansforge/IG-fhir-partage-de-documents-de-sante/actions/workflows/fhir-workflows.yml/badge.svg)](https://github.com/ansforge/IG-fhir-partage-de-documents-de-sante/actions/workflows/fhir-workflows.yml) + +Cet exemple d'Implementation Guide (IG) très simplifié sert de base pour le développement de nouveaux guides d'implémentation. La démarche d'élaboration d'un nouvel IG est expliquée dans le [wiki de ce repo](https://github.com/ansforge/IG-modele/wiki). +Le README ci-dessous constitue un template à adapter et compléter pour chaque projet. + +# Contexte + +## Contexte métier du projet + +[A COMPLETER : doit contenir la description fonctionnelle du projet destinée à un profil non technique] + +## Contexte technique du projet + +[A COMPLETER : doit expliquer brièvement quelles ressources / profils sont utilisés, exemple implémentation où IG est utilisé] + +# CI/CD + +Les workflows associés à ce repository (.github/workflows) permettent : + +* D'executer Sushi pour vérifier la grammaire +* De faire les tests avec le validator_cli +* De publier les pages : https://ansforge.github.io/{nom du repo}/ig/{nom de la branche} + +# Notes + +Ce repo "IG-modele" a été créé à partir du repo [sample-ig](https://github.com/FHIR/sample-ig) de l'organisation GitHub FHIR. + +[A COMPLETER: notes supplémentaires pour le lecteur de la spec] +Un commentaire ? Une remarque ? Utilisez les GitHub [issues](https://docs.github.com/fr/issues) pour indiquer vos propositions d'amélioration et de correction. + +## Acronymes + +* IG : Implementation Guide +* FHIR : Fast Healthcare Interoperability Resources +* HL7 : Health Level Seven + +[A COMPLETER : acronymes utilisés dans le cadre de ce projet] diff --git a/_gencontinuous.bat b/_gencontinuous.bat new file mode 100644 index 0000000..ca2867a --- /dev/null +++ b/_gencontinuous.bat @@ -0,0 +1,2 @@ +@ECHO OFF +CALL ./_genonce.bat -watch \ No newline at end of file diff --git a/_gencontinuous.sh b/_gencontinuous.sh new file mode 100644 index 0000000..b9ac593 --- /dev/null +++ b/_gencontinuous.sh @@ -0,0 +1,2 @@ +#!/bin/bash +./_genonce.sh -watch diff --git a/_genonce.bat b/_genonce.bat new file mode 100644 index 0000000..a9864ef --- /dev/null +++ b/_genonce.bat @@ -0,0 +1,27 @@ +@ECHO OFF +SET publisher_jar=publisher.jar +SET input_cache_path=%CD%\input-cache + +ECHO Checking internet connection... +PING tx.fhir.org -4 -n 1 -w 1000 | FINDSTR TTL && GOTO isonline +ECHO We're offline... +SET txoption=-tx n/a +GOTO igpublish + +:isonline +ECHO We're online +SET txoption= + +:igpublish + +SET JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8 + +IF EXIST "%input_cache_path%\%publisher_jar%" ( + JAVA -jar "%input_cache_path%\%publisher_jar%" -ig . %txoption% %* +) ELSE If exist "..\%publisher_jar%" ( + JAVA -jar "..\%publisher_jar%" -ig . %txoption% %* +) ELSE ( + ECHO IG Publisher NOT FOUND in input-cache or parent folder. Please run _updatePublisher. Aborting... +) + +PAUSE diff --git a/_genonce.sh b/_genonce.sh new file mode 100755 index 0000000..07f693e --- /dev/null +++ b/_genonce.sh @@ -0,0 +1,30 @@ +#!/bin/bash +publisher_jar=publisher.jar +input_cache_path=./input-cache/ +echo Checking internet connection... +curl -sSf tx.fhir.org > /dev/null + +if [ $? -eq 0 ]; then + echo "Online" + txoption="-resetTx -tx https://r4.ontoserver.csiro.au/fhir" +else + echo "Offline" + txoption="-tx n/a" +fi + +echo "$txoption" + +export JAVA_TOOL_OPTIONS="$JAVA_TOOL_OPTIONS -Dfile.encoding=UTF-8" + +publisher=$input_cache_path/$publisher_jar +if test -f "$publisher"; then + java -jar $publisher -ig . $txoption $* + +else + publisher=../$publisher_jar + if test -f "$publisher"; then + java -jar $publisher -ig . $txoption $* + else + echo IG Publisher NOT FOUND in input-cache or parent folder. Please run _updatePublisher. Aborting... + fi +fi diff --git a/_updatePublisher.bat b/_updatePublisher.bat new file mode 100644 index 0000000..67aebf5 --- /dev/null +++ b/_updatePublisher.bat @@ -0,0 +1,219 @@ +@ECHO OFF + +SETLOCAL + +SET dlurl=https://github.com/HL7/fhir-ig-publisher/releases/latest/download/publisher.jar +SET publisher_jar=publisher.jar +SET input_cache_path=%CD%\input-cache\ +SET skipPrompts=false + +SET scriptdlroot=https://raw.githubusercontent.com/HL7/ig-publisher-scripts/main +SET update_bat_url=%scriptdlroot%/_updatePublisher.bat +SET gen_bat_url=%scriptdlroot%/_genonce.bat +SET gencont_bat_url=%scriptdlroot%/_gencontinuous.bat +SET gencont_sh_url=%scriptdlroot%/_gencontinuous.sh +SET gen_sh_url=%scriptdlroot%/_genonce.sh +SET update_sh_url=%scriptdlroot%/_updatePublisher.sh + +IF "%~1"=="/f" SET skipPrompts=y + + +ECHO. +ECHO Checking internet connection... +PING tx.fhir.org -4 -n 1 -w 1000 | FINDSTR TTL && GOTO isonline +ECHO We're offline, nothing to do... +GOTO end + +:isonline +ECHO We're online + + +:processflags +SET ARG=%1 +IF DEFINED ARG ( + IF "%ARG%"=="-f" SET FORCE=true + IF "%ARG%"=="--force" SET FORCE=true + SHIFT + GOTO processflags +) + +FOR %%x IN ("%CD%") DO SET upper_path=%%~dpx + +ECHO. +IF NOT EXIST "%input_cache_path%%publisher_jar%" ( + IF NOT EXIST "%upper_path%%publisher_jar%" ( + SET jarlocation="%input_cache_path%%publisher_jar%" + SET jarlocationname=Input Cache + ECHO IG Publisher is not yet in input-cache or parent folder. + REM we don't use jarlocation below because it will be empty because we're in a bracketed if statement + GOTO create + ) ELSE ( + ECHO IG Publisher FOUND in parent folder + SET jarlocation="%upper_path%%publisher_jar%" + SET jarlocationname=Parent folder + GOTO upgrade + ) +) ELSE ( + ECHO IG Publisher FOUND in input-cache + SET jarlocation="%input_cache_path%%publisher_jar%" + SET jarlocationname=Input Cache + GOTO upgrade +) + +:create +IF DEFINED FORCE ( + MKDIR "%input_cache_path%" 2> NUL + GOTO download +) + +IF "%skipPrompts%"=="y" ( + SET create=Y +) ELSE ( + SET /p create="Ok? (Y/N) " +) +IF /I "%create%"=="Y" ( + ECHO Will place publisher jar here: %input_cache_path%%publisher_jar% + MKDIR "%input_cache_path%" 2> NUL + GOTO download +) +GOTO done + +:upgrade +IF "%skipPrompts%"=="y" ( + SET overwrite=Y +) ELSE ( + SET /p overwrite="Overwrite %jarlocation%? (Y/N) " +) + +IF /I "%overwrite%"=="Y" ( + GOTO download +) +GOTO done + +:download +ECHO Downloading most recent publisher to %jarlocationname% - it's ~100 MB, so this may take a bit + +FOR /f "tokens=4-5 delims=. " %%i IN ('ver') DO SET VERSION=%%i.%%j +IF "%version%" == "10.0" GOTO win10 +IF "%version%" == "6.3" GOTO win8.1 +IF "%version%" == "6.2" GOTO win8 +IF "%version%" == "6.1" GOTO win7 +IF "%version%" == "6.0" GOTO vista + +ECHO Unrecognized version: %version% +GOTO done + +:win10 +CALL POWERSHELL -command if ('System.Net.WebClient' -as [type]) {(new-object System.Net.WebClient).DownloadFile(\"%dlurl%\",\"%jarlocation%\") } else { Invoke-WebRequest -Uri "%dlurl%" -Outfile "%jarlocation%" } + +GOTO done + +:win7 +rem this may be triggering the antivirus - bitsadmin.exe is a known threat +rem CALL bitsadmin /transfer GetPublisher /download /priority normal "%dlurl%" "%jarlocation%" + +rem this didn't work in win 10 +rem CALL Start-BitsTransfer /priority normal "%dlurl%" "%jarlocation%" + +rem this should work - untested +call (New-Object Net.WebClient).DownloadFile('%dlurl%', '%jarlocation%') +GOTO done + +:win8.1 +:win8 +:vista +GOTO done + + + +:done + + + + +ECHO. +ECHO Updating scripts +IF "%skipPrompts%"=="y" ( + SET updateScripts=Y +) ELSE ( + SET /p updateScripts="Update scripts? (Y/N) " +) +IF /I "%updateScripts%"=="Y" ( + GOTO scripts +) +GOTO end + + +:scripts + +REM Download all batch files (and this one with a new name) + +SETLOCAL DisableDelayedExpansion + + + +:dl_script_1 +ECHO Updating _updatePublisher.sh +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" } +if %ERRORLEVEL% == 0 goto upd_script_1 +echo "Errors encountered during download: %errorlevel%" +goto dl_script_2 +:upd_script_1 +start copy /y "_updatePublisher.new.sh" "_updatePublisher.sh" ^&^& del "_updatePublisher.new.sh" ^&^& exit + + +:dl_script_2 +ECHO Updating _genonce.bat +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" } +if %ERRORLEVEL% == 0 goto upd_script_2 +echo "Errors encountered during download: %errorlevel%" +goto dl_script_3 +:upd_script_2 +start copy /y "_genonce.new.bat" "_genonce.bat" ^&^& del "_genonce.new.bat" ^&^& exit + +:dl_script_3 +ECHO Updating _gencontinuous.bat +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" } +if %ERRORLEVEL% == 0 goto upd_script_3 +echo "Errors encountered during download: %errorlevel%" +goto dl_script_4 +:upd_script_3 +start copy /y "_gencontinuous.new.bat" "_gencontinuous.bat" ^&^& del "_gencontinuous.new.bat" ^&^& exit + + +:dl_script_4 +ECHO Updating _genonce.sh +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" } +if %ERRORLEVEL% == 0 goto upd_script_4 +echo "Errors encountered during download: %errorlevel%" +goto dl_script_5 +:upd_script_4 +start copy /y "_genonce.new.sh" "_genonce.sh" ^&^& del "_genonce.new.sh" ^&^& exit + +:dl_script_5 +ECHO Updating _gencontinuous.sh +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" } +if %ERRORLEVEL% == 0 goto upd_script_5 +echo "Errors encountered during download: %errorlevel%" +goto dl_script_6 +:upd_script_5 +start copy /y "_gencontinuous.new.sh" "_gencontinuous.sh" ^&^& del "_gencontinuous.new.sh" ^&^& exit + + + +:dl_script_6 +ECHO Updating _updatePublisher.bat +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" } +if %ERRORLEVEL% == 0 goto upd_script_6 +echo "Errors encountered during download: %errorlevel%" +goto end +:upd_script_6 +start copy /y "_updatePublisher.new.bat" "_updatePublisher.bat" ^&^& del "_updatePublisher.new.bat" ^&^& exit + + +:end + + +IF "%skipPrompts%"=="true" ( + PAUSE +) diff --git a/_updatePublisher.sh b/_updatePublisher.sh new file mode 100755 index 0000000..0f9ecbe --- /dev/null +++ b/_updatePublisher.sh @@ -0,0 +1,132 @@ +#!/bin/bash +pubsource=https://github.com/HL7/fhir-ig-publisher/releases/latest/download/ +publisher_jar=publisher.jar +dlurl=$pubsource$publisher_jar + +input_cache_path=$PWD/input-cache/ + +scriptdlroot=https://raw.githubusercontent.com/HL7/ig-publisher-scripts/main +update_bat_url=$scriptdlroot/_updatePublisher.bat +gen_bat_url=$scriptdlroot/_genonce.bat +gencont_bat_url=$scriptdlroot/_gencontinuous.bat +gencont_sh_url=$scriptdlroot/_gencontinuous.sh +gen_sh_url=$scriptdlroot/_genonce.sh +update_sh_url=$scriptdlroot/_updatePublisher.sh + +skipPrompts=false +FORCE=false + +if ! type "curl" > /dev/null; then + echo "ERROR: Script needs curl to download latest IG Publisher. Please install curl." + exit 1 +fi + +while [ "$#" -gt 0 ]; do + case $1 in + -f|--force) FORCE=true ;; + -y|--yes) skipPrompts=true ; FORCE=true ;; + *) echo "Unknown parameter passed: $1. Exiting"; exit 1 ;; + esac + shift +done + +echo "Checking internet connection" +curl -sSf tx.fhir.org > /dev/null + +if [ $? -ne 0 ] ; then + echo "Offline (or the terminology server is down), unable to update. Exiting" + exit 1 +fi + +if [ ! -d "$input_cache_path" ] ; then + if [ $FORCE != true ]; then + echo "$input_cache_path does not exist" + message="create it?" + read -r -p "$message" response + else + response=y + fi +fi + +if [[ $response =~ ^[yY].*$ ]] ; then + mkdir ./input-cache +fi + +publisher="$input_cache_path$publisher_jar" + +if test -f "$publisher" ; then + echo "IG Publisher FOUND in input-cache" + jarlocation="$publisher" + jarlocationname="Input Cache" + upgrade=true +else + publisher="../$publisher_jar" + upgrade=true + if test -f "$publisher"; then + echo "IG Publisher FOUND in parent folder" + jarlocation="$publisher" + jarlocationname="Parent Folder" + upgrade=true + else + echo "IG Publisher NOT FOUND in input-cache or parent folder" + jarlocation=$input_cache_path$publisher_jar + jarlocationname="Input Cache" + upgrade=false + fi +fi + +if [[ $skipPrompts == false ]]; then + + if [[ $upgrade == true ]]; then + message="Overwrite $jarlocation? (Y/N) " + else + echo Will place publisher jar here: "$jarlocation" + message="Ok (enter 'y' or 'Y' to continue, any other key to cancel)?" + fi + read -r -p "$message" response +else + response=y +fi +if [[ $skipPrompts == true ]] || [[ $response =~ ^[yY].*$ ]]; then + + echo "Downloading most recent publisher to $jarlocationname - it's ~100 MB, so this may take a bit" + curl -L $dlurl -o "$jarlocation" --create-dirs +else + echo cancelled publisher update +fi + +if [[ $skipPrompts != true ]]; then + message="Update scripts? (enter 'y' or 'Y' to continue, any other key to cancel)?" + read -r -p "$message" response + fi + +if [[ $skipPrompts == true ]] || [[ $response =~ ^[yY].*$ ]]; then + echo "Downloading most recent scripts " + + curl -L $update_bat_url -o /tmp/_updatePublisher.new + cp /tmp/_updatePublisher.new _updatePublisher.bat + rm /tmp/_updatePublisher.new + + curl -L $gen_bat_url -o /tmp/_genonce.new + cp /tmp/_genonce.new _genonce.bat + rm /tmp/_genonce.new + + curl -L $gencont_bat_url -o /tmp/_gencontinuous.new + cp /tmp/_gencontinuous.new _gencontinuous.bat + rm /tmp/_gencontinuous.new + + curl -L $gencont_sh_url -o /tmp/_gencontinuous.new + cp /tmp/_gencontinuous.new _gencontinuous.sh + chmod +x _gencontinuous.sh + rm /tmp/_gencontinuous.new + + curl -L $gen_sh_url -o /tmp/_genonce.new + cp /tmp/_genonce.new _genonce.sh + chmod +x _genonce.sh + rm /tmp/_genonce.new + + curl -L $update_sh_url -o /tmp/_updatePublisher.new + cp /tmp/_updatePublisher.new _updatePublisher.sh + chmod +x _updatePublisher.sh + rm /tmp/_updatePublisher.new +fi diff --git a/ig.ini b/ig.ini new file mode 100644 index 0000000..08eaff2 --- /dev/null +++ b/ig.ini @@ -0,0 +1,51 @@ +[IG] +# ini file for the Implementation Guide publisher +# see comments below for instructions + +ig = fsh-generated/resources/ImplementationGuide-ans.fhir.fr.example.json +template = https://github.com/ansforge/IG-template +#template = https://github.com/ansforge/IG-template/tree/for-comment-template #Usage to be discussed +#template = #local-template + + + +########################## +### ig.ini parameters: ### +########################## + +# ig: the name of the implementation guide resource file. +examples: +# ig = input/myig.xml +# ig = input/implementationguide-example2.xml + +# template: the IG template that will be used to create the implementation guide (normally be a package name, but can be a local folder). +# base fhir template: +#template = fhir.base.template + +# HL7 (non-FHIR) IG template: +#template = hl7.base.template + +# HL7 FHIR template: +#template = hl7.fhir.template + +# it's possible to specify a specific version of the template +#template = fhir.base.template#0.1.0 +# or the current version: +#template = fhir.base.template#current +# if no version is specified, the publisher will take the #current version + +# local templates can be used by prefixing a relative path with # : +#template = #mylocaltemplate +#template = #..\templates\mytesttemplate1 + +# local templates can also use absolute paths: +#template = #C:\MyWork\ImplementationGuides\mytemplates\mytesttemplate1 + + +# other parameters are defined in the ImplementationGuide resource: +# https://confluence.hl7.org/display/FHIR/Implementation+Guide+Parameters + +# for more documentation on implementation guides and templates, see the FHIR Guidance ImplementationGuide +# http://build.fhir.org/ig/FHIR/ig-guidance + + diff --git a/input/data/features.yml b/input/data/features.yml new file mode 100644 index 0000000..722ad70 --- /dev/null +++ b/input/data/features.yml @@ -0,0 +1,7 @@ +--- +disable_autonumbering: true +feedback: + - active: true + dashboard: + label: New Issue + url: https://github.com/ansforge/FIG_ans-ig-sample/issues/new \ No newline at end of file diff --git a/input/fsh/CodeSystem/CS_Competence.fsh b/input/fsh/CodeSystem/CS_Competence.fsh new file mode 100644 index 0000000..91e3ebf --- /dev/null +++ b/input/fsh/CodeSystem/CS_Competence.fsh @@ -0,0 +1,49 @@ +CodeSystem: CompetenceCS +Id: competence-code-system +Title: "Compétences CodeSystem" +Description: "Compétences des professionnels de santé." +* #C01 "Anatomie et Cytologie pathologiques humaines" "Anatomie, Cyto patho;Anatomie et Cytologie pathologiques humaines" +* #C03 "Anesthésie-réanimation" "Anesthésie-réanim;Anesthésie-réanimation" +* #C05 "Médecine appliquée aux sports" "Méd appliquée sports;Médecine appliquée aux sports" +* #C07 "Cardiologie" "Cardiologie;Cardiologie" +* #C09 "Chirurgie plastique, reconstructrice et esthétique" "Chir plast reco esth;Chirurgie plastique, reconstructrice et esthétique" +* #C10 "Chirurgie maxillo-faciale;Chirurgie maxillo-faciale;Chirurgie maxillo-faciale" +* #C11 "Chirurgie thoracique" "Chirurgie thoracique;Chirurgie thoracique" +* #C12 "Chirurgie orthopédique" "Chirurgie orthopédique;Chirurgie orthopédique" +* #C13 "Urologie" "Urologie;Urologie" +* #C15 "Dermato-vénéréologie" "Dermato-vénéréologie;Dermato-vénéréologie" +* #C20 "Hémobiologie" "Hémobiologie;Hémobiologie" +* #C23 "Gynécologie médicale et Obstétrique" "Gynéco-médicale, Obstétrique;Gynécologie médicale et Obstétrique" +* #C25 "Gynécologie médicale" "Gynécologie médicale;Gynécologie médicale" +* #C27 "Obstétrique" "Obstétrique;Obstétrique" +* #C29 "Maladies de l'appareil digestif" "Maladies appareil digestif;Maladies de l'appareil digestif" +* #C30 "Néphrologie" "Néphrologie;Néphrologie" +* #C31 "Médecine exotique" "Médecine exotique;Médecine exotique" +* #C33 "Allergologie" "Allergologie;Allergologie" +* #C34 "Angéiologie" "Angéiologie;Angéiologie" +* #C35 "Cancérologie" "Cancérologie;Cancérologie" +* #C36 "Diabétologie-nutrition" "Diabéto-nutrition;Diabétologie-nutrition" +* #C37 "Endocrinologie" "Endocrinologie;Endocrinologie" +* #C38 "Maladies du sang" "Maladies du sang;Maladies du sang" +* #C39 "Réanimation" "Réanimation;Réanimation" +* #C40 "Médecine légale" "Médecine légale;Médecine légale" +* #C41 "Médecine du travail" "Médecine du travail;Médecine du travail" +* #C43 "Neurologie" "Neurologie;Neurologie" +* #C45 "Neuro-chirurgie" "Neuro-chirurgie;Neuro-chirurgie" +* #C47 "Neuro-psychiatrie" "Neuro-psychiatrie;Neuro-psychiatrie" +* #C51 "Pédiatrie" "Pédiatrie;Pédiatrie" +* #C52 "Phoniatrie" "Phoniatrie;Phoniatrie" +* #C54 "Pneumologie" "Pneumologie;Pneumologie" +* #C57 "Psychiatrie" "Psychiatrie;Psychiatrie" +* #C58 "Psychiatrie, option enfant et adolescent" "Psychiatrie, opt enfant et ado;Psychiatrie, option enfant et adolescent" +* #C60 "Médecine physique et de réadaptation" "Médecine physique, réadapt;Médecine physique et de réadaptation" +* #C62 "Rhumatologie" "Rhumatologie;Rhumatologie" +* #C68 "Chirurgie pédiatrique" "Chirurgie pédiatrique;Chirurgie pédiatrique" +* #C69 "Médecine nucléaire" "Médecine nucléaire;Médecine nucléaire" +* #C71 "Médecine thermale" "Médecine thermale;Médecine thermale" +* #C72 "Génétique médicale" "Génétique médicale;Génétique médicale" +* #C75 "Endocrinologie et Maladies métaboliques" "Endocrin, Maladies métaboliq;Endocrinologie et Maladies métaboliques" +* #C76 "Orthopédie dento-maxillo-faciale" "Orthopédie dento-maxilo-fac;Orthopédie dento-maxillo-faciale" +* #C83 "Chirurgie de la face et du cou" "Chirurgie face et cou;Chirurgie de la face et du cou" + +// https://mos.esante.gouv.fr/NOS/TRE_R39-Competence/TRE_R39-Competence.pdf diff --git a/input/fsh/CodeSystem/CS_TypeCarte.fsh b/input/fsh/CodeSystem/CS_TypeCarte.fsh new file mode 100644 index 0000000..fb514a1 --- /dev/null +++ b/input/fsh/CodeSystem/CS_TypeCarte.fsh @@ -0,0 +1,10 @@ +CodeSystem: TypeCarteCS +Id: type-carte-code-system +Title: "Type de carte" +Description: "Type de carte professionnelle et personnelle." +* #CPA "Carte de Personnel Autorisé" "La carte d'un personnel autorisé (CDA/CPA)" +* #CPE "Carte de Personnel d'Etablissement" "La Carte de Personnel d'Etablissement de santé (CDE/CPE)." +* #CPF "Carte de Professionnel de Santé en Formation" "La Carte de Professionnel de Santé en Formation (CPF)." +* #CPS "Carte de Professionnel de Santé" "La Carte de Professionnel de Santé (CPS)." + +// https://mos.esante.gouv.fr/NOS/TRE_R87-TypeCarte/TRE_R87-TypeCarte.pdf \ No newline at end of file diff --git a/input/fsh/Examples/FrPatient-exemple.fsh b/input/fsh/Examples/FrPatient-exemple.fsh new file mode 100644 index 0000000..f368142 --- /dev/null +++ b/input/fsh/Examples/FrPatient-exemple.fsh @@ -0,0 +1,11 @@ +Instance : frpatient-exemple +InstanceOf: FrPatient +Description: "Exemple d'un patient français" +Usage: #example +* identifier[INS].system = "urn:oid:1.2.250.1.213.1.4.8" +* gender = #female +* identifier[INS].value = "239088815400243" +* name[0].family = "DARK" +* name[0].given[0] = "JEANNE MARIE" +* birthDate = 1939-08-13 + diff --git a/input/fsh/StructureDefinition/FrPatient.fsh b/input/fsh/StructureDefinition/FrPatient.fsh new file mode 100644 index 0000000..ffc14a0 --- /dev/null +++ b/input/fsh/StructureDefinition/FrPatient.fsh @@ -0,0 +1,33 @@ +Alias: $SCT = http://snomed.info/sct + +Profile: FrPatient +Parent: Patient +Id: fr-patient +Title: "Patient français" +Description: "Description du patient français" +// Extensions +* extension contains EyeColor named eyecolor 0..1 + +* extension[eyecolor] MS +* extension[eyecolor] ^short = "Eye color of the patient" + +* identifier ^slicing.discriminator.type = #pattern +* identifier ^slicing.discriminator.path = "system" +* identifier ^slicing.rules = #open +* identifier ^slicing.ordered = false +* identifier ^slicing.description = "Slice based on the identifier.system pattern" + + +* identifier contains INS 1..1 MS +* identifier[INS].system = "urn:oid:1.2.250.1.213.1.4.8" + + +* gender from ModifiedAdministrativeGender (required) +* gender ^short = "male | female | other" // instead of "male | female | other | unknown" + + + +Extension: EyeColor +Description: "Eye color extension" +* value[x] only CodeableConcept +* valueCodeableConcept from EyeColorVS (required) \ No newline at end of file diff --git a/input/fsh/ValueSet/VS_EyeColor.fsh b/input/fsh/ValueSet/VS_EyeColor.fsh new file mode 100644 index 0000000..13a27ce --- /dev/null +++ b/input/fsh/ValueSet/VS_EyeColor.fsh @@ -0,0 +1,6 @@ +ValueSet: EyeColorVS +Title: "EyeColor Value Set" +Description: "Different eye colors." +* $SCT#405738005 "Blue color" +* $SCT#371254008 "Brown color" +* $SCT#54662009 "Green color" \ No newline at end of file diff --git a/input/fsh/ValueSet/VS_MeltingPot.fsh b/input/fsh/ValueSet/VS_MeltingPot.fsh new file mode 100644 index 0000000..ff33829 --- /dev/null +++ b/input/fsh/ValueSet/VS_MeltingPot.fsh @@ -0,0 +1,7 @@ +ValueSet: MeltingPotVS +Title: "Melting Pot Value Set" +Description: "Melting Pot Value Set." +* $SCT#405738005 "Blue color (qualifier value)" +* $SCT#371254008 // Display rajouté tout seul +* competence-code-system#C01 // Display et définition rajoutés tout seul +* include codes from system type-carte-code-system // Display et définition rajoutés tout seul \ No newline at end of file diff --git a/input/fsh/ValueSet/VS_ModifiedAdministrativeGender.fsh b/input/fsh/ValueSet/VS_ModifiedAdministrativeGender.fsh new file mode 100644 index 0000000..d4aa314 --- /dev/null +++ b/input/fsh/ValueSet/VS_ModifiedAdministrativeGender.fsh @@ -0,0 +1,5 @@ +ValueSet: ModifiedAdministrativeGender +Title: "ModifiedAdministrativeGender" +Description: "AdministrativeGender without unknown code" +* include codes from system http://hl7.org/fhir/administrative-gender +* exclude http://hl7.org/fhir/administrative-gender#unknown \ No newline at end of file diff --git a/input/fsh/ValueSet/VS_TypeCarte.fsh b/input/fsh/ValueSet/VS_TypeCarte.fsh new file mode 100644 index 0000000..70ffd32 --- /dev/null +++ b/input/fsh/ValueSet/VS_TypeCarte.fsh @@ -0,0 +1,4 @@ +ValueSet: TypeCarteVS +Title: "Type Carte Value Set" +Description: "Type Carte Value Set." +* include codes from system type-carte-code-system // Display et définition rajoutés tout seul \ No newline at end of file diff --git a/input/ignoreWarnings.txt b/input/ignoreWarnings.txt new file mode 100644 index 0000000..1433119 --- /dev/null +++ b/input/ignoreWarnings.txt @@ -0,0 +1,40 @@ +== Suppressed Messages == + +# Add warning and/or information messages here after you've confirmed that they aren't really a problem +# instructions for ignoreWarnings.txt https://confluence.hl7.org/pages/viewpage.action?pageId=66938614#ImplementationGuideParameters-ManagingWarningsandHints +# (And include comments like this justifying why) + +# We expect that all of the 'structural' resources will only be validated against their respective 'core' resource definitions +Validate resource against profile http://hl7.org/fhir/StructureDefinition/ImplementationGuide +Validate resource against profile http://hl7.org/fhir/StructureDefinition/Library +Validate resource against profile http://hl7.org/fhir/StructureDefinition/ValueSet +Validate resource against profile http://hl7.org/fhir/StructureDefinition/StructureDefinition + +# Have verified that these examples are being checked against the expected profiles/resources. +INFORMATION: Binary/example: Binary: Validate resource against profile http://hl7.org/fhir/StructureDefinition/Binary +INFORMATION: Bundle/h1: Bundle: Validate resource against profile http://hl7.org/fhir/StructureDefinition/Bundle +INFORMATION: Bundle/h1: Bundle.entry[0].resource.ofType(Provenance): Validate resource against profile http://hl7.org/fhir/StructureDefinition/Provenance +INFORMATION: Patient/example: Patient: Validate resource against profile http://somewhere.org/fhir/uv/myig/StructureDefinition/mypatient + +# This is inherited from the base resource +WARNING: StructureDefinition/myObservation: StructureDefinition.snapshot.element[15].mapping[3].map: value should not start or finish with whitespace + +# These examples are fake code systems - they're not expected to be checked +Code System URI 'http://example.org/some-id-type-system' is unknown so the code cannot be validated +Code System URI 'http://example.org/some-system' is unknown so the code cannot be validated + +# We're expecting these to not match the slice - we're showing how you can use slicing to define the one repetition you want even when many repetitions might be present +INFORMATION: Patient/example: Patient.name[0]: This element does not match any known slice defined in the profile http://somewhere.org/fhir/uv/myig/StructureDefinition/mypatient +INFORMATION: Patient/example: Patient.name[1]: This element does not match any known slice defined in the profile http://somewhere.org/fhir/uv/myig/StructureDefinition/mypatient + +# If this was a real IG, there should be examples for these profiles too. But it's not, and I'm lazy... +WARNING: StructureDefinition.where(url = 'http://somewhere.org/fhir/uv/myig/StructureDefinition/mypractitioner'): The Implementation Guide contains no examples for this profile +WARNING: StructureDefinition.where(url = 'http://somewhere.org/fhir/uv/myig/StructureDefinition/myObservation'): The Implementation Guide contains no examples for this profile + +# The objective is to show a reference to an unknown code system, so these warnings are expected +WARNING: ValueSet/valueset-no-codesystem: ValueSet.compose[0].include[0]: Unknown System/Version specified, so Concepts and Filters can''t be checked +WARNING: ValueSet.where(id = 'valueset-no-codesystem'): Error from server: Unable to provide support for code system http://not-a-known-code-system + +# We don't want a code for the change reason (and this binding shouldn't be extensible anyhow) +WARNING: Bundle/h1: Bundle.entry[0].resource.ofType(Provenance).reason[0]: No code provided, and a code should be provided from the value set 'PurposeOfUse' (http://terminology.hl7.org/ValueSet/v3-PurposeOfUse) +WARNING: Bundle/h1: Bundle.entry[0].resource.ofType(Provenance).reason[0]: No code provided, and a code should be provided from the value set 'PurposeOfUse' (http://terminology.hl7.org/ValueSet/v3-PurposeOfUse) diff --git a/input/images-source/Images.pptx b/input/images-source/Images.pptx new file mode 100644 index 0000000..8ca3bfa Binary files /dev/null and b/input/images-source/Images.pptx differ diff --git a/input/images-source/tests.plantuml b/input/images-source/tests.plantuml new file mode 100644 index 0000000..9e9ed76 --- /dev/null +++ b/input/images-source/tests.plantuml @@ -0,0 +1,16 @@ +@startmindmap +!theme spacelab +* Tests +**[#343852] [[https://interop.esante.gouv.fr/ Espace de test]] +*** [[https://esante.gouv.fr/sites/default/files/media_entity/documents/CGU_espace_de_tests_v1.1.pdf CGU]] +*** [[https://industriels.esante.gouv.fr/sites/default/files/media/document/manuel_gazelle_evs%20V0.3_1.pdf Manuel]] +**[#D20050] [[https://github.com/ansforge/FIG_ans-ig-sample/wiki/Valider-une-ressource-contre-un-profil HAPI FHIR]] +**[#EAB9BF] Projectathon +*** [[https://industriels.esante.gouv.fr/produits-et-services/ci-sis-cadre-d-interoperabilite-des-systemes-d-information-de-sante/projectathon-interoperabilite Présentation]] +*** [[https://interop.esante.gouv.fr/gazelle/testing/testsDefinition/testsList.seam?testType=2&testStatus=1 Consulter les Tests]] +**[#383837] Verification de conformité +*** [[https://interop.esante.gouv.fr/gazelle/testing/testsDefinition/testsList.seam?testType=5&testStatus=1 Consulter les Tests]] +*** [[https://industriels.esante.gouv.fr/segur-du-numerique-en-sante/toutes-les-ressources-du-segur Programme Ségur]] +@endmindmap + + diff --git a/input/images/anImage.png b/input/images/anImage.png new file mode 100644 index 0000000..ca71b84 Binary files /dev/null and b/input/images/anImage.png differ diff --git a/input/pagecontent/autres_ressources.md b/input/pagecontent/autres_ressources.md new file mode 100644 index 0000000..ba4b669 --- /dev/null +++ b/input/pagecontent/autres_ressources.md @@ -0,0 +1,3 @@ +* [Téléchargements et usage](./downloads.html) +* [Spécifications FHIR]({{site.data.fhir.path}}index.html) +* [Site de l'ANS](https://esante.gouv.fr/) diff --git a/input/pagecontent/construction_des_flux.md b/input/pagecontent/construction_des_flux.md new file mode 100644 index 0000000..977e060 --- /dev/null +++ b/input/pagecontent/construction_des_flux.md @@ -0,0 +1,7 @@ +### Flux 1 + +Description du flux avec schémas et liens hypertextes vers le [flux 01](./st_flux1.html) + +### Flux 2 + +Description du flux avec schémas et liens hypertextes vers le [flux 02](./st_flux2.html) diff --git a/input/pagecontent/downloads.md b/input/pagecontent/downloads.md new file mode 100644 index 0000000..d9fcc27 --- /dev/null +++ b/input/pagecontent/downloads.md @@ -0,0 +1,22 @@ +L'implementation guide contient un package [téléchargeable ici](package.tgz) permettant de valider les instances par rapport aux profils qu'il contient. + +Pour cela, il suffit de télécharger le [package.tgz](package.tgz) et l'importer dans un serveur, par exemple sur hapi en suivant ce [script python](https://github.com/nmdp-bioinformatics/igloader) open source. + +Vous pourrez ensuite utiliser l'opération [$validate](https://www.hl7.org/fhir/resource-operation-validate.html) pour valider les instances de ressource contre un profil issu de cette spécification. + +Ensemble des ressources téléchargeables : + +* [L'ensemble de la specification (zip)](full-ig.zip) +* [Package (tgz)](package.tgz) + +### Définitions + +* [Définitions JSON (zip)](definitions.json.zip) +* [Définitions XML (zip)](definitions.xml.zip) +* [Définitions Turtle (zip)](definitions.ttl.zip) + +### Exemples + +* [Exemples XML (zip)](examples.xml.zip) +* [Exemples JSON (zip)](examples.json.zip) +* [Exemples Turtle (zip)](examples.ttl.zip) diff --git a/input/pagecontent/index.md b/input/pagecontent/index.md new file mode 100644 index 0000000..5102e59 --- /dev/null +++ b/input/pagecontent/index.md @@ -0,0 +1,50 @@ +
+Brief description of this Implementation Guide
+[Add a brief description of this IG in English]
+
+++ Attention ! Cet Implementation Guide n'est pas en version courante. La version courante sera accessible via l'URL canonique suite à la première release : http://interop.esante.gouv.fr/ig/fhir/[code - ig] +
+