Changelog¶
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased¶
Added¶
- External API / library usage documentation (
docs/API.md), plus a versioned MkDocs Material documentation site published to GitLab Pages (mkdocs.ymland thedocs-validate/docs-build/pagesCI jobs). The site carries the API guide and a Changelog page that embeds this file (#71) - Support for
checkclause in FHIR StructureMap/FML: runtime validation of source data that aborts the transformation, if the FHIRPath expression fails, raisingCheckFailedError(#139) - Warning collection
malac.hd.warnings(baseMalacHDWarning) for the compiler's soft errors (UnknownTypeWarning,UnknownCastWarning,UnknownParameterTypeWarning,ListCoercionWarning). The known StructureMap fallbacks now report a warning naming the map and element they came from, and the CLI prints a summary of them, grouped and counted, after the conversion — on stderr, so that the generated mapping on stdout stays usable, and also when the conversion fails (!115)
Changed¶
- The FHIR module a conversion generates against is now chosen in one place,
malac.hd.core.fhir.base.generator.model.select_fhir_module, instead of being decided ad hoc at every call site: the output model wins, then the input model, and a mapping between two non-FHIR models falls back to the FHIR version its converter is based on. The generator exposes it asfhir_module, alongsidei_is_fhir/o_is_fhirfor the separate question of whether a given side of the mapping is FHIR at all (#36)
Fixed¶
- A mapping between two different FHIR versions no longer mixes them in one
generated script. The conceptMap code preferred the input model while the
header imports,
fhirpath_utilsand the FHIRPath context preferred the output model, so an R4-to-R5 map emitted atranslate()that parsed against R4 inside an otherwise-R5 script and raisedTypeErrorfor every R5CodeableConceptorCodingpassed to it (#36) - A mapping between two non-FHIR models no longer generates a script that references a FHIR module it never imports (#36)
1.8.0 - 2026-08-17¶
Added¶
- Generated StructureMap transform scripts can now read from stdin and write
to stdout: pass
-as--source/--targetand give the stream format with the new-st/--source-type/-tt/--target-typeflags (xml/json). File paths still auto-detect the format from the extension. Progress messages moved to stderr so stdout carries only the payload, enabling transforms to be chained in a shell pipeline - Model package plugin mechanism: register additional model packages (e.g.
logical models) via
-mod/--modelswith module names or Python file paths, via theMALAC_HD_MODELSenvironment variable, or viamalac.hd.load_model_packages - Supporting resources:
-sr/--supporting-resource(with theMALAC_HD_SUPPORTING_RESOURCESenvironment variable as fallback) loads external FHIR resources from a directory, a single JSON/XML file or an npm package.tgz, indexed byresourceType+ canonicalurl, so a mapping'stranslate()calls resolve ConceptMaps that are not inlined in the map source. Only ConceptMaps are consumed for now; other resource types are indexed for later use - Exception hierarchy
malac.hd.exceptions(baseMalacHDError) with meaningful types (MappingClassificationError,ModuleResolutionError,MappingImportError,GroupResolutionError,UnsupportedMappingError,FHIRPathError,ConceptMapError) (!111) - pytest-cov coverage tooling and CI coverage reporting (!105)
Changed¶
- MaLaC-HD's own conversion code no longer raises or catches bare
BaseException: compile-time errors now raise a meaningfulMalacHDErrorsubclass, and broadexcept:clauses were narrowed to the specific exceptions they handle. The CLI reports these as a clean error message and non-zero exit instead of a traceback (!111) - Generated transformer and translate scripts now raise standard built-in
exceptions (
ValueError/TypeError/LookupError) instead of bareBaseException - The
translatemachinery is no longer emitted into generated transformer scripts that cannot use it.translate()and itsconceptMap_as_7dimension_dictare only written out when the mapping (or one of its imports) has a conceptMap or compiles atranslatetarget, andtranslate_unmapped/translate_single/translate_multiare each emitted only when actually called. A mapping without conceptMaps sheds 165 lines of dead code, one that only translates to a single concept sheds the unusedtranslate_multi
Fixed¶
- Test suite is now compatible with pytest 9: the pytest collection hooks in
tests/conftest.pywere migrated off the removedpy.path-basedpath/fspathAPI tofile_path/path/self.path. pytest 9 is now the supported test version (pytest>=9,<10,minversion = 9.0), replacing the pinned8.*(!110)
1.7.0 - 2026-07-13¶
Added¶
- Model package plugin mechanism: register additional model packages (e.g.
logical models) via
-mod/--modelswith module names or Python file paths, via theMALAC_HD_MODELSenvironment variable, or viamalac.hd.load_model_packages(!101) - Support for
source.cardinalitychecking on StructureMap rules (#137, !103)
Changed¶
- Add fallback to the default model when the jurisdiction is unknown (#136, !100)
- Bump version and update dependencies
Fixed¶
- Error during JSON import for extensions on empty instant elements (#11, !102)
--modelspreviously imported the wrong module for single-segment package names and ran once per candidate generator with errors swallowed by the version-detection loop; loading now happens once, up front, and fails loudly (!101)
1.6.0 - 2026-03-16¶
Added¶
- Version-detection logic for generic file endings (
.xml,.json,.map,.fml) (#134, !96)
Changed¶
- Update
malac-transformer-fhirandmalac-utilsdependencies
Fixed¶
- Structure maps generated by the IG publisher with a contact-point
usecode set (#134, !96)
1.5.0 - 2026-03-09¶
Added¶
- Support for versionless FHIR StructureDefinition URLs in StructureMap
processing, e.g.
http://hl7.org/fhir/StructureDefinition/Patientinstead of version-specific URLs. Compatible with the IG Publisher and standard FHIR IG conventions, while keeping full backward compatibility with versioned URLs (#129, !93) - Unit tests
tests/structuremap/test_versionless_fhir_urls.pycovering R4 override isolation, global-dict immutability, and fallback behaviour (!93)
Changed¶
- The R5
PythonGeneratorresolves the model-lookup table via a new_get_list_i_o_modules()method that honours an instance-level override before falling back to the global table, avoiding global-state mutation (thread-safe) (!93)
1.4.2 - 2026-03-05¶
Added¶
- Add a timezone when
now()is assigned (#130, !92)
Changed¶
- Update FHIR models
Fixed¶
- Remove newlines and spaces from base64 data type (#123, !85)
$this = trueand similar conditions (#126, !89)- FHIRPath Lab integration (#93, !91)
1.4.1 - 2026-02-23¶
Fixed¶
- Import of FML files fails (#124, !86)
1.4.0 - 2026-02-20¶
Added¶
- Fallback for type/alias lookup in group parameters (#119, !81)
- Missing primitive-type transformations (#115, !79)
- Missing FHIR data-type transformations, replacing existing helpers with the official ones (#115, !79)
Changed¶
- Avoid dynamic lookups for the default mapping group where possible (#115, !79)
- Update
malac-utils
Fixed¶
- FML translation for concept maps with multiple source/target code systems (#118, !82)
- Cast from boolean
Falseto string (#113, !76)
1.3.0 - 2026-01-26¶
Added¶
- Support for target rules without context/element (#103, !68)
- Support for
replace,replaceMatchesandsplitFHIRPath operations (#107, !72; #108, !73) - Support for shorthand
evaluatewithout assignment (#108, !73) - Support for rules on variable types without type specifiers (#107, !72)
Changed¶
- Format JSON outputs (#102, !66)
- Avoid unnecessary type checks (#107, !72)
- Improve variable escaping (#107, !72)
Fixed¶
- Imports in JSON structure maps (#105, !70)
- Translate operation for codeable concepts (#106, !71)
- Non-shorthand
evaluate(#108, !73) - Cached list-variable infos (#109, !74)
- Missing type info after cast (#112, !75)
- Boolean mappings (#113, !76)
1.2.1 - 2025-10-28¶
Added¶
- Improved support for constant handling (#101, !64)
Changed¶
- Switch to
type()-based checks instead ofisinstance()for more accurate type validation (#95, !60) - Improve variable escaping for safer, more predictable transformations
1.2.0 - 2025-10-09¶
Changed¶
- Split repositories and pip packages (#58, !49)
- Switch to
malac-utilsfor more reliable date parsing - Ensure FML files are consistently parsed using UTF-8 encoding
- Improve concept-map conversion
Fixed¶
- Incorrect date formatting and handling of partial/truncated dates (#45, !62; #100, !59)
- Issues with unmapped codes in concept-map conversion
1.1.1 - 2025-05-12¶
Fixed¶
- Path resolution for files in the working directory and corrected module file extensions (#87, !48)
- File extensions for FHIR R5
1.1.0 - 2025-03-21¶
Changed¶
- Shorten common FHIRPath expressions (#69, !45)
Fixed¶
- Multiple FHIRPath-related bugs, including datetime handling and external constant parsing
1.0.1 - 2025-02-19¶
Changed¶
- Improve variable type support (#80, !44)
Fixed¶
- Several bugs (#80, !44)
- Regex compatibility with Python 3.12
1.0.0 - 2025-01-31¶
Added¶
- CDA models and extended FHIRPath support (#29, !34; #54, !25)
- Handling of namespace-prefixed elements (#41, !38)
- Support for xml-choice-groups (#43, !32)
- FML compiler (#49, !8)
- FHIR R5 support (#61, !27)
Changed¶
- Improve JSON export (#56, !26; #77)
Removed¶
- Export of empty data elements (#44, !35)
Fixed¶
- Relationship-equivalence incompatibility across FHIR versions (#65, !37)
0.1.2a1 - 2024-08-04¶
Added¶
- Support for
xmlText - Missing import in generated code
Fixed¶
- JSON export (#74)
0.1.1a1 - 2024-08-01¶
Changed¶
- Update readme and args
- Quickfix dateString handling with workaround, will be solved properly with malac-hd#40
0.1.0+20240502-alpha - 2024-05-02¶
Added¶
- Create first feature set of alpha release
Changed¶
- Changed some external mappings here for full compatibility
Fixed¶
- Fixed some bugs in output of generateDS (generateDS fixes will come)
Security¶
- Added the default gitlab SAST pipeline
Note: Git tags and GitLab releases for versions
1.4.0–1.7.0were created retrospectively to align the GitLab release history with the already published PyPI packages. The changelog entries above were reconstructed from the release merge requests and, for1.7.0, from the merged changes. The comparison links below now point at the restored tags. PyPI publication dates: 1.4.0 (2026-02-20), 1.4.1 (2026-02-23), 1.4.2 (2026-03-05), 1.5.0 (2026-03-09), 1.6.0 (2026-03-16), 1.7.0 (2026-07-13).
Releases and tags are on GitLab; published packages are on PyPI.