diff --git a/_build.bat b/_build.bat index 2bf0d79..99d0e1f 100644 --- a/_build.bat +++ b/_build.bat @@ -89,7 +89,7 @@ echo --------------------------------------------------------------- echo. echo Please select an option: -echo 1. Download or upload publisher +echo 1. Download or update publisher echo 2. Build IG echo 3. Build IG - no sushi echo 4. Build IG - force no TX server diff --git a/_build.new.bat b/_build.new.bat new file mode 100644 index 0000000..99d0e1f --- /dev/null +++ b/_build.new.bat @@ -0,0 +1,386 @@ +@ECHO OFF +setlocal enabledelayedexpansion + +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 "upper_path=..\" +SET "scriptdlroot=https://raw.githubusercontent.com/HL7/ig-publisher-scripts/main" +SET "build_bat_url=%scriptdlroot%/_build.bat" +SET "build_sh_url=%scriptdlroot%/_build.sh" + + + +:: Debugging statements to check jar file location +ECHO Checking for publisher.jar in %input_cache_path% +IF EXIST "%input_cache_path%%publisher_jar%" ( + SET "jar_location=%input_cache_path%%publisher_jar%" + ECHO Found publisher.jar in input-cache +) ELSE ( + ECHO Checking for publisher.jar in %upper_path% + IF EXIST "%upper_path%%publisher_jar%" ( + SET "jar_location=%upper_path%%publisher_jar%" + ECHO Found publisher.jar in parent folder + ) ELSE ( + SET "jar_location=not_found" + SET "default_choice=1" + 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 +) + +echo --------------------------------------------------------------- +ECHO Checking internet connection... +PING tx.fhir.org -4 -n 1 -w 4000 >nul 2>&1 && SET "online_status=true" || SET "online_status=false" + +IF "%online_status%"=="true" ( + ECHO We're online and tx.fhir.org is available. + FOR /F "tokens=2 delims=:" %%a IN ('curl -s https://api.github.com/repos/HL7/fhir-ig-publisher/releases/latest ^| findstr "tag_name"') DO SET "latest_version=%%a" + SET "latest_version=!latest_version:"=!" + 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... + SET "txoption=-tx n/a" + SET "latest_version=unknown" + SET "default_choice=4" +) + +echo --------------------------------------------------------------- + + +IF NOT "%jar_location%"=="not_found" ( + FOR /F "tokens=*" %%i IN ('java "-Dfile.encoding=UTF-8" -jar "%jar_location%" -v 2^>^&1') DO SET "publisher_version=%%i" + SET "publisher_version=!publisher_version:"=!" + ECHO Detected publisher version: !publisher_version! +) ELSE ( + SET "publisher_version=unknown" + ECHO publisher.jar location is not found +) + +ECHO Publisher version: !publisher_version!; Latest is !latest_version! + +IF NOT "%online_status%"=="true" ( + ECHO We're offline. +) ELSE ( + IF NOT "!publisher_version!"=="!latest_version!" ( + ECHO An update is recommended. + SET "default_choice=1" + ) ELSE ( + ECHO Publisher is up to date. + SET "default_choice=2" + ) +) + +echo --------------------------------------------------------------- +echo. + +echo Please select an option: +echo 1. Download or update publisher +echo 2. Build IG +echo 3. Build IG - no sushi +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%):" +SET "userChoice=%ERRORLEVEL%" + + +:executeChoice +echo You selected: %userChoice% + +IF "%userChoice%"=="1" GOTO downloadpublisher +IF "%userChoice%"=="2" GOTO publish_once +IF "%userChoice%"=="3" GOTO publish_nosushi +IF "%userChoice%"=="4" GOTO publish_notx +IF "%userChoice%"=="5" GOTO debugjekyll +IF "%userChoice%"=="6" GOTO clean +IF "%userChoice%"=="0" EXIT /B + +:end + + + +:debugjekyll + echo Running Jekyll build... + jekyll build -s temp/pages -d output +GOTO end + + +:clean + echo Cleaning up directories... + if exist ".\input-cache\publisher.jar" ( + echo Preserving publisher.jar and removing other files in .\input-cache... + move ".\input-cache\publisher.jar" ".\" + rmdir /s /q ".\input-cache" + mkdir ".\input-cache" + move ".\publisher.jar" ".\input-cache" + ) else ( + if exist ".\input-cache\" ( + rmdir /s /q ".\input-cache" + ) + ) + if exist ".\temp\" ( + rmdir /s /q ".\temp" + echo Removed: .\temp + ) + if exist ".\output\" ( + rmdir /s /q ".\output" + echo Removed: .\output + ) + if exist ".\template\" ( + rmdir /s /q ".\template" + echo Removed: .\template + ) + +GOTO end + + + + + +:downloadpublisher +ECHO Downloading Publisher... +: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="Download? (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 ~200 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 _build.sh +call POWERSHELL -command if ('System.Net.WebClient' -as [type]) {(new-object System.Net.WebClient).DownloadFile(\"%build_sh_url%\",\"_build.new.sh\") } else { Invoke-WebRequest -Uri "%build_sh_url%" -Outfile "_build.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 "_build.new.sh" "_build.sh" ^&^& del "_build.new.sh" ^&^& exit + + +:dl_script_2 +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 +:upd_script_2 +start copy /y "_build.new.bat" "_build.bat" ^&^& del "_build.new.bat" ^&^& exit + + +GOTO end + + +:publish_once + +SET JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8 + +:: Debugging statements before running publisher +ECHO 1jar_location is: %jar_location% +IF NOT "%jar_location%"=="not_found" ( + java %JAVA_OPTS% -jar "%jar_location%" -ig . %txoption% %* +) ELSE ( + ECHO IG Publisher NOT FOUND in input-cache or parent folder. Please run _updatePublisher. Aborting... +) + +GOTO end + + + +:publish_nosushi + +SET JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8 + +:: Debugging statements before running publisher +ECHO 3jar_location is: %jar_location% +IF NOT "%jar_location%"=="not_found" ( + java %JAVA_OPTS% -jar "%jar_location%" -ig . %txoption% -no-sushi %* +) ELSE ( + ECHO IG Publisher NOT FOUND in input-cache or parent folder. Please run _updatePublisher. Aborting... +) + +GOTO end + + +:publish_notx +SET txoption=-tx n/a + +SET JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8 + +:: Debugging statements before running publisher +ECHO 2jar_location is: %jar_location% +IF NOT "%jar_location%"=="not_found" ( + java %JAVA_OPTS% -jar "%jar_location%" -ig . %txoption% %* +) ELSE ( + ECHO IG Publisher NOT FOUND in input-cache or parent folder. Please run _updatePublisher. Aborting... +) + +GOTO end + + + + +: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 %* +) 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... + ) +) + +GOTO end + + +:end + +:: Pausing at the end + + +IF NOT "%skipPrompts%"=="true" ( + PAUSE +) diff --git a/input/fsh/LPR3Identifier.fsh b/input/fsh/LPR3Identifier.fsh index 8a7f7a4..d7bc030 100644 --- a/input/fsh/LPR3Identifier.fsh +++ b/input/fsh/LPR3Identifier.fsh @@ -3,10 +3,12 @@ Parent: Identifier Id: lpr3-Identifier Title: "LPR3 Identifier" Description: "Identifier holding a LPR3 identifier" -* system 1.. +* system 1.. MS * system = "https://www.esundhed.dk/Registre/Landspatientregisteret" (exactly) -* value 1.. +* value 1.. MS * value obeys uuidv5 +* insert ProducerShallPutInNarrative(system) +* insert ProducerShallPutInNarrative(value) Invariant: uuidv5 Description: "LPR3 episodeOfCare identifiers must conform to a UUIDv5" diff --git a/input/fsh/MedComCoreCareTeam.fsh b/input/fsh/MedComCoreCareTeam.fsh index 35b498f..831383a 100644 --- a/input/fsh/MedComCoreCareTeam.fsh +++ b/input/fsh/MedComCoreCareTeam.fsh @@ -2,13 +2,13 @@ Profile: MedComCoreCareTeam Parent: CareTeam Id: medcom-core-careteam Description: "Careteam participating in the care of a patient" -* id MS -* text MS +* id 1.. MS +* text 1.. MS * text ^short = "The narrative text SHALL always be included when exchanging a MedCom FHIR Bundle." * text.status MS * text.div MS * name 1.. MS -* managingOrganization 0..1 MS +* managingOrganization 1..1 MS * managingOrganization only Reference(MedComCoreOrganization) * managingOrganization ^type.aggregation = #bundled * insert ProducerShallPutInNarrative(id) diff --git a/input/fsh/MedComCoreContactExtension.fsh b/input/fsh/MedComCoreContactExtension.fsh index d1f185d..f069097 100644 --- a/input/fsh/MedComCoreContactExtension.fsh +++ b/input/fsh/MedComCoreContactExtension.fsh @@ -10,7 +10,9 @@ Description: "Extension that contains the contact information" * valueContactPoint.value ^short = "Shall contain a relevant telephone number." * valueContactPoint.system = #phone * valueContactPoint.system MS - +* insert ProducerShallPutInNarrative(valueContactPoint.system) +* insert ProducerShallPutInNarrative(valueContactPoint.value) +* insert ProducerShallPutInNarrative(valueContactPoint.use) Invariant: medcom-core-contact Description: "The telephone number may include + and numbers from 0-9" diff --git a/input/fsh/MedComCoreDiagnosticRepport.fsh b/input/fsh/MedComCoreDiagnosticRepport.fsh index a16ca44..5e27ae2 100644 --- a/input/fsh/MedComCoreDiagnosticRepport.fsh +++ b/input/fsh/MedComCoreDiagnosticRepport.fsh @@ -3,10 +3,15 @@ Parent: DiagnosticReport Id: medcom-core-diagnosticreport Title: "MedComCoreDiagnosticReport" Description: "Report containing all observation results." -* identifier 1..1 MS -* identifier.value 1..1 MS -* identifier.value obeys medcom-uuidv4 -* identifier ^short = "The Diagnostic Report identifier" +* id 1.. MS +* text 1.. MS +* text ^short = "The narrative text SHALL always be included when exchanging a MedCom FHIR Bundle." +* text.status MS +* text.div MS +//* identifier 1..1 MS +//* identifier.value 1..1 MS +//* identifier.value obeys medcom-uuidv4 +//* identifier ^short = "The Diagnostic Report identifier" * status 1..1 MS * status from $StatusCodeDiagnosticReport * status ^short = "registered | partial | preliminary | final | corrected | cancelled | entered-in-error" @@ -15,14 +20,20 @@ Description: "Report containing all observation results." * subject 1..1 MS * subject only Reference(MedComCorePatient) * subject ^type.aggregation = #bundled -* issued 1..1 MS -* result MS +//* issued 1..1 MS +//* result MS * result only Reference(MedComCoreObservation) * result ^type.aggregation = #bundled -* performer MS -* media MS +* performer only Reference(MedComCorePractitioner or MedComCorePractitionerRole or MedComCoreCareTeam) +* resultsInterpreter only Reference(MedComCorePractitioner or MedComCorePractitionerRole or MedComCoreOrganization or MedComCoreCareTeam) +//* media MS * media.link only Reference(MedComCoreMedia) * media ^short = "Attachments that are relevant for assessment of the patient's condition." -* media.link MS SU -* conclusion 0..1 MS -* conclusion ^short = "A comment relevant for all observations in the report." +//* media.link MS +//* conclusion 0..1 //MS +//* conclusion ^short = "A comment relevant for all observations in the report." + +* insert ProducerShallPutInNarrative(id) +* insert ProducerShallPutInNarrative(status) +* insert ProducerShallPutInNarrative(code) +* insert ProducerShallPutInNarrative(subject) diff --git a/input/fsh/MedComCoreEncounter.fsh b/input/fsh/MedComCoreEncounter.fsh index 6917d67..437a99b 100644 --- a/input/fsh/MedComCoreEncounter.fsh +++ b/input/fsh/MedComCoreEncounter.fsh @@ -2,8 +2,8 @@ Profile: MedComCoreEncounter Parent: Encounter Id: medcom-core-encounter Description: "An interaction between a patient/citizen and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient/citizen." -* id MS -* text MS +* id 1.. MS +* text 1.. MS * text ^short = "The narrative text SHALL always be included when exchanging a MedCom FHIR Bundle." * text.status MS * text.div MS @@ -12,6 +12,8 @@ Description: "An interaction between a patient/citizen and healthcare provider(s * class from $EncounterClassVS * episodeOfCare MS * episodeOfCare.identifier MS +* episodeOfCare.identifier.system 1..1 MS +* episodeOfCare.identifier.value 1..1 MS * episodeOfCare ^slicing.discriminator.type = #value * episodeOfCare ^slicing.discriminator.path = "identifier.system" * episodeOfCare ^slicing.rules = #open @@ -33,8 +35,8 @@ Description: "An interaction between a patient/citizen and healthcare provider(s * insert ProducerShallPutInNarrative(status) * insert ProducerShallPutInNarrative(class) * insert ProducerShallPutInNarrative(subject) -* insert ProducerShallPutInNarrative(episodeOfCare.identifier) -* insert ProducerShallPutInNarrative(episodeOfCare[lpr3identifier].identifier) +* insert ProducerShallPutInNarrative(episodeOfCare.identifier.system) +* insert ProducerShallPutInNarrative(episodeOfCare.identifier.value) * insert ProducerShallPutInNarrative(serviceProvider) Instance: 6220b42d-c4fd-4c77-bae7-78e7d890dc8d diff --git a/input/fsh/MedComCoreMedia.fsh b/input/fsh/MedComCoreMedia.fsh index f3b328b..9d65b95 100644 --- a/input/fsh/MedComCoreMedia.fsh +++ b/input/fsh/MedComCoreMedia.fsh @@ -3,18 +3,26 @@ Parent: Media Id: medcom-core-media Title: "MedComMedia" Description: "Profile to capture relevant images,audio, video and document as part of the healthcare process" +* id 1.. MS +* text 1.. MS +* text ^short = "The narrative text SHALL always be included when exchanging a MedCom FHIR Bundle." +* text.status MS +* text.div MS * status MS -* identifier 1..1 MS -* identifier only MedComAssignedIdentifier -* operator 0..1 MS -* operator only Reference(MedComCorePractitioner or MedComCorePractitionerRole) -* content.data MS -* content.contentType MS -* content.contentType from $Mimetypes -* content.title 1..1 MS -* content.creation 1..1 MS -* operator obeys medcom-homecareReport-5 -* operator obeys medcom-homecareReport-6 +//* identifier 1..1 MS +//* identifier only MedComAssignedIdentifier +* operator 0..1 //MS +* operator only Reference(MedComCorePractitioner or MedComCorePractitionerRole or MedComCoreOrganization or MedComCoreCareTeam or MedComCorePatient or Device or DkCoreRelatedPerson) +* content MS +//* content.data MS +//* content.contentType MS +//* content.contentType from $Mimetypes +//* content.title 1..1 MS +//* content.creation 1..1 MS +//* operator obeys medcom-homecareReport-5 +//* operator obeys medcom-homecareReport-6 +* insert ProducerShallPutInNarrative(id) +* insert ProducerShallPutInNarrative(status) Invariant: medcom-homecareReport-5 diff --git a/input/fsh/MedComCoreObservation.fsh b/input/fsh/MedComCoreObservation.fsh index 87b15c3..5887c1e 100644 --- a/input/fsh/MedComCoreObservation.fsh +++ b/input/fsh/MedComCoreObservation.fsh @@ -2,21 +2,31 @@ Profile: MedComCoreObservation Parent: DkCoreObservation Id: medcom-core-observation Title: "MedComCoreObservation" -Description: "Observation profile intended to be used in MedComHomeCareObservation and MedCom's Laboratory standards." -* identifier 1..1 MS -* identifier.value 1..1 MS -* identifier.value obeys medcom-uuidv4 -* identifier ^short = "The Observation identifier" +Description: "Observation profile." +* id 1.. MS +* text 1.. MS +* text ^short = "The narrative text SHALL always be included when exchanging a MedCom FHIR Bundle." +* text.status MS +* text.div MS * status 1..1 MS * status from $ObsStatusCodes * status ^short = "registered | partial | preliminary | final | corrected | cancelled | entered-in-error" -* effectiveDateTime MS -* effectiveDateTime ^short = "The date and time the sample was taken (Danish: prøvetegningstidspunkt)." +* effective[x] ^short = "The date and time of the observation." * code MS -* code.coding.code MS -* code.coding.system MS * subject 1..1 MS * subject only Reference(MedComCorePatient) * subject ^type.aggregation = #bundled -* note MS -* note ^short = "A comment on the individual result (Danish: Analysekommentar)" +* performer 1.. MS +* performer only Reference(MedComCoreOrganization or MedComCorePractitioner or MedComCorePractitionerRole or MedComCoreCareTeam or MedComCorePatient or DkCoreRelatedPerson) +* extension contains + $MedComObsExtValueAttachment named valueAttachment 0..* + +/* // --- R5 valueAttachment via official cross-version extension --- +* extension contains + $obsExtValueAttachment named valueAttachmentR5 0..* +* extension[valueAttachmentR5].value[x] only Attachment */ + +* insert ProducerShallPutInNarrative(id) +* insert ProducerShallPutInNarrative(status) +* insert ProducerShallPutInNarrative(subject) +* insert ProducerShallPutInNarrative(performer) diff --git a/input/fsh/MedComCoreOrganization.fsh b/input/fsh/MedComCoreOrganization.fsh index c88ba92..60adc61 100644 --- a/input/fsh/MedComCoreOrganization.fsh +++ b/input/fsh/MedComCoreOrganization.fsh @@ -2,18 +2,22 @@ Profile: MedComCoreOrganization Parent: DkCoreOrganization Id: medcom-core-organization Description: "A formally recognized organizations within danish healthcare, registered with a SOR identifier issued by The Danish Health Data Authority" -* id MS -* text MS +* id 1.. MS +* text 1.. MS * text ^short = "The narrative text SHALL always be included when exchanging a MedCom FHIR Bundle." * text.status MS * text.div MS +* identifier * identifier[SOR-ID] ^short = "Sundhedsvæsenets Organisationsregister (SOR) identifier" * identifier[SOR-ID] 1.. -* identifier[SOR-ID] MS SU +* identifier[SOR-ID] MS +* identifier[SOR-ID].system MS +* identifier[SOR-ID].value MS * name MS * name ^definition = "Name of the organization. Shall be present if known by the sender." * insert ProducerShallPutInNarrative(id) -* insert ProducerShallPutInNarrative(identifier[SOR-ID]) +* insert ProducerShallPutInNarrative(identifier[SOR-ID].system) +* insert ProducerShallPutInNarrative(identifier[SOR-ID].value) * insert ProducerShallPutInNarrative(name) Instance: 12ee0dde-a672-462f-820d-5efe832d73c9 diff --git a/input/fsh/MedComCorePatient.fsh b/input/fsh/MedComCorePatient.fsh index 6da45ac..d9673c1 100644 --- a/input/fsh/MedComCorePatient.fsh +++ b/input/fsh/MedComCorePatient.fsh @@ -2,47 +2,58 @@ Profile: MedComCorePatient Parent: DkCorePatient Id: medcom-core-patient Description: "Patient/citizen resource to use as subject in MedCom communication." -* id MS -* text MS +* id 1.. MS +* text 1.. MS * text ^short = "The narrative text SHALL always be included when exchanging a MedCom FHIR Bundle." * text.status MS * text.div MS * identifier[cpr] ^short = "Unique identification number for all citizens in Denmark, called civil person register (CPR-number)." * identifier[cpr] MS +* identifier[cpr].system MS +* identifier[cpr].value MS * identifier[x-ecpr] MS +* identifier[x-ecpr].system MS +* identifier[x-ecpr].value MS * identifier[d-ecpr] MS -* name 1.. +* identifier[d-ecpr].system MS +* identifier[d-ecpr].value MS +* name 1.. MS * name[official] 1.. MS +* name[official].use MS * name[official].given MS * name[official].given ^definition = "Shall be present if the official given name of the patient is known, danish \"fornavn\". " * name[official].family MS * name[official].family ^definition = "Shall always be present, danish \"efternavn\". " * telecom ^definition = "Shall contain value, system and use if these information are known." -* telecom only MedComMessagingContactPoint +//* telecom only MedComMessagingContactPoint //* deceased[x] MS //* deceased[x] ^definition = "Shall contain information if the patient is deceased and it is relevant in the given context" //* deceased[x] ^short = "Shall only be sent if the patient is deceased or the status change from deceased to non-deceased" * address ^definition = "Shall contain all known, relevant addresses of the patient" -* address.line MS +//* address.line MS * address.line ^definition = "Shall contain the known information about the street name, number etc. to provide an exact address" -* address.city MS +//* address.city MS * address.city ^definition = "Shall be present if the city is known" -* address.postalCode MS +//* address.postalCode MS * address.postalCode ^definition = "Shall be present if the postal code is known" * managingOrganization only Reference(MedComCoreOrganization) * managingOrganization ^type.aggregation = #bundled * managingOrganization ^definition = "Organization that is the custodian of the patient record. This can e.g. be the sender of a message or responsable for the patients treatment. One of these organizations will always be included in the bundle, why this element is not mandatory to include." -* identifier and name and telecom and address MS +* identifier and name MS //and telecom and address MS * insert ProducerShallPutInNarrative(id) -* insert ProducerShallPutInNarrative(identifier[cpr]) -* insert ProducerShallPutInNarrative(identifier[x-ecpr]) -* insert ProducerShallPutInNarrative(identifier[d-ecpr]) +* insert ProducerShallPutInNarrative(identifier[cpr].value) +* insert ProducerShallPutInNarrative(identifier[cpr].system) +* insert ProducerShallPutInNarrative(identifier[x-ecpr].value) +* insert ProducerShallPutInNarrative(identifier[x-ecpr].system) +* insert ProducerShallPutInNarrative(identifier[d-ecpr].value) +* insert ProducerShallPutInNarrative(identifier[d-ecpr].system) * insert ProducerShallPutInNarrative(name[official].family) * insert ProducerShallPutInNarrative(name[official].given) -* insert ProducerShallPutInNarrative(telecom) -* insert ProducerShallPutInNarrative(address.line) -* insert ProducerShallPutInNarrative(address.city) -* insert ProducerShallPutInNarrative(address.postalCode) +* insert ProducerShallPutInNarrative(name[official].use) +//* insert ProducerShallPutInNarrative(telecom) +//* insert ProducerShallPutInNarrative(address.line) +//* insert ProducerShallPutInNarrative(address.city) +//* insert ProducerShallPutInNarrative(address.postalCode) Instance: 733cef33-3626-422b-955d-d506aaa65fe1 InstanceOf: MedComCorePatient diff --git a/input/fsh/MedComCorePractitioner.fsh b/input/fsh/MedComCorePractitioner.fsh index b680abc..8d30ef1 100644 --- a/input/fsh/MedComCorePractitioner.fsh +++ b/input/fsh/MedComCorePractitioner.fsh @@ -2,14 +2,17 @@ Profile: MedComCorePractitioner Parent: http://hl7.dk/fhir/core/StructureDefinition/dk-core-practitioner Id: medcom-core-practitioner Description: "Practitioner resource is used to describe a healthcare professional or another actor involved in citizen or patient care." -* id MS -* text MS +* id 1.. MS +* text 1.. MS * text ^short = "The narrative text SHALL always be included when exchanging a MedCom FHIR Bundle." * text.status MS * text.div MS * name MS +* name.given MS +* name.family MS * insert ProducerShallPutInNarrative(id) -* insert ProducerShallPutInNarrative(name) +* insert ProducerShallPutInNarrative(name.given) +* insert ProducerShallPutInNarrative(name.family) Instance: e9eacb62-666b-11ed-9022-0242ac120002 InstanceOf: MedComCorePractitioner diff --git a/input/fsh/MedComCorePractitionerRole.fsh b/input/fsh/MedComCorePractitionerRole.fsh index e61ef87..5c92fc4 100644 --- a/input/fsh/MedComCorePractitionerRole.fsh +++ b/input/fsh/MedComCorePractitionerRole.fsh @@ -1,9 +1,9 @@ Profile: MedComCorePractitionerRole -Parent: PractitionerRole +Parent: DkCorePractitionerRole Id: medcom-core-practitionerrole Description: "PractitionerRole resource used to describe the role of a healthcare professional or another actor involved in citizen or patient care." -* id MS -* text MS +* id 1.. MS +* text 1.. MS * text ^short = "The narrative text SHALL always be included when exchanging a MedCom FHIR Bundle." * text.status MS * text.div MS @@ -12,23 +12,33 @@ Description: "PractitionerRole resource used to describe the role of a healthcar * code MS * code from $PractitionerRoles (example) * code.coding MS +* code.coding.system 1.. MS +* code.coding.code 1.. MS * code.text MS -* organization MS +* organization 1.. MS * organization only Reference(MedComCoreOrganization) * organization ^type.aggregation = #bundled +* obeys medcom-core-practitionerrole-code-xor-text * insert ProducerShallPutInNarrative(id) * insert ProducerShallPutInNarrative(practitioner) * insert ProducerShallPutInNarrative(organization) -* insert ProducerShallPutInNarrative(code.coding) +* insert ProducerShallPutInNarrative(code.coding.system) +* insert ProducerShallPutInNarrative(code.coding.code) * insert ProducerShallPutInNarrative(code.text) +Invariant: medcom-core-practitionerrole-code-xor-text +Description: "There shall exist a practitioner role code.coding or text if code is present." +Severity: #error +Expression: "code.exists() implies (code.coding.where(system.exists() and code.exists()).exists() xor code.text.exists())" + Instance: 6057686e-666c-11ed-9022-0242ac120002 InstanceOf: MedComCorePractitionerRole Title: "Example of a PractitionerRole" Description: "Example of a practitioner role with a code and reference to a practitioner" * code = $PractitionerRole#afdelingslaege * practitioner = Reference(e9eacb62-666b-11ed-9022-0242ac120002) +* organization = Reference(12ee0dde-a672-462f-820d-5efe832d73c9) //Practitioner rolle @@ -37,4 +47,5 @@ InstanceOf: MedComCorePractitionerRole Title: "PractitionerRole with a role and reference to a practitioner" Description: "PractitionerRole with a role and reference to a practitioner" * practitioner = Reference(e9eacb62-666b-11ed-9022-0242ac120002) -* code = $PractitionerRole#sygeplejerske \ No newline at end of file +* code = $PractitionerRole#sygeplejerske +* organization = Reference(12ee0dde-a672-462f-820d-5efe832d73c9) \ No newline at end of file diff --git a/input/fsh/MedComMessagingContactPoint.fsh b/input/fsh/MedComMessagingContactPoint.fsh deleted file mode 100644 index 6fcc68b..0000000 --- a/input/fsh/MedComMessagingContactPoint.fsh +++ /dev/null @@ -1,7 +0,0 @@ -Profile: MedComMessagingContactPoint -Parent: ContactPoint -Id: medcom-messaging-contactpoint -Description: "The datatype ContactPoint is specified for use in MedCom messages." -* system MS -* value MS -* use MS \ No newline at end of file diff --git a/input/fsh/MedComObservationValueAttachmentExtension.fsh b/input/fsh/MedComObservationValueAttachmentExtension.fsh new file mode 100644 index 0000000..76d8ad5 --- /dev/null +++ b/input/fsh/MedComObservationValueAttachmentExtension.fsh @@ -0,0 +1,19 @@ +Profile: MedComObservationValueAttachmentExtension +Parent: Extension +Id: medcom-observation-value-attachment-extension +Title: "MedCom Observation ValueAttachment Extension" +Description: "Generic extension for Observation value as Attachment type." + +// Canonical URL for extensionen +* ^url = "http://medcomfhir.dk/ig/core/StructureDefinition/medcom-observation-value-attachment-extension" +* ^status = #active + +// Hvor extensionen må bruges +* ^context[0].type = #element +* ^context[0].expression = "Observation" +* ^context[+].type = #element +* ^context[=].expression = "Observation.extension" +* . ^short = "Observation value as attachment." +* url 1..1 +* url = "http://medcomfhir.dk/ig/core/StructureDefinition/medcom-observation-value-attachment-extension" (exactly) +* value[x] only Attachment \ No newline at end of file diff --git a/input/fsh/aliases.fsh b/input/fsh/aliases.fsh index 8133854..1850247 100644 --- a/input/fsh/aliases.fsh +++ b/input/fsh/aliases.fsh @@ -14,4 +14,9 @@ Alias: $DiagnosticReportCodeSystem = http://medcomfhir.dk/ig/terminology/CodeSys Alias: $DiagnosticReportCode = http://medcomfhir.dk/ig/terminology/ValueSet/MedComDiagnosticReportCodesValueset Alias: $mediastatus = http://hl7.org/fhir/event-status Alias: $ProducenID = http://medcomfhir.dk/ig/terminology/CodeSystem/MedComProducentID -Alias: $obligation = http://hl7.org/fhir/StructureDefinition/obligation \ No newline at end of file +Alias: $obligation = http://hl7.org/fhir/StructureDefinition/obligation + +// ValueAttachment R5 extension used in Observation +Alias: $obsExtValueAttachment = http://hl7.org/fhir/5.0/StructureDefinition/extension-Observation.value[x] + +Alias: $MedComObsExtValueAttachment = http://medcomfhir.dk/ig/core/StructureDefinition/medcom-observation-value-attachment-extension \ No newline at end of file diff --git a/input/pagecontent/StructureDefinition-medcom-core-careteam-intro.md b/input/pagecontent/StructureDefinition-medcom-core-careteam-intro.md index a8646fc..629ad5d 100644 --- a/input/pagecontent/StructureDefinition-medcom-core-careteam-intro.md +++ b/input/pagecontent/StructureDefinition-medcom-core-careteam-intro.md @@ -1,5 +1,5 @@ ### Scope and usage -This profile describes a MedComCoreCareTeam. A CareTeam is one or more professionals who plan to participate in the coordination and delivery of care for a patient or citizen. A MedComCoreCareTeam shall include a name and it may include a reference to an MedComCoreOrganization or MedComMessagingOrganization, as the managing organisation for the careteam. +This profile describes a MedComCoreCareTeam. A CareTeam is one or more professionals who plan to participate in the coordination and delivery of care for a patient or citizen. A MedComCoreCareTeam **SHALL** include a name and it may include a reference to an Organization, as the managing organisation for the careteam. -Please refer to the tab "Snapshot Table(Must support)" below for the definition of the required content of a MedComCoreOrganization. \ No newline at end of file +Please refer to the tab "Snapshot Table" below for the definition of the required content of a MedComCoreOrganization. \ No newline at end of file diff --git a/input/pagecontent/StructureDefinition-medcom-core-diagnosticreport-intro.md b/input/pagecontent/StructureDefinition-medcom-core-diagnosticreport-intro.md index 6cd9d95..2531459 100644 --- a/input/pagecontent/StructureDefinition-medcom-core-diagnosticreport-intro.md +++ b/input/pagecontent/StructureDefinition-medcom-core-diagnosticreport-intro.md @@ -1,7 +1,5 @@ ->Note: This profile is developed to be part of a production trial of the communication between the general practitioner and municipal acute care team. - #### Scope and usage -This profile is intended to be uses in MedCom HomeCareObservation and MedCom's Laboratory standards. +This profile is intended to be uses as a diagnostic report in MedCom standards. #### Attachments In MedComCoreDiagnosticReport it is allowed to include attachments. When sending an attachment diagnosticReport.media shall be used. The DiagnosticReport.media.link reference to MedComCoreMedia resource where the atachment shall be added. diff --git a/input/pagecontent/StructureDefinition-medcom-core-encounter-intro.md b/input/pagecontent/StructureDefinition-medcom-core-encounter-intro.md index 771485e..de850f1 100644 --- a/input/pagecontent/StructureDefinition-medcom-core-encounter-intro.md +++ b/input/pagecontent/StructureDefinition-medcom-core-encounter-intro.md @@ -2,13 +2,13 @@ This profile describes the MedComCoreEncounter. An encounter describes the interaction between a patient and one or more healthcare providers for the purpose of providing healthcare services or assessing the health status of a patient. An encounter can take place in an ambulatory, an emergency, at the citizen's home, virtually and so on. -The base expectations when describing an encounter in a Danish context is to include the subject of the encounter which shall be a [MedComCorePatient](https://medcomfhir.dk/ig/core/StructureDefinition-medcom-core-patient.html) as well as a status and class, which are described below. For some specific purposes, such as [HospitalNotification](https://medcomfhir.dk/ig/hospitalnotification/), there is a need for a specialization of the MedComCoreEncounter. In these cases, it will be explicitly described which encounter to use and which changed are applied. +The base expectations when describing an encounter in a Danish context is to include the subject of the encounter as well as a status and class, which are described below. -Please refer to the tab "Snapshot Table(Must support)" below for the definition of the required content of a MedComCoreEncounter. +Please refer to the tab "Snapshot Table" below for the definition of the required content of a MedComCoreEncounter. #### Status and class -A status and class shall be included MedComCoreEncounter. +A status and class **SHALL** be included in a MedComCoreEncounter. The status refers to the current state of the encounter. This will most often change due to the nature an encounter, as it will pass through many statuses which follows the workflow of the encounter. A status can be 'in-progress' describing that the patient is present or the meeting has begun, or 'finished' describing that the encounter is finished. @@ -22,4 +22,4 @@ The EpisodeOfCare identifier is used to technically connect several encounters c It is both possible to use a [Landspatientregisteret](https://www.esundhed.dk/Registre/Landspatientregisteret)-identifier (called LPR3-identifier) and a locally defined identifier as the EpisodeOfCare-identifier. -Whether a LPR3-identifier or a locally defined identifier is used, it shall be an UUID. The LPR3-identifier shall obey a rule stating that the UUID shall be of version 5, [here more information about the LPR3-identifier can be found](https://scandihealth.github.io/lpr3-docs/). Using a locally defined identifier, a system for the identifier shall be added. +Whether an LPR3-identifier or a locally defined identifier is used, it **SHALL** be an UUID. The LPR3-identifier **SHALL** obey a rule stating that the UUID **SHALL** be of version 5, [here more information about the LPR3-identifier can be found](https://scandihealth.github.io/lpr3-docs/). Using a locally defined identifier, a system for the identifier **SHALL** be added. diff --git a/input/pagecontent/StructureDefinition-medcom-core-media-intro.md b/input/pagecontent/StructureDefinition-medcom-core-media-intro.md index f5ca357..541c640 100644 --- a/input/pagecontent/StructureDefinition-medcom-core-media-intro.md +++ b/input/pagecontent/StructureDefinition-medcom-core-media-intro.md @@ -1,5 +1,3 @@ ->Note: This profile is developed to be part of a production trial of the communication between the general practitioner and municipal acute care team. - ### Scope and use This profile is a MedCom Core profile for media and is intended to represent relevant attachments for a variety cases including: * laboratory observations @@ -8,15 +6,7 @@ This profile is a MedCom Core profile for media and is intended to represent rel Only an attachment of the permitted formats must be included. [Click here to see the permitted formats of an attachment](https://medcomfhir.dk/ig/terminology/ValueSet-medcom-core-attachmentMimeTypes.html) - - -The attached file shall be base64-encoded and added to the element MedComCoreMedia.content.data -If the attached file is sent, it is a requirement that the ID and title of the attached file shall be sent. -The ID of the attachment shall be expressed using Media.identifier element. -The Media.content.titel element shall be used to express the titel of the attachment. \ No newline at end of file +The attached file **SHALL** be base64-encoded and added to the element MedComCoreMedia.content.data +If the attached file is sent, it is a requirement that the ID and title of the attached file **SHALL** be sent. +The ID of the attachment **SHALL** be expressed using Media.identifier element. +The Media.content.titel element **SHALL** be used to express the titel of the attachment. \ No newline at end of file diff --git a/input/pagecontent/StructureDefinition-medcom-core-observation-intro.md b/input/pagecontent/StructureDefinition-medcom-core-observation-intro.md index c8e8ec2..85afc7a 100644 --- a/input/pagecontent/StructureDefinition-medcom-core-observation-intro.md +++ b/input/pagecontent/StructureDefinition-medcom-core-observation-intro.md @@ -1,16 +1,16 @@ ->Note: This profile is developed to be part of a production trial of the communication between the general practitioner and municipal acute care team. - ### Scope and use -This profile is a MedCom Core profile for observations and is intended to represent observations for a variety cases including: +This profile is a MedCom Core profile for observation measurements and simple assertions made about a patient. + +It is intended to represent observations for a variety cases including for example: * laboratory observations -* observations performed by a municipal acute care team +* observations performed by a municipal acute care team +* EKG study data #### Status -The MedComCoreObservation resource require an indication of the observation status. To indicate the observation status a code from ValueSet defined by MedCom shall be used. Click here se the status codes. - +The MedComCoreObservation resource require an indication of the observation status. To indicate the observation status, a code from this valueSet defined by MedCom **MUST** be used. Click here se the status codes. #### Codes -In a Observation resource, codes from CodeSystems are used to describe what is observed in the elements Observation.code.coding. In the element Observation.code.coding six CodeSystem are specified. +In an Observation resource, codes from CodeSystems are used to describe what is observed in the elements Observation.code.coding. In the element Observation.code.coding six possible CodeSystem are specified. * NPU codes are the most used codes in Danmark to express analysis performed at the laboratory. * LOINC codes is an international Codsystem for health measurements, observations, and documents. LOINC codes are less stricted then NPU codes. * IEEE codes are internationaly codes for devices and can be used to express an original observation from a device. @@ -18,3 +18,5 @@ In a Observation resource, codes from CodeSystems are used to describe what is o * MedCom codes are Danish codes, that have been necessary in Danish interoperability projects through time and are used to express analysis performed at the laboratory. * SNOMED CT codes are the world's most comprehensive clinical terminology.SNOMED CT is often used as a reference terminology, to give a common language of retrieval for data that have originally been defined or coded in some other way +#### Use of the valueAttachment Extension +This profile contains a FHIR extension designed to hold an attachment encoded in Base64. The `valueAttachment` element is implemented as an extension because the base `value[x]` element does not support the `Attachment` type. The extension can also capture essential metadata for the attachment. \ No newline at end of file diff --git a/input/pagecontent/StructureDefinition-medcom-core-organization-intro.md b/input/pagecontent/StructureDefinition-medcom-core-organization-intro.md index 22695e1..5682d9d 100644 --- a/input/pagecontent/StructureDefinition-medcom-core-organization-intro.md +++ b/input/pagecontent/StructureDefinition-medcom-core-organization-intro.md @@ -1,8 +1,8 @@ ### Scope and usage -This profile describes the MedComCoreOrganization. The MedComCorePractitioner is inherited from the [DkCoreOrganization](https://hl7.dk/fhir/core/2.0.0/StructureDefinition-dk-core-organization.html) profile defined by HL7 Denmark. +This profile describes the MedComCoreOrganization. The MedComCoreOrganization is inherited from the [DkCoreOrganization](https://hl7.dk/fhir/core/2.0.0/StructureDefinition-dk-core-organization.html) profile defined by HL7 Denmark. The base expectations when describing an organisation in a Danish context is to include an identifier, in terms of a Sundhundsvæsenets Organisations Register (SOR)-identifier. This profile is used to describe e.g. the organisation responsible for an encounter. When using an organisation for exchange purposes, such as a sender, receiver or carbon-copy, please refer to the [MedComMessagingOrganization](http://medcomfhir.dk/ig/messaging/StructureDefinition-medcom-messaging-organization.html). -Please refer to the tab "Snapshot Table(Must support)" below for the definition of the required content of a MedComCoreOrganization. \ No newline at end of file +Please refer to the tab "Snapshot Table" below for the definition of the required content of a MedComCoreOrganization. \ No newline at end of file diff --git a/input/pagecontent/StructureDefinition-medcom-core-patient-intro.md b/input/pagecontent/StructureDefinition-medcom-core-patient-intro.md index bdc8ed1..900673e 100644 --- a/input/pagecontent/StructureDefinition-medcom-core-patient-intro.md +++ b/input/pagecontent/StructureDefinition-medcom-core-patient-intro.md @@ -1,14 +1,14 @@ ### Scope and usage MedComCorePatient profile describes information about a patient or citizen in a MedCom standard. -The MedComCorePatient is inherited from the [DkCorePatient](https://hl7.dk/fhir/core/2.0.0/StructureDefinition-dk-core-patient.html) profile defined by HL7 Denmark. An identifier and the patients official family name ('efternavn' in Danish) shall both be present, when exchanging patient related information. +The MedComCorePatient is inherited from the [DkCorePatient](https://hl7.dk/fhir/core/2.0.0/StructureDefinition-dk-core-patient.html) profile defined by HL7 Denmark. An identifier and the patients official family name ('efternavn' in Danish) **SHALL** both be present, when exchanging patient related information. -Please refer to the tab "Snapshot Table(Must support)" below for the definition of the required content of a MedComCorePatient. +Please refer to the tab "Snapshot Table" below for the definition of the required content of a MedComCorePatient. #### Patient identifiers -A MedComCorePatient shall include an identifier, containing a value which is the actual id and a system which is used to identify a set of unique values. +A MedComCorePatient **SHALL** include an identifier, containing a value which is the actual id and a system which is used to identify a set of unique values. -When a patient has an official civil person register (CPR)-number this shall be used. To represent a CPR-number, the identifier [DkCoreCprIdentifier](https://hl7.dk/fhir/core/2.0.0/StructureDefinition-dk-core-cpr-identifier.html) shall be used. In the identifier the system is used to describes that value is an official CPR-number, as described on [cpr.dk](https://cpr.dk/). +When a patient has an official civil person register (CPR)-number this **SHALL** be used. To represent a CPR-number, the identifier [DkCoreCprIdentifier](https://hl7.dk/fhir/core/2.0.0/StructureDefinition-dk-core-cpr-identifier.html) **SHALL** be used. In the identifier the system is used to describes that value is an official CPR-number, as described on [cpr.dk](https://cpr.dk/). -Only in cases where the patient does not have an official CPR-number, a replacement person identifier (Danish: Erstatningspersonnummer) (eCPR)-number shall be used. More information concerning the use of eCPR-numbers can be found on [DkCorePatient](https://hl7.dk/fhir/core/StructureDefinition-dk-core-patient.html#ecpr-identifier). \ No newline at end of file +Only in cases where the patient does not have an official CPR-number, a replacement person identifier (Danish: Erstatningspersonnummer) (eCPR)-number **SHALL** be used. More information concerning the use of eCPR-numbers can be found on [DkCorePatient](https://hl7.dk/fhir/core/StructureDefinition-dk-core-patient.html#ecpr-identifier). \ No newline at end of file diff --git a/input/pagecontent/StructureDefinition-medcom-core-practitioner-intro.md b/input/pagecontent/StructureDefinition-medcom-core-practitioner-intro.md index 9ce6a33..adef224 100644 --- a/input/pagecontent/StructureDefinition-medcom-core-practitioner-intro.md +++ b/input/pagecontent/StructureDefinition-medcom-core-practitioner-intro.md @@ -1,8 +1,8 @@ ### Scope and usage This profile describes the MedComCorePractitioner which is used to describe a Practitioner in a MedCom standard. -The MedComCorePractitioner is inherited from the [DkCorePractitioner](https://hl7.dk/fhir/core/2.0.0/StructureDefinition-dk-core-practitioner.html) profile defined by HL7 Denmark. The only change is that MedComCorePractitioner shall include a name of the practitioner if it is available. +The MedComCorePractitioner is inherited from the [DkCorePractitioner](https://hl7.dk/fhir/core/2.0.0/StructureDefinition-dk-core-practitioner.html) profile defined by HL7 Denmark. MedComCorePractitioner is broardly defined (just as it is in the original FHIR ressource and DkCorePractitioner), and may be used to define all the professionals involved directly or indirectly in citizen and patient care and well-being. -Please refer to the tab "Snapshot Table(Must support)" below for the definition of the required content of a MedComCorePractitioner. \ No newline at end of file +Please refer to the tab "Snapshot Table" below for the definition of the required content of a MedComCorePractitioner. \ No newline at end of file diff --git a/input/pagecontent/StructureDefinition-medcom-core-practitionerrole-intro.md b/input/pagecontent/StructureDefinition-medcom-core-practitionerrole-intro.md index fc2afca..0b0103a 100644 --- a/input/pagecontent/StructureDefinition-medcom-core-practitionerrole-intro.md +++ b/input/pagecontent/StructureDefinition-medcom-core-practitionerrole-intro.md @@ -3,8 +3,10 @@ This profile describes the MedComCorePractitionerRole which is used to describe a practitioner's role in a MedCom standard. If a practitioner is referenced from MedComCorePractitionerRole it shall be a MedComCorePractitioner. -Just as it is in the original FHIR ressource, the MedComCorePractitionerRole is broadly defined and describes services a practitioner is able to provide for the organization. +Just as it is in the original FHIR ressource, the MedComCorePractitionerRole is broadly defined and describes services a practitioner is able to provide for the organization. The organization **MUST** always be present. It is prefered to use a code from [MedComCorePractitionerRoles](https://medcomfhir.dk/ig/terminology/ValueSet-medcom-core-PractitionerRoles.html). If these does not cover the needs, the roles can be included in a string at PractitionerRole.code.text. -Please refer to the tab "Snapshot Table(Must support)" below for the definition of the required content of a MedComCorePractitionerRole. \ No newline at end of file +If the code element is present, it shall contain either a structured code (at least one coding with both system and code populated) or a textual representation (code.text) + +Please refer to the tab "Snapshot Table" below for the definition of the required content of a MedComCorePractitionerRole. \ No newline at end of file diff --git a/input/pagecontent/index.md b/input/pagecontent/index.md index 7f915aa..cb21873 100644 --- a/input/pagecontent/index.md +++ b/input/pagecontent/index.md @@ -1,36 +1,34 @@ ### Introduction -This Implementation Guide (IG) is provided by MedCom to describe MedCom FHIR ®© Core profiles (Dansk: Kerneprofiler) used across MedComs standards. This IG represents the base expectation when describing a Patient, Encounter, Practitioner or Organization when exchanging information within Danish healthcare. +This Implementation Guide (IG) is provided by MedCom to describe MedCom's FHIR ®© Core profiles (Dansk: Kerneprofiler) used across MedComs standards. This IG represents the base expectation when describing fx a Patient, an Encounter, a Practitioner or an Organization when exchanging information within the Danish healthcare system. As the MedComCore profiles only specify the base expectations, they are in general made open for additional adjustments. This is chosen to allow further profiling for specific purposes defined by the communicating parties. The purpose of this IG is to: -* Define MedComCore profiles that constraints the FHIR resources and datatype for use in MedCom standards: - * [MedComCorePatient](StructureDefinition-medcom-core-patient.html) - * [MedComCoreOrganization](StructureDefinition-medcom-core-organization.html) - * [MedComCoreEncounter](StructureDefinition-medcom-core-encounter.html) - * [MedComCoreCareTeam](StructureDefinition-medcom-core-careteam.html) - * [MedComCorePractitioner](StructureDefinition-medcom-core-practitioner.html) - * [MedComCorePractitionerRole](StructureDefinition-medcom-core-practitionerrole.html) +* Define MedCom Core profiles that constraints the FHIR resources and datatypes for use in MedCom standards. See all MedComCore profiles in the "Profiles" tab in the menu. + * Define extensions necessary for local use covering needed Danish concepts, such as a personal identification number for Danish citizens called Central Person Register (CPR-number). -The MedComCore profiles only constitutes a part of a standard. To exchange a complete MedCom standard, profiles from the MedComMessaging, MedComCareCommunication or MedComHospitalNotification shall be used, depended on the purpose of the standard. +The MedCom Core profiles only constitute a part of a standard. To exchange a complete MedCom standard, profiles from the other Implementation Guides is used. + +**XML and JSON:** Note that the instances of the profiles may be represented in either XML or JSON and interconverted between these or have its character encoding changed, all the while remaining the same instance. #### Terminology On [MedCom Terminology IG](http://medcomfhir.dk/ig/terminology/) all referenced CodeSystem and ValueSets developed by MedCom can be found. #### Dependencies - -This IG has a dependency to [DK-core](https://hl7.dk/fhir/core/) v. 2.0.0, defined by [HL7 Denmark](https://hl7.dk/). This is currently reflected in the MedComCorePatient, MedComCoreOrganization and MedComCorePractitioner which inherit from DkCorePatient, DkCoreOrganization and DkCorePractitioner, respectively. +This IG has a dependency to [DK-core](https://hl7.dk/fhir/core/), defined by [HL7 Denmark](https://hl7.dk/). This is currently reflected in the profiles that inherit from DkCore profiles. ### Documentation +[More information about MedCom Core](https://medcomdk.github.io/dk-medcom-core/) can be found here. As mentioned, MedCom Core does not alone constitute a standard, why the documentation is limited. -[More information about MedCom Core](https://medcomdk.github.io/dk-medcom-core/) can be found here. As mentioned, MedCom Core does not alone constitute a standard, why the extra documentation is limited. +### Governance and guidance +FHIR profiles are managed under MedCom: [Source code](https://github.com/medcomdk/dk-medcom-core). -### Governance +A description of governance and guidance for MedCom's FHIR standards, can be found on the [MedCom Landing Page](https://medcomdk.github.io/MedComLandingPage). -FHIR profiles are managed under MedCom: [Source code](https://github.com/medcomdk/dk-medcom-core). +The MedCom FHIR landing page provides a overview of governance requirements that apply to MedCom’s FHIR standards. This includes fx the mandatory rules for interpreting MustSupport, the formal validation requirements that implementers must follow, the expectations for producing narrative texts and governance for how MedCom Terminology is versioned. -A description of [governance concerning change management and versioning](https://medcomdk.github.io/MedComLandingPage/#4-change-managment-and-versioning) of MedComs FHIR artefacts, can be found on the link. +The landing page also offers help to developers to understand how to work with MedCom’s FHIR standards. This includes a guide of how to read an Implementation Guide. Users will also find instructions on how to use some of the FHIR tools, such as validation setup. #### Quality Assurance Report diff --git a/input/sushi-ignoreErrors.txt b/input/sushi-ignoreErrors.txt new file mode 100644 index 0000000..5764f3d --- /dev/null +++ b/input/sushi-ignoreErrors.txt @@ -0,0 +1,12 @@ +== Suppressed errors == +# Link to sushi desciption: https://fshschool.org/docs/sushi/project/#using-the-hl7-ig-publisher-and-auto-builder +# Suppresses this error as IG Publisher autogenerates narratives after SUSHI has run. +Element Patient.text has minimum cardinality 1 but occurs 0 time(s). +Element CareTeam.text has minimum cardinality 1 but occurs 0 time(s). +Element DiagnosticReport.text has minimum cardinality 1 but occurs 0 time(s). +Element Encounter.text has minimum cardinality 1 but occurs 0 time(s). +Element Media.text has minimum cardinality 1 but occurs 0 time(s). +Element Observation.text has minimum cardinality 1 but occurs 0 time(s). +Element Organization.text has minimum cardinality 1 but occurs 0 time(s). +Element Practitioner.text has minimum cardinality 1 but occurs 0 time(s). +Element PractitionerRole.text has minimum cardinality 1 but occurs 0 time(s). diff --git a/publication-request.json b/publication-request.json index 2373825..e2cd2ef 100644 --- a/publication-request.json +++ b/publication-request.json @@ -1,6 +1,6 @@ { "package-id": "medcom.fhir.dk.core", - "version": "3.0.1", + "version": "3.0.2-dev", "path": "http://medcomfhir.dk/ig/core/3.0.1", "status": "release", "sequence": "Release 3.x.x", diff --git a/release-notes.md b/release-notes.md index 457544e..3f429f5 100644 --- a/release-notes.md +++ b/release-notes.md @@ -1 +1,112 @@ -- Corrected a versioning error in the terminology. Therefore, MedComCore has been re-released to fix the dependency. +## Release Notes + +This release introduces substantial changes across a large number of MedCom Core profiles. The updates include, among others, revised cardinalities, adjusted Must Support (MS) requirements, added and removed narrative obligations, and the removal or restructuring of selected elements. +The changes were mainly made to address that some profiles had become overly restrictive compared to actual implementation needs, and to ensure that the profiles can be used consistently in the context of FHIR Documents. + +The detailed, profile-specific changes are listed in the sections below. In addition, profile descriptions have been updated to reflect the applied changes, and both the index page and selected example instances have been revised accordingly to ensure consistency with the updated profiles. The index page has also been updated with revised links, including links to updated governance documentation. + +--- + +## 1. lpr3-Identifier (used in medcom-core-encounter) +- `system` changed to `1..1 MS` and narrative obligation added. +- `value` changed to `1..1 MS` and narrative obligation added. + +## 2. medcom-core-careteam +- `id` and `text` changed to `1..1 MS`. +- `managingOrganization` changed to `1..1 MS`. + +## 3. medcom-core-contact-extension +- Narrative obligation added to `valueContactPoint.system`. +- Narrative obligation added to `valueContactPoint.value`. +- Narrative obligation added to `valueContactPoint.use`. + +## 4. medcom-core-diagnosticreport +- `identifier` requirements removed. +- `id` changed to `1..1 MS`. +- `text` changed to `1..1 MS`. `text.status` and `text.div` added MS. +- `issued` requirements removed. +- `result` MS removed. +- `performer` MS removed and reference restricted to: + `MedComCorePractitioner`, `MedComCorePractitionerRole`, or `MedComCoreCareTeam`. +- `media` MS removed. +- `media.link` MS removed. +- `conclusion` requirements removed. +- Narrative obligation added to `id`, `status`, `code`, and `subject`. + +## 5. medcom-core-encounter +- `id` changed to `1..1 MS`. +- `text` changed to `1..1 MS`. +- `episodeOfCare.identifier.system` changed to `1..1 MS`. +- `episodeOfCare.identifier.value` changed to `1..1 MS`. +- Narrative obligation added to `episodeOfCare.identifier.system` and `episodeOfCare.identifier.value`. +- Narrative obligation removed from `episodeOfCare.identifier` and `episodeOfCare[lpr3Identifier].identifier`. + +## 6. medcom-core-media +- `id` changed to `1..1 MS`. +- `text` changed to `1..1 MS`. `text.status` and `text.div` added MS. +- Narrative obligation added to `id` and `status`. +- `identifier` requirements removed. +- `operator` MS removed. Reference restricted to: + `MedComCorePractitioner`, `MedComCorePractitionerRole`, `MedComCoreOrganization`, + `MedComCoreCareTeam`, `MedComCorePatient`, `Device`, or `DkCoreRelatedPerson`. +- `content` added MS. Requirements for underlying content elements removed. + +## 7. medcom-core-observation +- `identifier` requirements removed. +- `id` changed to `1..1 MS`. +- `text` changed to `1..1 MS`. `text.status` and `text.div` added MS. +- `effectiveDateTime` requirements removed. +- `effective[x]` short added. +- `code.coding.code` and `code.coding.system` MS removed. +- `note` requirements removed. +- `performer` changed to `1..* MS`. +- `valueAttachment` extension added. +- Narrative obligation added to `id`, `status`, `subject`, and `performer`. + +## 8. medcom-core-organization +- `id` changed to `1..1 MS`. +- `text` changed to `1..1 MS`. +- `identifier` added MS. +- `identifier[SOR-ID].system` and `identifier[SOR-ID].value` added MS. +- Narrative obligation removed from `identifier[SOR-ID]`. +- Narrative obligation added to `identifier[SOR-ID].system`, `identifier[SOR-ID].value`, and `id`. + +## 9. medcom-core-patient +- `id` changed to `1..1 MS`. +- `text` changed to `1..1 MS`. +- `identifier[cpr].system`, `identifier[cpr].value`, + `identifier[x-ecpr].system`, `identifier[x-ecpr].value`, + `identifier[d-ecpr].system`, and `identifier[d-ecpr].value` added MS. +- `name` added MS. +- `name[official].use` added MS. +- `telecom`, `address.line`, `address.city`, and `address.postalCode` requirements removed. +- Narrative obligation added to: + `id`, `identifier[cpr].system`, `identifier[cpr].value`, + `identifier[x-ecpr].system`, `identifier[x-ecpr].value`, + `identifier[d-ecpr].system`, `identifier[d-ecpr]`, + `name[official].given`, `name[official].family`, and `name[official].use`. +- Narrative obligation removed from `identifier[cpr]`, `identifier[x-ecpr]`, and `identifier[d-ecpr]`. + +## 10. medcom-core-practitioner +- `id` changed to `1..1 MS`. +- `text` changed to `1..1 MS`. +- `name.given` and `name.family` added MS. +- Narrative obligation added to `id`. +- Narrative obligation removed from `name`. +- Narrative obligation added to `name.given` and `name.family`. + +## 11. medcom-core-practitionerrole +- Parent changed to `DkCorePractitionerRole`. +- `id` changed to `1..1 MS`. +- `text` changed to `1..1 MS`. +- `code.coding.system` and `code.coding.code` changed to `1..1 MS`. +- `organization` changed to `1..1 MS`. +- Narrative obligation added to `id`, `practitioner`, `organization`, + `code.coding.system`, `code.coding.code`, and `code.text`. +- Invariant `medcom-core-practitionerrole-code-xor-text` added. + +## 12. medcom-messaging-contactpoint +- Profile removed. + +## 13. medcom-observation-value-attachment-extension +- Extension added to represent attachments in observations. diff --git a/sushi-config.yaml b/sushi-config.yaml index 548eaee..745baf5 100644 --- a/sushi-config.yaml +++ b/sushi-config.yaml @@ -4,7 +4,7 @@ name: MedComCore title: "DK MedCom Core" description: This IG includes core profiles defined by MedCom. These profiles are used in MedCom's FHIR standards status: active -version: 3.0.1 +version: 4.0.0 fhirVersion: 4.0.1 copyrightYear: 2021+ releaseLabel: release @@ -14,8 +14,8 @@ publisher: jurisdiction: urn:iso:std:iso:3166#DK "Denmark" dependencies: - hl7.fhir.dk.core: 3.4.0 - medcom.fhir.dk.terminology: 2.0.1 + hl7.fhir.dk.core: 3.5.0 + medcom.fhir.dk.terminology: 2.0.2 menu: Home: index.html