NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #2389 most downloaded on PyPI
FHIR Resources as Model Class
Last release 3 months ago
03 Jul 2026
Ships fairly regularly
a new release about every 3 months
Nearly every release is documented
notes for 20 of 21 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
43 releases · first in 2019
For the Extension class, the url field value is now required. Issue #205
Breaking
For the Extension class, the url field value is now required. Issue #205 (https://github.com/nazrulworld/fhir.resources/issues/205)
Minimum requirement for fhir-core version is now 1.1.9
Type aliases are added for all types during type checking. [mschoettle]
Type aliases are added for all types during type checking. [mschoettle]
Minimum requirement for fhir-core version is now 1.1.5 which naturally comes with some bug fixes. See here https://github.com/nazrulworld/fhir-core/blob/main/HISTORY.rst#115-2026-01-29
One column per quarter.
Issue #183 Pydantic 2.11+ Deprecation Warnings: model_fields Should Be Accessed on Class, Not Instance.
New features
Issue #181 summary (https://www.hl7.org/fhir/search.html#_summary) mode feature added.
Fixes
Issue #184 pyright struggles with default position args.
Issue #186 missing py.typed marker, causing mypy import errors.
Issue #183 Pydantic 2.11+ Deprecation Warnings: model_fields Should Be Accessed on Class, Not Instance.
The minimum required version for fhir-core is 1.0.0, which obviously comes with new features and bug fixes. For example xml serialization/deserializat
The minimum required version for fhir-core is 1.0.0, which obviously comes with new features and bug fixes. For example xml serialization/deserialization. See changes log here
Issue #168 https://github.com/nazrulworld/fhir.resources/issues/166
PR#160 _ switch the type of Element.id from id to string for R4B [cybernop]
PR#160 switch the type of Element.id from id to string for R4B [cybernop]
Minimum version of fhir-core package have been updated.
Minimum version of fhir-core package have been updated.
All of fhir resources are regenerated for to comply with the optionality of fhir model's field. Issue https://github.com/nazrulworld/fhir.resources/issues/164
Issue #164 _ get_fhir_model_class is now available and can be imported from base package. For example from fhir.resources import get_fhir_model_class
Issue #164 get_fhir_model_class is now available and can be imported from base package. For example from fhir.resources import get_fhir_model_class or from fhir.resources.STU3 import get_fhir_model_class
FHIR DTU2 packages are no longer available.
Breaking
Drop support for python 3.7
FHIR DTU2 packages are no longer available.
Some of functions from FHIRAbstractModel are deprecated to comply with Pydantic V2. Some are
New features
See migration guide.
Breaking
Drop support for python 3.6.
Drop support for pydantic v1.
The function FHIRAbstractModel::add_root_validator is no longer available.
Deprecations
Some of functions from FHIRAbstractModel are deprecated to comply with Pydantic V2. Some are
FHIRAbstractModel::dict
FHIRAbstractModel::json
FHIRAbstractModel::parse_obj
FHIRAbstractModel::parse_raw: no longer supports xml and yaml data.
FHIRAbstractModel::parse_file: no longer supports xml and yaml file.
Improvements
Issue 124 _ on the wake of 2.x pydantic release, pydantic's max version restriction added.
Issue 124 on the wake of 2.x pydantic release, pydantic's max version restriction added.
Issue #128 pkg_resources.declare_namespace deprecation _
Fixes
Issue #128 pkg_resources.declare_namespace deprecation
Issue #129 urn not supported in Url
Support for FHIR version R5 _ has been added under root package.
New Feature
Support for FHIR version R5 has been added under root package.
Breaking
All root resources (FHIR version R4B) are moved under sub-package R4B. Have a look at the migration guide.
FHIR R4B release has been overlapped on current R4 as default release. See changes (Release R4B: May 28, 2022) http://hl7.org/fhir/R4B/history.html. M
Breaking
FHIR R4B release has been overlapped on current R4 as default release. See changes (Release R4B: May 28, 2022) http://hl7.org/fhir/R4B/history.html. More detail at http://hl7.org/fhir/R4B/diff.html
Improvements
Issue #90 logging level downgraded from warning to debug.
Primitive URL type is now accepting the relative path without prefix "/".
Fix, primitive extension was not included if primitive field value is null. [nazrulworld]
Bugfixes
Fix, primitive extension was not included if primitive field value is null. [nazrulworld]
Improvements
Issue #97 Now null value accepted as a member of String List.
Primitive DataType Ùrl` is now accepting relative path.
Breaking
Element.id & Resource.id don't have any extension. See https://chat.fhir.org/#narrow/stream/179166-implementers/topic/Resource.2Eid.20and.20primitive.20extension.
Issue #96 _, fixes datetime's ISO format representation for YAML. [nazrulworld]
Issue #96, fixes datetime's ISO format representation for YAML. [nazrulworld]
Issues #89 _ & #90 _ possible breaking for FHIRAbstractModel.dict (if pydnatic specific extra argument has been provided) is neutralized.[nazrulworld]
Issue #88 fixes typo mistake. Resource name const was wrong. [nazrulworld]
Bugfixes
Issue #88 fixes typo mistake. Resource name const was wrong. [nazrulworld]
String type class is now configurable, it is possible to allow empty str value.
New Feature
String type class is now configurable, it is possible to allow empty str value.
Bugfixes
Issue #75 Remove "tests" from installed package.
Fixes some issues for DSTU2 https://github.com/nazrulworld/fhir.resources/pull/71 & https://github.com/nazrulworld/fhir.resources/pull/70 [ItayGoren]
Parsing YAML file or string/bytes contents, now accept extra parameter loader class.
New Feature
Parsing YAML file or string/bytes contents, now accept extra parameter loader class.
Parsing from XML file or string/bytes contents are now supported. With possible to provide xmlparser for schema validation purpose.
Bugfixes
Added correct fhir version name into Primitive Type Base class for STU3 and DSTU2.
Issue #51 _ Help on converting XML to FHIR format.
New Feature
Issue #47 add YAML support.
Issue #51 Help on converting XML to FHIR format.
Issue #63 Now JSON output key's sequence is matching with original FHIR specification.
Breaking
FHIRAbstractModel.json() and FHIRAbstractModel.dict() parameters signatures are more FHIR specific and additional parameters are removed (pydantic specific).
Bugfixes
Added missing element_property field attribute for class FHIRPrimitiveExtension.
Breaking/Fixes: PR#48 _ Resource.id type has been replaced with fhirtypes.Id from fhirtypes.String (only for R4) [ItayGoren]
Breaking/Fixes: PR#48 Resource.id type has been replaced with fhirtypes.Id from fhirtypes.String (only for R4) [ItayGoren]
Fixes: constraints regex for fhirtypes Id, Code, Integer, Decimal, UnsignedInt, PositiveInt and so on. [nazrulworld]
Issue #21 Remaining resources are added. [iatechicken]
Issue #21 Remaining resources are added. [iatechicken]
Fixes: wrong ClaimResponseAddItemAdjudicationType resource type name into DTSU2.
Fixes: wrong ClaimResponseAddItemAdjudicationType resource type name into DTSU2.
FHIRAbstractModel::add_root_validator is more improved and practical with proper validation, more now possible provide class method as root validator.
Improvements
FHIRAbstractModel::add_root_validator is more improved and practical with proper validation, more now possible provide class method as root validator.
Bugfixes
Issue #41 pydantic.errors.ConfigError: duplicate validator function.
Now supports of simplejson is available automatically (depends on importable) along side with orjson and default json library. Order of json serialize
Improvements
Now supports of simplejson is available automatically (depends on importable) along side with orjson and default json library. Order of json serializer available (orjson -> simplejson(as fallback) -> json(as default)).
Breaking
orjson is not available by default, have to use extra_require orjson to available that.
pydantic minimum version has been set to 1.7.2.
pydantic minimum version has been set to 1.7.2.
*If you face import error from pydantic.utils import ROOT_KEY, please upgrade your pydnatic version to <1.7*
If you face import error ``from pydantic.utils import ROOT_KEY``, please upgrade your pydnatic version to <1.7
Fixes
Issue #39 added compatibility with pydantic version between 1.6.x and 1.7.x [nazrulworld]
Improvements
FHIRAbstractModel::json now takes additional parameter return_bytes, indicates json string would be bytes. [nazrulworld]
Improvements
FHIRAbstractModel::json now takes additional parameter return_bytes, indicates json string would be bytes. [nazrulworld]
Issue#38 Add support for FHIR comments. As per suggestion of comments in json from Grahame Grieve, now fhir_comments is accepted. [nazrulworld]
FHIR comments filter option is added in FHIRAbstractModel::json, means it is possible to exclude any comments while generating json string by providing parameter exclude_comments value. [nazrulworld]
More FHIR DSTU2 resources have been added. [Itay Goren]
visionprescription and supplyrequest resources added for DSTU2 [iatechicken]
Improvements
visionprescription and supplyrequest resources added for DSTU2 [iatechicken]
Fixes
orjson_ supports have been available as default json dumps and loads for Model.
Improvements
orjson_ supports have been available as default json dumps and loads for Model.
FHIRAbstractModel::get_json_encoder class method now available, which return pydantic compatible json encoder callable, can be used with any json serializer.
More DSTU2 FHIR Resources have added, https://github.com/nazrulworld/fhir.resources/issues/21. Thanks to [mmabey].
Fixes
Fixes URL validation in the case where a primitive type is used as URL (which is allowed in StructureDefinition). [simonvadee]
Fixes Issue#19 Getting validation errors that don't make sense.
FHIRAbstractModel::get_resource_type class method now available, which returning name of the resource.
FHIRAbstractModel::get_resource_type class method now available, which returning name of the resource.
FHIRAbstractModel::element_properties class method now available, which returning generator of ModelField, those are elements of the resource.
FHIRAbstractModel::element_properties class method now available, which returning generator of ModelField, those are elements of the resource.
Minor fixes on enum_values.
Revolutionary evolution has been made, now fully rewritten with modern python, underlying APIs (almost all) have been changed. Please have look at rea
Revolutionary evolution has been made, now fully rewritten with modern python, underlying APIs (almost all) have been changed. Please have look at readme section, for howto.
Improvements
Full support of FHIR Extensibility for Primitive Data Types
Breaking
Drop support for python 2.7.
Nothing published for this version
FHIR STU3 release version upgraded from 3.0.1 to 3.0.2, Please find changes history here https://www.hl7.org/fhir/history.html.
Improvements
FHIR STU3 release version upgraded from 3.0.1 to 3.0.2, Please find changes history here https://www.hl7.org/fhir/history.html.
FHIR R4 release version upgraded from 4.0.0 to 4.0.1, find changes history here https://www.hl7.org/fhir/history.html.
Issue#5 _ confusing error message "name 'self' is not defined" [nazrulworld]
Bugfixes:
Issue#5 confusing error message "name 'self' is not defined" [nazrulworld]
Nothing but release stable version.
Nothing but release stable version.
R5 Milestone . This version has cumulatively made 1000s of changes from the R4+R4B milestones ( 3969 change requests , including 1840 substantive changes ). Most of the changes are in response to implementation feedback. There is no comprehensive list, but here is a list of the more significant changes:
Complete Rework Subscriptions framework
Rework the abstract datatypes (new types Base , DataType , BackboneType ), and introduce CanonicalResource and MetadataResource interfaces
All the extensions have been moved to a new package hl7.fhir.uv.extensions published at http://hl7.org/fhir/extensions . They are still published as part of this specification, but they will be released more often
A number of clarifications have been made on the RESTful API and Search pages, that have resulted in the introduction of new SHALL and SHOULD conformance statements. Though the new SHALL statements are believed to be clarifications, implementers should review these pages carefully and particularly should note the clarifications around the use of GET/POST on search, and the new SHOULD requirement for clients about timezones
New resources: ActorDefinition , ArtifactAssessment , BiologicallyDerivedProductDispense , ConditionDefinition , DeviceAssociation , DeviceDispense , EncounterHistory , FormularyItem , GenomicStudy , ImagingSelection , InventoryItem , InventoryReport , NutritionIntake , NutritionProduct , Permission , TestPlan and Transport + New types: integer64 , Availability and ExtendedContactDetail
Renamed resources DeviceUseStatement -> DeviceUsage and RequestGroup -> RequestOrchestration
Removed resources CatalogEntry ( R4B ), DocumentManifest ( R4B ) (use List ), Media ( R4B ) (use DocumentReference or Observation ), EffectEvidenceSynthesis ( R4 ), ResearchDefinition ( R4B ), ResearchElementDefinition ( R4B ), RiskEvidenceSynthesis ( R4 ), and the type Contributor ( R4B )
For the Medication Definition resources, the changes are more complicated:
Renamed in R4B: MedicinalProduct -> MedicinalProductDefinition , MedicinalProductAuthorization -> RegulatedAuthorization , MedicinalProductIngredient -> Ingredient , MedicinalProductManufactured -> ManufacturedItemDefinition , MedicinalProductPackaged -> PackagedProductDefinition , MedicinalProductPharmaceutical -> AdministrableProductDefinition , SubstanceSpecification -> SubstanceDefinition
Collapsed into ClinicalUseDefinition in R4B: MedicinalProductContraindication, MedicinalProductIndication, MedicinalProductInteraction, MedicinalProductUndesirableEffect
Removed in R4B: types ProdCharacteristic and SubstanceAmount
Omitted from R4B due to limited scope: SubstanceNucleicAcid, SubstancePolymer, SubstanceProtein, SubstanceReferenceInformation, SubstanceSourceMaterial
Moved many code systems and value sets to terminology.hl7.org
Added Operations for Large Resources
Added the ability to define additional bindings on elements
Documented FHIR NPM Packages
Changes to reliable messaging (which identifier elements are used)
About Normative content in the R5 release
The 5th Major release of the FHIR specification is labeled as 'trial-use' because the entire ballot cycle that led to this release was performed under the HL7 STU (Standard for Trial Use). None of the content in this specification is considered "Normative" , but the content that was previously normative in Release 4 is still labelled as Normative to preserve the status through the publication and implementation of this release.
A few new artifacts (such as CanonicalResource ) are labelled as Normative because they were created by moving existing normative content to a new type.
5.0.0-draft-final R5 Draft: Final QA Version (for internal review by HL7).
5.0.0-snapshot3 R5 Snapshot 3 - Connectathon 32 Base. This stable version for the connectathon and final publication preparation has many changes since the ballot. Some particularly significant changes:
5.0.0-ballot R5 Ballot - Sept/Oct 2022 Ballot. This ballot has 1000s of changes. Some particularly significant changes:
Change the way version numbering works
New Resources: Transport , NutritionIntake , ActorDefinition , Requirements , GenomicStudy and FormularyItem
New Data Types: Availability , ExtendedContactDetail , MonetaryComponent and VirtualServiceDetail
Complete Rework Subscriptions framework
Hundreds of clarifications, technical corrections etc.
3157 change requests were applied to R5, of which 1486 changes were considered substantive.
4.6.0 Draft Ballot for R5 - May 2021 Ballot (Apr 14-20 2021). Significant changes:
Add RatioRange datatype
Rename DeviceUseStatement to DeviceUsage
New resources InventoryReport , Citation , EvidenceReport, and ClinicalUseIssue
Updates for subscriptions , medication definitions , and evidence based medicine
Ongoing development of other resources
4.5.0 3rd Milestone for R5 - September 2020 Virtual Connectathon Stable Version (Aug-20 2020). Significant changes:
Ongoing development of less mature resources
Finish removing content moved to http://terminology.hl7.org
4.4.0 2nd Milestone for R5 - May 2020 Virtual Connectathon Stable Version. Significant changes:
Further Development of the Subscription framework ( SubjectStatus , rename Topic to SubscriptionTopic)
Add new Resources Permission , NutritionProduct , Citation , and EvidenceReport
New features - Isuue#1 Add DSTU2 Support _
New features
Isuue#1 Add DSTU2 Support
elementProperties: element now has extra property type_name. Now format like (name, json_name, type, type_name, is_list, "of_many", not_optional) The
Breaking or Improvments
elementProperties: element now has extra property type_name. Now format like (name, json_name, type, type_name, is_list, "of_many", not_optional) The type_name refers original type name (code) from FHIR Structure Definition and it would be very helpful while making fhir search, fhirpath navigator.
Implemented own build policy, now previous version of FHIR® resources are available as python sub-package.
New features
Implemented own build policy, now previous version of FHIR® resources are available as python sub-package.
Build info
Default version is R4 (see version info at 4.0.0b1 (2019-01-13) section)
STU3 (see version info at 3.0.1 (2019-01-13) section)
see version info at 4.0.0b1 section.
see version info at 4.0.0b1 section.
[FHIR] FhirVersion=4.0.0-a53ec6ee1b version=4.0.0 buildId=a53ec6ee1b date=20181227223754
`Version Info (R4)`_
[FHIR] FhirVersion=4.0.0-a53ec6ee1b version=4.0.0 buildId=a53ec6ee1b date=20181227223754
[FHIR] FhirVersion=3.0.1.11917 version=3.0.1 revision=11917 date=20170419074443
[FHIR] FhirVersion=3.0.1.11917 version=3.0.1 revision=11917 date=20170419074443
Your coding agent can read these notes before it upgrades. Set up the MCP server →