Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FHIR release DSTU2 still needed! #13

Closed
mmabey opened this issue Jun 16, 2020 · 12 comments
Closed

FHIR release DSTU2 still needed! #13

mmabey opened this issue Jun 16, 2020 · 12 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@mmabey
Copy link
Contributor

mmabey commented Jun 16, 2020

I use fhir.resources as part of my work for a company that integrates with EHR systems using FHIR. The two biggest EHR systems I know of (Epic and Cerner) currently only support FHIR v1.0.2 (DSTU 2). My understanding is that there were so many issues with STU3 that hardly systems will ever support it and will instead migrate from DSTU 2 straight to R4. (I promise I'm not trying to sound dramatic here, that's literally what my company's Product team has told me these companies have said.)

Recent changes (specifically commit 4eb0790) remove support for DSTU 2, which effectively makes the latest version of the fhir.resources library unusable for my team.

If I may ask, what was the reasoning behind the removal of support for DSTU 2? Is there something I could contribute to make it worth the effort to continue supporting that version of the FHIR spec?

@nazrulworld
Copy link
Owner

nazrulworld commented Jun 16, 2020

@mmabey thank you so much for the opinion.

Reason Why DSTU 2 is not part-of.

  1. You will find that everything kind of rewritten to comply with pedantic (support modern python), however, you also know that we used a generator to create all classes as well as tests. The limitation there (the generator) it cannot work FHIR DSTU 2.
  2. My limited knowledge, I thought DSTU 2 would be obsolete soon! (my bad), besides also though it will make package size a little bit larger!

Solution

  1. we will keep developing, support DSTU2 at 5.X.X branch.
  2. I fully agree with you, we should keep continuing to support DSTU 2 on the new release, in that case, we have to copy manually all files into DSTU2 folder and make compatible with the new style. There, of course, will need a contribution from you (especially testing part, because we can make unittest for that, it would be nice if you can tests manually ).

The plan could be like, I will make structures of DSTU2 package, then will invite you to help.

Let me know your opinion.
Thanks 🙏

Also thanks a lot for your pull request, please comment there.

@nazrulworld
Copy link
Owner

Another side note, which python version is used in your running projects?

@nazrulworld nazrulworld added question Further information is requested enhancement New feature or request labels Jun 16, 2020
@mmabey
Copy link
Contributor Author

mmabey commented Jun 16, 2020

Thank you for your encouraging response! One of the reason we're using the fhir.resources library over other options is the ability to use multiple versions of the FHIR spec simultaneously (since my company may need to interface with systems that support different versions of the FHIR spec). So thank you! The added size of the library is worth it to us.

You're not wrong about DSTU 2 being obsolete soon. There was recent legislation in the US regarding this that makes R4 the standard, but I think it will still be another year (or three) before EHR vendors fully support R4, and it may be even more years before all providers and insurance companies upgrade their systems. So I think the effort to support DSTU 2 for a while longer is worth it for now. And I'm happy to do tests on our system as necessary.

We're currently running version Python 3.6.9, but in the next couple weeks we'll be upgrading to Python 3.8.x 🎉

By the way, I'm excited about the addition of pydantic to the library. I think that's a great direction to take things! 👍

nazrulworld added a commit that referenced this issue Jun 17, 2020
* manually basic structures have been created, continue to add FHIR complex data types, afterwords all resources types.
@nazrulworld
Copy link
Owner

@mmabey which FHIR resources are you using mostly in your system? I am asking because I may make tests only for those specific resources as it would be hard for me to make tests for all resources by me.

@mmabey
Copy link
Contributor Author

mmabey commented Jun 22, 2020

As you can see, it's quite the list... I've copy/pasted the distinct import statements so you can see the specific objects I'm using. I assume you're only interested in the DSTU 2 elements, but just in case it's helpful I've included both DSTU 2 and R4 elements.

# DSTU 2
from fhir.resources.DSTU2.address import Address
from fhir.resources.DSTU2.allergyintolerance import AllergyIntolerance
from fhir.resources.DSTU2.annotation import Annotation
from fhir.resources.DSTU2.attachment import Attachment
from fhir.resources.DSTU2.bundle import Bundle
from fhir.resources.DSTU2.careplan import CarePlan
from fhir.resources.DSTU2.codeableconcept import CodeableConcept
from fhir.resources.DSTU2.coding import Coding
from fhir.resources.DSTU2.composition import Composition
from fhir.resources.DSTU2.condition import Condition
from fhir.resources.DSTU2.device import Device
from fhir.resources.DSTU2.diagnosticreport import DiagnosticReport
from fhir.resources.DSTU2.domainresource import DomainResource
from fhir.resources.DSTU2.element import Element
from fhir.resources.DSTU2.encounter import Encounter
from fhir.resources.DSTU2.fhirabstractbase import FHIRValidationError
from fhir.resources.DSTU2.fhirdate import FHIRDate
from fhir.resources.DSTU2.fhirelementfactory import FHIRElementFactory
from fhir.resources.DSTU2.goal import Goal
from fhir.resources.DSTU2.group import Group
from fhir.resources.DSTU2.humanname import HumanName
from fhir.resources.DSTU2.identifier import Identifier
from fhir.resources.DSTU2.immunization import Immunization
from fhir.resources.DSTU2.location import Location
from fhir.resources.DSTU2.medicationadministration import MedicationAdministration
from fhir.resources.DSTU2.medicationstatement import MedicationStatement
from fhir.resources.DSTU2.observation import Observation
from fhir.resources.DSTU2.operationoutcome import OperationOutcome
from fhir.resources.DSTU2.organization import Organization
from fhir.resources.DSTU2.patient import Patient
from fhir.resources.DSTU2.period import Period
from fhir.resources.DSTU2.person import Person
from fhir.resources.DSTU2.practitioner import Practitioner
from fhir.resources.DSTU2.procedure import Procedure
from fhir.resources.DSTU2.procedurerequest import ProcedureRequest
from fhir.resources.DSTU2.range import Range
from fhir.resources.DSTU2.relatedperson import RelatedPerson
from fhir.resources.DSTU2.resource import Resource
from fhir.resources.DSTU2.timing import Timing


# R4
from fhir.resources.address import Address
from fhir.resources.annotation import Annotation
from fhir.resources.attachment import Attachment
from fhir.resources.bundle import Bundle
from fhir.resources.careplan import CarePlan
from fhir.resources.careteam import CareTeam
from fhir.resources.codeableconcept import CodeableConcept
from fhir.resources.coding import Coding
from fhir.resources.condition import Condition
from fhir.resources.device import Device
from fhir.resources.domainresource import DomainResource
from fhir.resources.encounter import Encounter
from fhir.resources.fhirdate import FHIRDate
from fhir.resources.group import Group
from fhir.resources.humanname import HumanName
from fhir.resources.identifier import Identifier
from fhir.resources.insuranceplan import InsurancePlan
from fhir.resources.location import Location
from fhir.resources.organization import Organization
from fhir.resources.patient import Patient
from fhir.resources.period import Period
from fhir.resources.person import Person
from fhir.resources.practitioner import Practitioner
from fhir.resources.practitionerrole import PractitionerRole
from fhir.resources.range import Range
from fhir.resources.relatedperson import RelatedPerson
from fhir.resources.resource import Resource
from fhir.resources.timing import Timing

nazrulworld added a commit that referenced this issue Jul 3, 2020
@nazrulworld
Copy link
Owner

@mmabey I think all your listed FHIR resources are available under DSTU2 with some tests (hope you already did manual test)

The idea now is like, we will go-ahead of first beta release 6.0.0b1 as soon as possible despite missing many of DSTU2 resources.

  1. we will get immediate feedback for R4 and STU3
  2. we will continue adding DSTU2 resources alongside fixing bugs and adding features.
  3. I can promise a stable version will have all DSTU2 resources.

I am taking this decision because adding resources manually taking so many times.

@nazrulworld
Copy link
Owner

@mmabey should I make another intermediary beta release, or wait until more DTSU2 resources from you?

@mmabey
Copy link
Contributor Author

mmabey commented Sep 18, 2020

@nazrulworld Yeah go ahead. I think it will be a little while before my team and I can dedicate any more time to this.

@iatechicken
Copy link
Contributor

@nazrulworld @mmabey I have some time over the weekend and next week. Can I get like a before and after of the completed DSTU2 resources so that I can try to help out with the remaining items?

@nazrulworld
Copy link
Owner

nazrulworld commented Sep 18, 2020

@iatechicken you are more than welcome to try with remaining items.
I will wait for your PR until next release.

@mmabey
Copy link
Contributor Author

mmabey commented Sep 19, 2020

@iatechicken Take a look at #21. There are a bunch of resources checked off in the main issue description. The resources that I've done that aren't checked off yet are:

  • EnrollmentResponse
  • EpisodeOfCare
  • ExplanationOfBenefit
  • DataElement
  • HealthcareService
  • ImagingObjectSelection

So any of the other resources listed (that aren't checked off) would be a good place to start.

@nazrulworld I think I haven't submitted all the resources my team and I have written (sorry about that!). I'll submit a PR on Monday for your review.

@nazrulworld
Copy link
Owner

@mmabey great to hear 💯 about that, anyway added support for orjson, hopefully now JSON serialization/deserialization would way faster!
you are welcome to test that flavor (R4 and STU3 only but we can add for that DSTU2 as well later.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants