Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

FHIR Specification Loader

NotificationsYou must be signed in to change notification settings

nazrulworld/fhirspec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Supported Python VersionsTest CoverageLanguage grade: PythonLicenseHL7® FHIR®

Python representation of FHIR®https://www.hl7.org/fhir/ specification. Idea and class structure basedonhttps://github.com/smart-on-fhir/fhir-parser.

Usages

fhirspec.Configuration

A class that is controlling the behavior offhirspec.FHIRSpec, powerful but very convenient.In several ways it is possible to construct the instance, ie. fromJSON file (has support forjson5),from python module, fromTOML file, from plain text file, and so on.Only capital letter's variables are accepted

>>>import pathlib>>>import os>>>from foo.moduleimport bar>>>from fhirspecimport Configuration>>> config1= Configuration.from_module(bar)>>> config2= Configuration.from_json_file(pathlib.Path("/json/file/location"))>>> data_dict= {..."BASE_URL": pathlib.Path(os.path.abspath(__file__))... }>>> config3= Configuration(data_dict=data_dict)

fhirspec.FHIRSpec

The main loader class, to construct this instance,Configuration: is required parameter and additionallysource of json files. Bellows variables should have to be present in configuration.

required_variables = [
"WRITE_RESOURCES", "CLASS_MAP", "REPLACE_MAP", "NATIVES","JSON_MAP", "JSON_MAP_DEFAULT", "RESERVED_MAP", "ENUM_MAP","ENUM_NAME_MAP", "DEFAULT_BASES", "MANUAL_PROFILES", "CAMELCASE_CLASSES","CAMELCASE_ENUMS", "BACKBONE_CLASS_ADDS_PARENT", "RESOURCE_MODULE_LOWERCASE",]
>>>from fhirspecimport Configuration>>>from fhirspecimport FHIRSpec>>> config= Configuration(... {..."BASE_PATH":"",      "WRITE_RESOURCES": True... }... )>>> spec= FHIRSpec(config)>>>"patient"in spec.profilesTrue

download

A perfect tool to download any file from server, no dependency on third-party library.

>>>from fhirspecimport download>>> url="http://www.africau.edu/images/default/sample.pdf">>> download_directory= pathlib.Path(os.path.expanduser("~/Downloads"))>>> download(url, download_directory)>>> (download_directory/"sample.pdf").exists()True

History

0.4.0 (22-12-2022)

  • FHIR R4B specification support has been added.

0.3.0 (18-03-2021)

  • Now eachFHIRClass contains original sequence of it's properties(elements) defined in specification.
  • AdditionallyFHIRClass.expanded_properties_sequence returns all available properties (combined with parent) sequentially.

0.2.5 (02-11-2020)

  • This release contains full fixes ofFHIRStructureDefinitionElement.represents_class issues.

0.2.4 (02-11-2020)

  • No more improvements, just same release of0.2.1 and overrides to the faulty release of0.2.3.

0.2.3 (24-09-2020)

Update to version ``0.2.4`` is recommended

  • useFHIRStructureDefinitionElement.is_main_profile_element instead ofFHIRStructureDefinitionElement.represents_class

0.2.1 (15-06-2020)

  • Minor improvement onFHIRUnitTest handling empty value.

0.2.0 (06-06-2020)

  • FHIRClass.known property has been changed toFHIRClass.__know_classes__ andFHIRClass.is_known_class.
  • Make supports for Python 3.6 and 3.9

0.1.0 (28-04-2020)

  • Initial release [nazrulworld]

© Copyright HL7® logo, FHIR® logo and the flaming fire are registered trademarksowned byHealth Level Seven International

"FHIR® is the registered trademark of HL7 and is used with the permission of HL7.Use of the FHIR trademark does not constitute endorsement of this product by HL7"


[8]ページ先頭

©2009-2025 Movatter.jp