standardhealth / shr-es6-export

ES6 library for exporting SHR models to ES6 classes
Apache License 2.0
3 stars 0 forks source link

Es6 fromfhir support #34

Closed cmoesel closed 5 years ago

cmoesel commented 5 years ago

This PR replaces #33:

Adds support for instantiating SHR classes based on mapped FHIR resources. Each class gets a new, static fromFHIR function which takes in the relevant FHIR resource, along with other relevant data to produce the SHR object from. See prior discussion on #27

Note that because of issues identified in the toFHIR logic while creating this, this disables the toFHIR function, though it can be re-enabled by setting a flag in generateClass.js

cmoesel commented 5 years ago

The code in this PR was already reviewing in previous PRs or code reviews, so I merged it after Travis passed.