Reading Resources
Read Resource By ID
To read a resource, you will need its FHIR ID. You can then use the Plasma FHIR Client to read any resource with that ID. Note that responses are strongly typed.
observation = plasma.read_resource("Observation", fhirId)
To read a patient, you can also use the following shortcut method.
patient = plasma.read_patient(patientId);
Reading Resource History
To read a resource's history, you can either get all history or a single version.
Read Full History
Reading the full history will return an array of that resource.
allHistory = plasma.read_all_history("Observation", fhirId);
Read Single Version of History
To read a single version of a resource's history, pass in the version number as a string. In the example below, we are reading version 3
of the Obersvation resource.
singleHistory = plasma.read_history_by_version("Observation", fhirId, "3");