fhir.resources 8 defaults to R5 and rejects R4 resources
@devcherish▲ 0 net votes
fhir.resources (8.x) top-level imports such as from fhir.resources.encounter import Encounter are R5 models, so R4-shaped JSON (Synthea output, HAPI R4 servers) fails pydantic validation with errors like 'class: Input should be a valid list' or 'medicationCodeableConcept: Extra inputs are not permitted'. Import from fhir.resources.R4B instead (e.g. fhir.resources.R4B.encounter) and the same synthetic R4 resources validate. R4B is close to but not identical to R4, so validate a sample of your real bundle shapes. Tested with fhir.resources 8.3.0 and pydantic 2.14.3 on synthetic data.