nazrulworld / fhir.resources

FHIR Resources https://www.hl7.org/fhir/resourcelist.html
https://pypi.org/project/fhir.resources/
Other
365 stars 104 forks source link

How to override validation #149

Open mobolaji000 opened 8 months ago

mobolaji000 commented 8 months ago

Description

Thanks for this really wonderful library. I have lots of dirty data, and I was looking for an option to turn off all validation when I try to create a resource (e.g. Condition, Resource) from a json. Could you please send an example?

What I Did

I create resources in the regular way and I run into tons of errors. I would rather just turn off all validation.

vadi2 commented 5 months ago

This is a issue pertinent to me as well - I'm building up FHIR resources from a spreadsheet and not all of the data is available at resource construction time - some will come later.

At the moment, I'm filling in the mandatory data as a hack to satisfy the validator, but this becomes tricky when you have a mandatory choice such as MedicationStatement.medication[x] - using a placeholder value at instantiation time doesn't work because as soon as you try to remove it to set the correct datatype, the validator complains.

@Healthedata1 how do you deal with this - as I understand you have a similar usecase?

Healthedata1 commented 5 months ago

I'm filling in the mandatory data as a hack to satisfy the validator.

is what I do too.

Eric M Haas, DVM, MS Health eData Inc 211 S Jefferson St, Napa, CA 94559 707.227.2608 @.***

On Wed, Mar 20, 2024 at 6:41 AM Vadim Peretokin @.***> wrote:

This is a issue pertinent to me as well - I'm building up FHIR resources from a spreadsheet and not all of the data is available at resource construction time - some will come later.

At the moment, I'm filling in the mandatory data as a hack to satisfy the validator.

@Healthedata1 https://github.com/Healthedata1 how do you deal with this

  • as I understand you have a similar usecase?

— Reply to this email directly, view it on GitHub https://github.com/nazrulworld/fhir.resources/issues/149#issuecomment-2009595321, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABYRJ2WC736K734QUGJUKM3YZGGZZAVCNFSM6AAAAABA5JK34SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBZGU4TKMZSGE . You are receiving this because you were mentioned.Message ID: @.***>