Extends the FHIRAbstractBase with server talking capabilities. More...
Public Member Functions | |
__init__ (self, jsondict=None, strict=True) | |
Initializer. | |
as_json (self) | |
Serializes to JSON by inspecting elementProperties() and creating a JSON dictionary of all registered properties. | |
relativeBase (self) | |
relativePath (self) | |
read (cls, rem_id, server) | |
Read the resource with the given id from the given server. | |
read_from (cls, path, server) | |
Requests data from the given REST path on the server and creates an instance of the receiving class. | |
createPath (self) | |
Get the endpoint on the server for creating the resource. | |
create (self, server) | |
Attempt to create the receiver on the given server, using a POST command. | |
update (self, server=None) | |
Update the receiver's representation on the given server, issuing a PUT command. | |
delete (self, server=None) | |
Delete the receiver from the given server with a DELETE command. | |
search (self, struct=None) | |
Search can be started via a dictionary containing a search construct. | |
where (cls, struct) | |
Search can be started via a dictionary containing a search construct. | |
Public Member Functions inherited from fhirclient.models.fhirabstractbase.FHIRAbstractBase | |
with_json (cls, jsonobj) | |
Initialize an element from a JSON dictionary or array. | |
with_json_and_owner (cls, jsonobj, owner) | |
Instantiates by forwarding to with_json() , then remembers the "owner" of the instantiated elements. | |
elementProperties (self) | |
Returns a list of tuples, one tuple for each property that should be serialized, as: ("name", "json_name", type, is_list, "of_many", not_optional) | |
update_with_json (self, jsondict) | |
Update the receiver with data in a JSON dictionary. | |
owningResource (self) | |
Walks the owner hierarchy and returns the next parent that is a DomainResource instance. | |
owningBundle (self) | |
Walks the owner hierarchy and returns the next parent that is a Bundle instance. | |
resolvedReference (self, refid) | |
Returns the resolved reference with the given id, if it has been resolved already. | |
didResolveReference (self, refid, resolved) | |
Called by FHIRResource when it resolves a reference. | |
Public Attributes | |
id | |
resource_type | |
Static Public Attributes | |
str | resource_type = 'FHIRAbstractResource' |
Protected Member Functions | |
_with_json_dict (cls, jsondict) | |
Overridden to use a factory if called when "resourceType" is defined in the JSON but does not match the receiver's resource_type. | |
Protected Member Functions inherited from fhirclient.models.fhirabstractbase.FHIRAbstractBase | |
_matches_type (self, value, typ) | |
Protected Attributes | |
_server | |
Protected Attributes inherited from fhirclient.models.fhirabstractbase.FHIRAbstractBase | |
_resolved | |
_owner | |
Properties | |
origin_server = property | |
Walks the owner hierarchy until it finds an owner with a server. | |
Extends the FHIRAbstractBase with server talking capabilities.
fhirclient.models.fhirabstractresource.FHIRAbstractResource.__init__ | ( | self, | |
jsondict = None , |
|||
strict = True |
|||
) |
Initializer.
If strict is true, raises on errors, otherwise uses logger.warning()
.
:raises: FHIRValidationError on validation errors, unless strict is False
jsondict | dict A JSON dictionary to use for initialization |
strict | bool If True (the default), invalid variables will raise a TypeError |
Reimplemented from fhirclient.models.fhirabstractbase.FHIRAbstractBase.
Reimplemented in fhirclient.models.account.Account, fhirclient.models.activitydefinition.ActivityDefinition, fhirclient.models.adverseevent.AdverseEvent, fhirclient.models.allergyintolerance.AllergyIntolerance, fhirclient.models.appointment.Appointment, fhirclient.models.appointmentresponse.AppointmentResponse, fhirclient.models.auditevent.AuditEvent, fhirclient.models.basic.Basic, fhirclient.models.binary.Binary, fhirclient.models.biologicallyderivedproduct.BiologicallyDerivedProduct, fhirclient.models.bodystructure.BodyStructure, fhirclient.models.bundle.Bundle, fhirclient.models.capabilitystatement.CapabilityStatement, fhirclient.models.careplan.CarePlan, fhirclient.models.careteam.CareTeam, fhirclient.models.catalogentry.CatalogEntry, fhirclient.models.chargeitem.ChargeItem, fhirclient.models.chargeitemdefinition.ChargeItemDefinition, fhirclient.models.claim.Claim, fhirclient.models.claimresponse.ClaimResponse, fhirclient.models.clinicalimpression.ClinicalImpression, fhirclient.models.codesystem.CodeSystem, fhirclient.models.communication.Communication, fhirclient.models.communicationrequest.CommunicationRequest, fhirclient.models.compartmentdefinition.CompartmentDefinition, fhirclient.models.composition.Composition, fhirclient.models.conceptmap.ConceptMap, fhirclient.models.condition.Condition, fhirclient.models.consent.Consent, fhirclient.models.contract.Contract, fhirclient.models.coverage.Coverage, fhirclient.models.coverageeligibilityrequest.CoverageEligibilityRequest, fhirclient.models.coverageeligibilityresponse.CoverageEligibilityResponse, fhirclient.models.detectedissue.DetectedIssue, fhirclient.models.device.Device, fhirclient.models.devicedefinition.DeviceDefinition, fhirclient.models.devicemetric.DeviceMetric, fhirclient.models.devicerequest.DeviceRequest, fhirclient.models.deviceusestatement.DeviceUseStatement, fhirclient.models.diagnosticreport.DiagnosticReport, fhirclient.models.documentmanifest.DocumentManifest, fhirclient.models.documentreference.DocumentReference, fhirclient.models.domainresource.DomainResource, fhirclient.models.effectevidencesynthesis.EffectEvidenceSynthesis, fhirclient.models.encounter.Encounter, fhirclient.models.endpoint.Endpoint, fhirclient.models.enrollmentrequest.EnrollmentRequest, fhirclient.models.enrollmentresponse.EnrollmentResponse, fhirclient.models.episodeofcare.EpisodeOfCare, fhirclient.models.eventdefinition.EventDefinition, fhirclient.models.evidence.Evidence, fhirclient.models.evidencevariable.EvidenceVariable, fhirclient.models.examplescenario.ExampleScenario, fhirclient.models.explanationofbenefit.ExplanationOfBenefit, fhirclient.models.familymemberhistory.FamilyMemberHistory, fhirclient.models.flag.Flag, fhirclient.models.goal.Goal, fhirclient.models.graphdefinition.GraphDefinition, fhirclient.models.group.Group, fhirclient.models.guidanceresponse.GuidanceResponse, fhirclient.models.healthcareservice.HealthcareService, fhirclient.models.imagingstudy.ImagingStudy, fhirclient.models.immunization.Immunization, fhirclient.models.immunizationevaluation.ImmunizationEvaluation, fhirclient.models.immunizationrecommendation.ImmunizationRecommendation, fhirclient.models.implementationguide.ImplementationGuide, fhirclient.models.insuranceplan.InsurancePlan, fhirclient.models.invoice.Invoice, fhirclient.models.library.Library, fhirclient.models.linkage.Linkage, fhirclient.models.list.List, fhirclient.models.location.Location, fhirclient.models.measure.Measure, fhirclient.models.measurereport.MeasureReport, fhirclient.models.media.Media, fhirclient.models.medication.Medication, fhirclient.models.medicationadministration.MedicationAdministration, fhirclient.models.medicationdispense.MedicationDispense, fhirclient.models.medicationknowledge.MedicationKnowledge, fhirclient.models.medicationrequest.MedicationRequest, fhirclient.models.medicationstatement.MedicationStatement, fhirclient.models.medicinalproduct.MedicinalProduct, fhirclient.models.medicinalproductauthorization.MedicinalProductAuthorization, fhirclient.models.medicinalproductcontraindication.MedicinalProductContraindication, fhirclient.models.medicinalproductindication.MedicinalProductIndication, fhirclient.models.medicinalproductingredient.MedicinalProductIngredient, fhirclient.models.medicinalproductinteraction.MedicinalProductInteraction, fhirclient.models.medicinalproductmanufactured.MedicinalProductManufactured, fhirclient.models.medicinalproductpackaged.MedicinalProductPackaged, fhirclient.models.medicinalproductpharmaceutical.MedicinalProductPharmaceutical, fhirclient.models.medicinalproductundesirableeffect.MedicinalProductUndesirableEffect, fhirclient.models.messagedefinition.MessageDefinition, fhirclient.models.messageheader.MessageHeader, fhirclient.models.molecularsequence.MolecularSequence, fhirclient.models.namingsystem.NamingSystem, fhirclient.models.nutritionorder.NutritionOrder, fhirclient.models.observation.Observation, fhirclient.models.observationdefinition.ObservationDefinition, fhirclient.models.operationdefinition.OperationDefinition, fhirclient.models.operationoutcome.OperationOutcome, fhirclient.models.organization.Organization, fhirclient.models.organizationaffiliation.OrganizationAffiliation, fhirclient.models.parameters.Parameters, fhirclient.models.patient.Patient, fhirclient.models.paymentnotice.PaymentNotice, fhirclient.models.paymentreconciliation.PaymentReconciliation, fhirclient.models.person.Person, fhirclient.models.plandefinition.PlanDefinition, fhirclient.models.practitioner.Practitioner, fhirclient.models.practitionerrole.PractitionerRole, fhirclient.models.procedure.Procedure, fhirclient.models.provenance.Provenance, fhirclient.models.questionnaire.Questionnaire, fhirclient.models.questionnaireresponse.QuestionnaireResponse, fhirclient.models.relatedperson.RelatedPerson, fhirclient.models.requestgroup.RequestGroup, fhirclient.models.researchdefinition.ResearchDefinition, fhirclient.models.researchelementdefinition.ResearchElementDefinition, fhirclient.models.researchstudy.ResearchStudy, fhirclient.models.researchsubject.ResearchSubject, fhirclient.models.resource.Resource, fhirclient.models.riskassessment.RiskAssessment, fhirclient.models.riskevidencesynthesis.RiskEvidenceSynthesis, fhirclient.models.schedule.Schedule, fhirclient.models.searchparameter.SearchParameter, fhirclient.models.servicerequest.ServiceRequest, fhirclient.models.slot.Slot, fhirclient.models.specimen.Specimen, fhirclient.models.specimendefinition.SpecimenDefinition, fhirclient.models.structuredefinition.StructureDefinition, fhirclient.models.structuremap.StructureMap, fhirclient.models.subscription.Subscription, fhirclient.models.substance.Substance, fhirclient.models.substancenucleicacid.SubstanceNucleicAcid, fhirclient.models.substancepolymer.SubstancePolymer, fhirclient.models.substanceprotein.SubstanceProtein, fhirclient.models.substancereferenceinformation.SubstanceReferenceInformation, fhirclient.models.substancesourcematerial.SubstanceSourceMaterial, fhirclient.models.substancespecification.SubstanceSpecification, fhirclient.models.supplydelivery.SupplyDelivery, fhirclient.models.supplyrequest.SupplyRequest, fhirclient.models.task.Task, fhirclient.models.terminologycapabilities.TerminologyCapabilities, fhirclient.models.testreport.TestReport, fhirclient.models.testscript.TestScript, fhirclient.models.valueset.ValueSet, fhirclient.models.verificationresult.VerificationResult, and fhirclient.models.visionprescription.VisionPrescription.
|
protected |
Overridden to use a factory if called when "resourceType" is defined in the JSON but does not match the receiver's resource_type.
Reimplemented from fhirclient.models.fhirabstractbase.FHIRAbstractBase.
fhirclient.models.fhirabstractresource.FHIRAbstractResource.as_json | ( | self | ) |
Serializes to JSON by inspecting elementProperties()
and creating a JSON dictionary of all registered properties.
Checks:
:raises: FHIRValidationError if properties have the wrong type or if required properties are empty
Reimplemented from fhirclient.models.fhirabstractbase.FHIRAbstractBase.
fhirclient.models.fhirabstractresource.FHIRAbstractResource.create | ( | self, | |
server | |||
) |
Attempt to create the receiver on the given server, using a POST command.
server | FHIRServer The server to create the receiver on |
fhirclient.models.fhirabstractresource.FHIRAbstractResource.createPath | ( | self | ) |
Get the endpoint on the server for creating the resource.
fhirclient.models.fhirabstractresource.FHIRAbstractResource.delete | ( | self, | |
server = None |
|||
) |
Delete the receiver from the given server with a DELETE command.
server | FHIRServer The server to update the receiver on; optional, will use the instance's server if needed. |
fhirclient.models.fhirabstractresource.FHIRAbstractResource.read | ( | cls, | |
rem_id, | |||
server | |||
) |
Read the resource with the given id from the given server.
The passed-in server instance must support a request_json()
method call, taking a relative path as first (and only mandatory) argument.
rem_id | str The id of the resource on the remote server |
server | FHIRServer An instance of a FHIR server or compatible class |
fhirclient.models.fhirabstractresource.FHIRAbstractResource.read_from | ( | cls, | |
path, | |||
server | |||
) |
Requests data from the given REST path on the server and creates an instance of the receiving class.
path | str The REST path to read from |
server | FHIRServer An instance of a FHIR server or compatible class |
fhirclient.models.fhirabstractresource.FHIRAbstractResource.relativeBase | ( | self | ) |
fhirclient.models.fhirabstractresource.FHIRAbstractResource.relativePath | ( | self | ) |
fhirclient.models.fhirabstractresource.FHIRAbstractResource.search | ( | self, | |
struct = None |
|||
) |
Search can be started via a dictionary containing a search construct.
Calling this method with a search struct will return a FHIRSearch
object representing the search struct, with "$type" and "id" added.
struct | dict An optional search structure |
fhirclient.models.fhirabstractresource.FHIRAbstractResource.update | ( | self, | |
server = None |
|||
) |
Update the receiver's representation on the given server, issuing a PUT command.
server | FHIRServer The server to update the receiver on; optional, will use the instance's server if needed. |
fhirclient.models.fhirabstractresource.FHIRAbstractResource.where | ( | cls, | |
struct | |||
) |
Search can be started via a dictionary containing a search construct.
Calling this method with a search struct will return a FHIRSearch
object representing the search struct
struct | dict A search structure |
|
protected |
fhirclient.models.fhirabstractresource.FHIRAbstractResource.id |
|
static |
fhirclient.models.fhirabstractresource.FHIRAbstractResource.resource_type |
|
static |
Walks the owner hierarchy until it finds an owner with a server.