From ed00a4647d5d1daee04f4a8d0d801c38394d53c7 Mon Sep 17 00:00:00 2001 From: "Dr. B. M. Riazul Islam" Date: Sun, 28 Sep 2025 04:13:04 +0000 Subject: [PATCH] Branded UI --- _build.bat | 386 ++++++++++++++++++ _build.sh | 176 ++++++++ _gencontinuous.sh | 0 bd-national-template | 1 + ig.ini | 3 +- input/fsh/patient-profile.fsh | 4 +- input/fsh/profile/bdAddress.fsh | 8 +- input/{fsh => history}/bdpatient.fsh | 6 +- .../StructureDefinition-bd-patient.xml | 20 + input/includes/menu.xml | 4 +- input/myig.xml | 50 +-- .../{MyLogical.xml => bd-logical.xml} | 22 +- input/resources/library-example-image.xml | 2 +- input/resources/library-example-sql.xml | 2 +- sushi-config.yaml | 19 + 15 files changed, 653 insertions(+), 50 deletions(-) create mode 100644 _build.bat create mode 100755 _build.sh mode change 100644 => 100755 _gencontinuous.sh create mode 160000 bd-national-template rename input/{fsh => history}/bdpatient.fsh (97%) create mode 100644 input/includes/StructureDefinition-bd-patient.xml rename input/resources/{MyLogical.xml => bd-logical.xml} (64%) create mode 100644 sushi-config.yaml diff --git a/_build.bat b/_build.bat new file mode 100644 index 0000000..99d0e1f --- /dev/null +++ b/_build.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/_build.sh b/_build.sh new file mode 100755 index 0000000..f11edff --- /dev/null +++ b/_build.sh @@ -0,0 +1,176 @@ +#!/bin/bash + +set -e + +# Variables +dlurl="https://github.com/HL7/fhir-ig-publisher/releases/latest/download/publisher.jar" +publisher_jar="publisher.jar" +input_cache_path="$(pwd)/input-cache/" +skipPrompts=false +upper_path="../" +scriptdlroot="https://raw.githubusercontent.com/HL7/ig-publisher-scripts/main" +build_bat_url="${scriptdlroot}/_build.bat" +build_sh_url="${scriptdlroot}/_build.sh" + +function check_jar_location() { + if [ -f "${input_cache_path}${publisher_jar}" ]; then + jar_location="${input_cache_path}${publisher_jar}" + echo "Found publisher.jar in input-cache" + elif [ -f "${upper_path}${publisher_jar}" ]; then + jar_location="${upper_path}${publisher_jar}" + echo "Found publisher.jar in parent folder" + else + jar_location="not_found" + echo "publisher.jar not found in input-cache or parent folder" + fi +} + +function check_internet_connection() { + if ping -c 1 tx.fhir.org &>/dev/null; then + online=true + echo "We're online and tx.fhir.org is available." + latest_version=$(curl -s https://api.github.com/repos/HL7/fhir-ig-publisher/releases/latest | grep tag_name | cut -d'"' -f4) + else + online=false + echo "We're offline or tx.fhir.org is unavailable." + fi +} + + +function update_publisher() { + echo "Publisher jar location: ${input_cache_path}${publisher_jar}" + read -p "Download or update publisher.jar? (Y/N): " confirm + if [[ "$confirm" =~ ^[Yy]$ ]]; then + echo "Downloading latest publisher.jar (~200 MB)..." + mkdir -p "$input_cache_path" + curl -L "$dlurl" -o "${input_cache_path}${publisher_jar}" + else + echo "Skipped downloading publisher.jar" + fi + + update_scripts_prompt +} + + +function update_scripts_prompt() { + read -p "Update scripts (_build.bat and _build.sh)? (Y/N): " update_confirm + if [[ "$update_confirm" =~ ^[Yy]$ ]]; then + echo "Updating scripts..." + curl -L "$build_bat_url" -o "_build.new.bat" && mv "_build.new.bat" "_build.bat" + curl -L "$build_sh_url" -o "_build.new.sh" && mv "_build.new.sh" "_build.sh" + chmod +x _build.sh + echo "Scripts updated." + else + echo "Skipped updating scripts." + fi +} + + +function build_ig() { + if [ "$jar_location" != "not_found" ]; then + args=() + if [ "$online" = "false" ]; then + args+=("-tx" "n/a") + fi + java -Dfile.encoding=UTF-8 -jar "$jar_location" -ig . "${args[@]}" "$@" + else + echo "publisher.jar not found. Please run update." + fi +} + + +function build_nosushi() { + if [ "$jar_location" != "not_found" ]; then + java -Dfile.encoding=UTF-8 -jar "$jar_location" -ig . -no-sushi "$@" + else + echo "publisher.jar not found. Please run update." + fi +} + +function build_notx() { + if [ "$jar_location" != "not_found" ]; then + java -Dfile.encoding=UTF-8 -jar "$jar_location" -ig . -tx n/a "$@" + else + echo "publisher.jar not found. Please run update." + fi +} + +function jekyll_build() { + echo "Running Jekyll build..." + jekyll build -s temp/pages -d output +} + +function cleanup() { + echo "Cleaning up temp directories..." + if [ -f "${input_cache_path}${publisher_jar}" ]; then + mv "${input_cache_path}${publisher_jar}" ./ + rm -rf "${input_cache_path}"* + mkdir -p "$input_cache_path" + mv "$publisher_jar" "$input_cache_path" + fi + rm -rf ./output ./template ./temp + echo "Cleanup complete." +} + +check_jar_location +check_internet_connection + +# Handle command-line argument or menu +case "$1" in + update) update_publisher ;; + build) build_ig ;; + nosushi) build_nosushi ;; + notx) build_notx ;; + jekyll) jekyll_build ;; + clean) cleanup ;; + exit) exit 0 ;; + *) + # Compute default choice + default_choice=2 # Build by default + + if [ "$jar_location" = "not_found" ]; then + default_choice=1 # Download if jar is missing + elif [ "$online" = "false" ]; then + default_choice=4 # Offline build + elif [ -n "$latest_version" ]; then + current_version=$(java -jar "$jar_location" -v 2>/dev/null | tr -d '\r') + if [ "$current_version" != "$latest_version" ]; then + default_choice=1 # Offer update if newer version exists + fi + fi + + echo "---------------------------------------------" + echo "Publisher: ${current_version:-unknown}; Latest: ${latest_version:-unknown}" + echo "Publisher location: $jar_location" + echo "Online: $online" + echo "---------------------------------------------" + echo + echo "Please select an option:" + echo "1) Download or update publisher" + echo "2) Build IG" + echo "3) Build IG without Sushi" + echo "4) Build IG without TX server" + echo "5) Jekyll build" + echo "6) Cleanup temp directories" + echo "0) Exit" + echo + + # Read with timeout, but default if nothing entered + echo -n "Choose an option [default: $default_choice]: " + read -t 5 choice || choice="$default_choice" + choice="${choice:-$default_choice}" + echo "You selected: $choice" + + case "$choice" in + 1) update_publisher ;; + 2) build_ig ;; + 3) build_nosushi ;; + 4) build_notx ;; + 5) jekyll_build ;; + 6) cleanup ;; + 0) exit 0 ;; + *) echo "Invalid option." ;; + esac + ;; + +esac diff --git a/_gencontinuous.sh b/_gencontinuous.sh old mode 100644 new mode 100755 diff --git a/bd-national-template b/bd-national-template new file mode 160000 index 0000000..08520a5 --- /dev/null +++ b/bd-national-template @@ -0,0 +1 @@ +Subproject commit 08520a5d2fe5ded951fd5399fa58671aa20f7deb diff --git a/ig.ini b/ig.ini index f900d07..27e2f7c 100644 --- a/ig.ini +++ b/ig.ini @@ -4,8 +4,9 @@ ig = input/myig.xml #template = fhir.base.template#current +template = #bd-national-template #template = D:\Git\templates\ig-template-base -template = #local-template +#template = #local-template diff --git a/input/fsh/patient-profile.fsh b/input/fsh/patient-profile.fsh index 1385dc5..ab7bc09 100644 --- a/input/fsh/patient-profile.fsh +++ b/input/fsh/patient-profile.fsh @@ -1,8 +1,8 @@ // @Name: Profile // @Description: Example of a profile of the Patient resource. This example includes a few of the most commonly used constraints and documentation features of FHIR profiles. -Profile: PatientProfile -Id: patient-profile +Profile: BDPatientProfile +Id: bd-patient Parent: Patient Title: "Patient Profile for Bangladesh" Description: "Profile of Patient Bangladesh Standard" diff --git a/input/fsh/profile/bdAddress.fsh b/input/fsh/profile/bdAddress.fsh index 4c319a1..325f051 100644 --- a/input/fsh/profile/bdAddress.fsh +++ b/input/fsh/profile/bdAddress.fsh @@ -1,10 +1,10 @@ // @Name: Profile // @Description: Example of a profile of the Address resource for Bangladesh. -Profile: BDAddress -Id: bd-address -Parent: Address -Title: "Address for Bangladesh" +Profile: BDAddress +Id: bd-address +Parent: Address +Title: "Address for Bangladesh" Description: "Address for Bangladesh Standard" diff --git a/input/fsh/bdpatient.fsh b/input/history/bdpatient.fsh similarity index 97% rename from input/fsh/bdpatient.fsh rename to input/history/bdpatient.fsh index 25eebbf..822864f 100644 --- a/input/fsh/bdpatient.fsh +++ b/input/history/bdpatient.fsh @@ -1,7 +1,7 @@ Profile: BDPatientProfile -Id: BDPatientProfile-01 +Id: bd-patient Parent: Patient Title: "Bangladesh Patient Profile" Description: "All patient information of BD" @@ -104,7 +104,7 @@ Parent: RelatedPerson Title: "RelatedPerson Father Profile" Description: "Profile for RelatedPerson representing the father" * relationship.coding.code = #FTH -* identifier 1..1 +* identifier 1..1 // TODO // * includes codes from system BdIdentifierTypeVs# (required) @@ -112,4 +112,4 @@ Description: "Profile for RelatedPerson representing the father" //Address * address 1..* MS -* address only BDAddress \ No newline at end of file +* address only BDAddress \ No newline at end of file diff --git a/input/includes/StructureDefinition-bd-patient.xml b/input/includes/StructureDefinition-bd-patient.xml new file mode 100644 index 0000000..beded4a --- /dev/null +++ b/input/includes/StructureDefinition-bd-patient.xml @@ -0,0 +1,20 @@ + + + + + + <status value="draft"/> + <fhirVersion value="4.0.1"/> + <kind value="resource"/> + <abstract value="false"/> + <type value="Patient"/> + <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Patient"/> + <derivation value="constraint"/> + <differential> + <!-- Example: constrain identifier system --> + <element id="Patient.identifier.system"> + <path value="Patient.identifier.system"/> + <fixedUri value="https://fhir.dghs.gov.bd/core/identifier"/> + </element> + </differential> +</StructureDefinition> diff --git a/input/includes/menu.xml b/input/includes/menu.xml index 1de271a..ab3cec2 100644 --- a/input/includes/menu.xml +++ b/input/includes/menu.xml @@ -1,8 +1,8 @@ <ul xmlns="http://www.w3.org/1999/xhtml" class="nav navbar-nav"> - <li><a href="index.html">IG Home</a></li> + <li><a href="index.html">Home</a></li> <li><a href="toc.html">Table of Contents</a></li> <li class="dropdown"> - <a data-toggle="dropdown" href="#" class="dropdown-toggle">MyIg Background<b class="caret"> + <a data-toggle="dropdown" href="#" class="dropdown-toggle">Background<b class="caret"> </b> </a> <ul class="dropdown-menu"> diff --git a/input/myig.xml b/input/myig.xml index b88b16b..22dcb30 100644 --- a/input/myig.xml +++ b/input/myig.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- Start by finding all references to "myig" and updating to appropriate text for your IG, including changing realm --> <ImplementationGuide xmlns="http://hl7.org/fhir" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://hl7.org/fhir ../input-cache/schemas/R4/fhir-single.xsd"> - <id value="example.fhir.uv.myig"/> + <id value="bd.fhir.core"/> <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> <valueCode value="informative"/> </extension> @@ -11,31 +11,31 @@ <!-- <extension url="http://hl7.org/fhir/tools/StructureDefinition/igpublisher-spreadsheet"> <valueString value="resources-spreadsheet.xml"/> </extension>--> - <url value="http://somewhere.org/fhir/uv/myig/ImplementationGuide/example.fhir.uv.myig"/> + <url value="https://fhir.dghs.gov.bd/core/ImplementationGuide/bd.fhir.core"/> <!-- This version will propagate to all artifacts unless the "propagate-version" extension is overridden --> <version value="0.2.0"/> - <name value="YourComputableMyIGNameHere"/> - <title value="Your User Friendly Name for MyIG Here"/> - <status value="draft"/> + <name value="BangladeshCoreFHIRIG"/> + <title value="Bangladesh Core FHIR Implementation Guide"/> + <status value="active"/> <experimental value="false"/> - <publisher value="HL7 International - [Some] Work Group"/> + <publisher value="Directorate General of Health Services (DGHS), Bangladesh"/> <contact> <telecom> <!-- Or whatever URL and/or email address(es) are appropriate --> <system value="url"/> - <value value="http://hl7.org/Special/committees/[something]"/> + <value value="http://dghs.gov.bd"/> </telecom> </contact> - <description value="A brief description of what MyIG is about (probably the same text as in your readme)"/> + <description value="This Implementation Guide defines the Bangladesh Core FHIR profiles, value sets, code systems, and implementation rules for national digital health systems."/> <jurisdiction> - <!-- This first repetition will drive SNOMED release used --> <coding> - <system value="http://unstats.un.org/unsd/methods/m49/m49.htm"/> - <!-- This is the code for universal --> - <code value="001"/> + <system value="urn:iso:std:iso:3166"/> + <!-- This is the code for Bangladesh --> + <code value="050"/> </coding> + <!-- This first repetition will drive SNOMED release used --> </jurisdiction> - <packageId value="example.fhir.uv.myig"/> + <packageId value="bd.fhir.core"/> <!-- This should be changed to 'not-open-source' or another license if appropriate for non-HL7-published content --> <license value="CC0-1.0"/> <!-- This is whatever FHIR version(s) the IG artifacts are targeting (not the version of this file, which should always be 'current release') --> @@ -55,13 +55,13 @@ inappropriate to use the defaults. Feel free to provide feedback about the defaults... --> <resource> <reference> - <reference value="StructureDefinition/mypatient"/> + <reference value="StructureDefinition/bd-patient"/> </reference> <description value="Overriding description because we can"/> </resource> <resource> <reference> - <reference value="StructureDefinition/MyLogical"/> + <reference value="StructureDefinition/bd-logical"/> </reference> <description value="Logical Model"/> </resource> @@ -79,19 +79,19 @@ </resource> <!--<resource> <reference> -<reference value="MyLogicalModel/AS"/> +<reference value="bd-logicalModel/AS"/> </reference> </resource> --> <resource> <extension url="http://hl7.org/fhir/tools/StructureDefinition/ig-example-actor"> - <valueCanonical value="http://somewhere.org/fhir/uv/myig/ActorDefinition/example"/> + <valueCanonical value="https://fhir.dghs.gov.bd/core/ActorDefinition/example"/> </extension> <reference> <reference value="Patient/example"/> </reference> <name value="Simple patient example"/> <description value="A simple example showing how examples are defined and referenced"/> - <exampleCanonical value="http://somewhere.org/fhir/uv/myig/StructureDefinition/mypatient"/> + <exampleCanonical value="https://fhir.dghs.gov.bd/core/StructureDefinition/bd-patient"/> </resource> <resource> <reference> @@ -99,7 +99,7 @@ </reference> <name value="Observation patient example"/> <description value="Example showing slicing"/> - <exampleCanonical value="http://somewhere.org/fhir/uv/myig/StructureDefinition/myObservation"/> + <exampleCanonical value="https://fhir.dghs.gov.bd/core/StructureDefinition/bd-observation"/> </resource> <resource> <reference> @@ -117,7 +117,7 @@ </reference> <name value="Example of Logical Model"/> <description value="Example showing example content for a logical model"/> - <exampleCanonical value="http://somewhere.org/fhir/uv/myig/StructureDefinition/MyLogical"/> + <exampleCanonical value="https://fhir.dghs.gov.bd/core/StructureDefinition/bd-logical"/> </resource> <resource> <extension url="http://hl7.org/fhir/StructureDefinition/implementationguide-resource-format"> @@ -149,12 +149,12 @@ <generation value="html"/> <page> <nameUrl value="index.html"/> - <title value="MyIG Home Page"/> + <title value="BD-Core-FHIR-IG Home Page"/> <generation value="html"/> </page> <page> <nameUrl value="background.html"/> - <title value="Background"/> + <title value="Background and Context"/> <generation value="html"/> </page> <page> @@ -165,7 +165,7 @@ <valueInteger value="3"/> </extension> <nameUrl value="spec.html"/> - <title value="Detailed Specification"/> + <title value="Detailed BD-Core-FHIR Specification"/> <generation value="markdown"/> <page> <nameUrl value="fragments.html"/> @@ -192,12 +192,12 @@ <!-- copyright year is a mandatory parameter --> <parameter> <code value="copyrightyear"/> - <value value="2019+"/> + <value value="2025+"/> </parameter> <!-- releaselabel should be the ballot status for HL7-published IGs. --> <parameter> <code value="releaselabel"/> - <value value="CI Build"/> + <value value="Published by MoHFW"/> </parameter> <parameter> <code value="find-other-resources"/> diff --git a/input/resources/MyLogical.xml b/input/resources/bd-logical.xml similarity index 64% rename from input/resources/MyLogical.xml rename to input/resources/bd-logical.xml index de54930..83def19 100644 --- a/input/resources/MyLogical.xml +++ b/input/resources/bd-logical.xml @@ -1,34 +1,34 @@ <?xml version="1.0" encoding="UTF-8"?> <StructureDefinition xmlns="http://hl7.org/fhir"> - <id value="MyLogical"/> + <id value="bd-logical"/> <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-namespace"> <valueUri value="http://example.org/logical"/> </extension> - <url value="http://somewhere.org/fhir/uv/myig/StructureDefinition/MyLogical"/> - <name value="MyLogical"/> - <title value="My Logical Model"/> + <url value="https://fhir.dghs.gov.bd/core/StructureDefinition/bd-logical"/> + <name value="BDLogical"/> + <title value="Bangladesh Logical Model"/> <status value="draft"/> <description value="A profile showing the use of Logical Models to author profiles"/> <fhirVersion value="4.0.0"/> <kind value="logical"/> <abstract value="false"/> - <type value="http://somewhere.org/fhir/uv/myig/StructureDefinition/MyLogical"/> + <type value="bd-logical"/> <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Element"/> <derivation value="specialization"/> <differential> - <element id="MyLogical"> - <path value="MyLogical"/> + <element id="bd-logical"> + <path value="bd-logical"/> </element> - <element id="MyLogical.element1"> - <path value="MyLogical.element1"/> + <element id="bd-logical.element1"> + <path value="bd-logical.element1"/> <min value="0"/> <max value="1"/> <type> <code value="integer"/> </type> </element> - <element id="MyLogical.element2"> - <path value="MyLogical.element2"/> + <element id="bd-logical.element2"> + <path value="bd-logical.element2"/> <min value="0"/> <max value="1"/> <type> diff --git a/input/resources/library-example-image.xml b/input/resources/library-example-image.xml index d134bf3..e1ca08c 100644 --- a/input/resources/library-example-image.xml +++ b/input/resources/library-example-image.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <Library xmlns="http://hl7.org/fhir" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://hl7.org/fhir ../../input-cache/schemas/R4/fhir-single.xsd"> - <url value="http://somewhere.org/fhir/uv/myig/Library/example-image"/> + <url value="https://fhir.dghs.gov.bd/core/Library/example-image"/> <version value="1.0.0"/> <name value="ExampleLibraryImage"/> <title value="Example Library Image"/> diff --git a/input/resources/library-example-sql.xml b/input/resources/library-example-sql.xml index 67384a9..5a1ad87 100644 --- a/input/resources/library-example-sql.xml +++ b/input/resources/library-example-sql.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <Library xmlns="http://hl7.org/fhir" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://hl7.org/fhir ../../input-cache/schemas/R4/fhir-single.xsd"> - <url value="http://somewhere.org/fhir/uv/myig/Library/example-sql"/> + <url value="https://fhir.dghs.gov.bd/core/Library/example-sql"/> <version value="1.0.0"/> <name value="ExampleLibrary"/> <title value="Example Library"/> diff --git a/sushi-config.yaml b/sushi-config.yaml new file mode 100644 index 0000000..6df7cf0 --- /dev/null +++ b/sushi-config.yaml @@ -0,0 +1,19 @@ +id: bd.fhir.core +canonical: https://fhir.dghs.gov.bd/core +name: BangladeshCoreFHIRIG +title: Bangladesh Core FHIR Implementation Guide +description: > + This Implementation Guide defines the Bangladesh Core FHIR profiles, + value sets, code systems, and implementation rules for national digital health systems. +status: draft +version: 0.2.0 +fhirVersion: 4.0.1 +copyrightYear: 2025+ +releaseLabel: CI Build +FSHOnly: true +publisher: + name: Directorate General of Health Services (DGHS), Bangladesh + url: https://dghs.gov.bd +parameters: + logo: assets/images/001.svg + show-in-header: true \ No newline at end of file