Skip to content

Commit

Permalink
0.3.0 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
chaseastewart committed Aug 16, 2024
1 parent d76816d commit 0a4984f
Show file tree
Hide file tree
Showing 25 changed files with 6,009 additions and 379 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Python FHIR Converter Change Log

## Version 0.3.0
- Render narrative text from the CDA to xhtml to include in the Composition resource. See [#11](https://github.com/chaseastewart/fhir-converter/issues/11)
- Fix bug in CDA to R4 Immunization template to correctly map lotNumberText to lotNumber.

## Version 0.2.0
- Map C-CDA Allergy to FHIR Allergy Intolerance Category. See [#6](https://github.com/chaseastewart/fhir-converter/issues/6)
- Renamed `render_to_fhir_internal` to `render` to simplify `BaseFhirRenderer` API.
Expand Down
35 changes: 35 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
.PHONY : env update-lock install test cov type-check linting-check docs publish init update build publish
.DEFAULT_GOAL := init

PY_VERSION = 3.12

env :
poetry env use $(PY_VERSION)
poetry run python --version

update-lock :
poetry lock --no-update

install :
poetry install --no-interaction

test :
poetry run pytest

cov :
poetry run pytest --cov=fhir_converter --cov-report=html

type-check :
poetry run mypy fhir_converter

linting-check :
poetry run flake8 fhir_converter --count --select=E9,F63,F7,F82 --show-source --statistics
poetry run flake8 fhir_converter --count --ignore=E203,E721 --exit-zero --max-complexity=10 --max-line-length=120 --statistics

docs :
poetry run lazydocs --output-path="./docs/docstrings" --overview-file="README.md" --src-base-url="https://github.com/chaseastewart/fhir-converter/blob/master/" fhir_converter
poetry run mkdocs build --site-dir ./site

init: env install
update : update-lock install
build : init linting-check type-check cov
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ Final Memory: 32M

## Templates

Templates can be loaded from any python-liquid supported mechanism. To make packaging easier a [ResourceLoader](https://chaseastewart.github.io/fhir-converter/docstrings/loaders/#class-resourceloader) is provided. When a rendering environment is not provided, templates will be loaded from the module [resources](https://github.com/chaseastewart/fhir-converter/tree/main/fhir_converter/templates/). To ease the creation / reuse of templates a [TemplateSystemLoader](https://chaseastewart.github.io/fhir-converter/docstrings/loaders/#class-templatesystemloader) is provided that handles the template name conventions establised by [FHIR-Converter](https://github.com/microsoft/FHIR-Converter). This allows user defined templates to reference existing templates without change. The example user defined [templates](https://github.com/chaseastewart/fhir-converter/tree/main/data/templates/ccda) reuse the default section / header templates.
Templates can be loaded from any python-liquid supported mechanism. When a rendering environment is not provided, templates will be loaded from the module [templates](https://github.com/chaseastewart/fhir-converter/tree/main/fhir_converter/templates/). To ease the creation / reuse of templates a [TemplateSystemLoader](https://chaseastewart.github.io/fhir-converter/docstrings/loaders/#class-templatesystemloader) is provided that handles the template name conventions establised by [FHIR-Converter](https://github.com/microsoft/FHIR-Converter). This allows user defined templates to reference existing templates without change. The example user defined [templates](https://github.com/chaseastewart/fhir-converter/tree/main/data/templates/ccda) reuse the default section / header templates.


## Benchmark
Expand Down Expand Up @@ -169,4 +169,5 @@ Pampi max=0.013 min=0.012 avg=0.012
- [python-liquid](https://github.com/jg-rp/liquid)
- [pyjson5](https://github.com/Kijewski/pyjson5)
- [xmltodict](https://github.com/martinblech/xmltodict)
- [isodate](https://github.com/gweis/isodate)
<!--body-end-->
265 changes: 265 additions & 0 deletions data/sample/ccda/caramed001cdamedicationcard.xml

Large diffs are not rendered by default.

412 changes: 412 additions & 0 deletions data/sample/ccda/cda-ch-emed-2-7-MedicationCard.ccda

Large diffs are not rendered by default.

Loading

0 comments on commit 0a4984f

Please sign in to comment.