Open GreySeaWolf opened 1 year ago
@GreySeaWolf, I have the same issue. Did you manage to find a solution or an explanation? Thanks
Bump, I am also experiencing this issue, thanks!
I think ,the issue is There is no inner element called address in Organization resource. So it is giving an extra fields not allowed error
Description
Examples fail:
This is a sample Python script.
Press Shift+F10 to execute it or replace it with your code.
Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.
from fhir.resources.organization import Organization from fhir.resources.address import Address
def print_hi(name):
Use a breakpoint in the code line below to debug your script.
Press the green button in the gutter to run the script.
if name == 'main': print_hi('PyCharm')
See PyCharm help at https://www.jetbrains.com/help/pycharm/
error: Traceback (most recent call last): File "C:\CODE\EpicFHIR\main.py", line 23, in
org = Organization(data)
File "C:\CODE\EpicFHIR\venv\lib\site-packages\fhir\resources\core\fhirabstractmodel.py", line 105, in init
BaseModel.init(__pydantic_self__, data)
File "pydantic\main.py", line 341, in pydantic.main.BaseModel.init
pydantic.error_wrappers.ValidationError: 1 validation error for Organization
address
extra fields not permitted (type=value_error.extra)
Process finished with exit code 1
What I Did