Stream: python
Topic: fhir-parser proposed changes
Geoff Low (May 10 2018 at 14:10):
I'm adding a few features to the fhir-parser module; wanted to road-test some of the ideas - these will be on my fork (https://github.com/glow-mdsol/fhir-parser)
- Adding a version lookup for the FHIR version (screen scraping directory for the moment)
- Allow choice of FHIR version using the version id (eg 3.3.1 or 'latest commit')
- Adding an option to version the output (ie models/3_3_0/*.py) (also versions the cache)
- Added top level files to the models folder;
requirements.txt
with theisodate
dependency and__init__.py
to the model folder with the following (generated by theversion.info
):
FHIR_VERSION = '3.4.0' FHIR_REVISION = '13753' FHIR_VERSION_DATE = '20180509170734'
- Allow passing of the settings module as a command line option
python generate.py -s Default/settings
- Generate the
CodeSystemValue
as an enum - tagging the System URL and whether the CodeSystem is tagged as experimental - Couple of other small changes - will be happy to talk about ideas at the connectathon
@Pascal Pfiffner - FYI
Geoff Low (May 10 2018 at 15:15):
Pushed to https://github.com/glow-mdsol/fhir-parser/tree/feature/refactor_modules
Pascal Pfiffner (May 10 2018 at 22:39):
Cool, thanks @Geoff Low, sounds great!! Just to note as to why the parser has the version hard-coded: the definition is not backwards compatible since StructureDefinition changed over the releases. I think from STU-3 on forward it may not require changes, but for example the parser parsing DSTU-2 does not work for STU-3 definitions without changes and vice versa.
Also, note that the intended use for fhir-parser to be used as a submodule and have the parent module provide the settings. For example the Swift-FHIR library has its own fhir-parser settings and has a script which starts by coping the settings: https://github.com/smart-on-fhir/Swift-FHIR/blob/master/generate.sh
Geoff Low (May 11 2018 at 09:13):
Hmm, ok. Need to rethink my approach.
Grahame Grieve (May 11 2018 at 16:47):
once we have R4 normative, structure definition won't change. But to help with situtations like this, the definitions for any version are available in any version - e.g. you can get the definitions for R3 in R2 format, or vice versa
Last updated: Apr 12 2022 at 19:14 UTC