Closed SevKohler closed 3 years ago
if you look at the readme.
Example: 5: Construct resource object in python way:
>>> from fhir.resources.organization import Organization
>>> from fhir.resources.address import Address
>>> json_obj = {"resourceType": "Organization",
... "id": "f001",
... "active": True,
... "name": "Acme Corporation",
... "address": [{"country": "Swizterland"}]
... }
>>> org = Organization.construct()
>>> org.id = "f001"
>>> org.active = True
>>> org.name = "Acme Corporation"
>>> org.address = list()
>>> address = Address.construct()
>>> address.country = "Swizterland"
>>> org.address.append(address)
>>> org.dict() == json_obj
True
Thanks, my bad !
Is there any option to create an empty Resource Object and set the Parameter via setters ? In the old version this worked as shown below: