Observation Resource Implementation information

Dear Sir/Madam,
I am new in the FHIR domain and wanna to create sample FHIR observation resource with multiple instances, however, I don’t know how to create multiple instances under single observation resource. For example, I have three OBX segments having the following mess data,
a.OBX1 Height : ( body height, 177 cm, , )
b. OBX2 Weight (body weight, 80kg, ,)
c. OBX3 Blood Type (Blood type, A+ , ,)

I created the observation resource and put the height information in “valueQuantity” element, its work fine. However, I don’t know how to put the remaining the other two OBX segments information.
I am asking does it possible to put multiple instances in the same observation resource, if yes, then how, OR I need to create a separate observation resource for each OBX segment.
I would be so thankful if you anyone here guide me.
Thanks,

You need to create three distinct Observations. If you wish, you can create a 4th Observation that groups the 3 other observations into a ‘panel’ using Observation.hasMember.
In FHIR, every ‘statement’ that can be made and used independently is put into its own separate instance. However, that doesn’t mean every OBX will be a separate instance. Sometimes multiple OBXs are sent to convey a single report value. Sometimes multiple OBXs will represents parts of a single Observation (e.g. different parts of an APGAR or the systolic and diastolic values for a blood pressure). As a result, your rules for when to create one Observation with multiple components and when to create separate observations and when to create separate observations with a grouping ‘panel’ Observation will need to be driven by the type of OBX.

Dear Sir,
Thanks for your valuable information and advise. Your advise and guidance is impressive. I would like to request one think more. I want to combine observation resource with patient resource as well, mean to make bundle resource. I have patient information and lab result information that I mentioned in my previous message. I want to make Bundle resource and combine PATIENT resource and Observation in one bundle.
Does it possible that I make patient resource and for Observation resources(with multiple OBX segments) make various instance for each OBX segment data and put these two resources in bundle recourse.
Please guide me.

“In FHIR, every ‘statement’ that can be made and used independently is put into its own separate instance.”
Do you mean in HL7 v2 message, every segment put into its separate instance, mean separate resource. In simple word for every segment, we have to create a separate FHIR resource. Also, if we have a multiple segments of the same type like OBX (more than 1) the we have to create multiple observation resources for it. Am I right?
Need your advise.
Looking forward to hearing from you soon.
Thanks,
Ayaz

There are multiple types of Bundle in FHIR, each with distinct requirements. You’ll need to figure out whether you want a document, message, batch transaction or some other Bundle type. (In general, batch and transaction are most widely interoperable, and message is least.)

It’s not necessarily the case that each segment corresponds to a separate instance. As I said above, sometimes there’ll be multiple OBX segments, but they’re actually all parts of one thing and can’t be meaningful on their own. Also, some segments like NTE are frequently combined into the resource representing the thing the note is about. To figure out whether a collection of OBX segments should map into one Observation with multiple components, one parent Observation with a bunch of member Observations or a bunch of unrelated Observations requires that you look at the type of observation represented by each OBX.

Dear Sir,
Thanks for your valuable advice. I need your bit guidance, I have two type messages: One type come from patient registration IS and 2nd type message is from Lab IS. The two messages examples are bellow
Patient Registration IS
MSH|^~&|MIRTH_CONNECT|Brown-HOSPITAL|RECEIVING APP|Blue-HOSPITAL|20210830024019||ADT^A04^ACK|5230|T|2.5|||||||||
EVN|A01|20210830024019|||||
PID|||MRN015^^^Patient-~390-11-0123^^^SSN-||Allison^Charles||19600517|F|||2544 Oakridge Farm Lane^^West Bend^Wisconsin^53090^US||262-301-2633^PRN^^~AllisonWCharles@fleckens.hu^NET^^||||||||||||||||||||||||||
PV1|1|I|4E^IS^Lab^Brown Hospital||||Dr.John|||||||||||||||||||||||||||||||||||||||||||||
OBX|1|NM|^Body Height||156|cm^Centimeters^ISO+|||||F||||||||
OBX|2|NM|^Body Weight||98.8|kg^Kilogram^ISO+|||||F||||||||
OBX|3|NM|^Blood Type||B+|^^|||||F||||||||

The Lab IS message example is bellow
MSH|^~&|SendingLabX-RayLab|Brown-HOSPITAL|RECEIVINGLab:LISLab|Blue-HOSPITAL|20210830020021||ORU^R01^ORU_R01|980|T|2.5|||||||||
PID|||MRN020^^^Patient_~645-86-8351^^^SSN||Larry^West|||F|||||||||||||||||||||||||||||||
OBR|1||Order_NO_020|Test^METABOLIC: SODIUM|||20210830020021|||||||||D0020^DR.^West^Larry|||||||||||||||||||||||||||||||||
OBX|1|NM|10177-4^Hx of Respiratory disorders^LN^METABOLIC: SODIUM||142.6|mmol/L^^|||||F||||||||
I would be so thankful if you could please guide me here and share the following information,
How many resources I can create from these two type messages
I assume that

  1. Patient resource [From PID segment],
  2. Observation resource [From OBX segments],
  3. Encounter resource [From PV1 segment],
    but I don’t know about other resources that I can create from these messages data.
    Therefore, I would be so thankful, if you could please guide me

a). How to solve this problem,
b).How many total resources I can create from these two type messages
c). How these resources are connected with each other
d). How to take a start.

Note: I have a 200 messages(100 from Patient registration IS and 100 from Lab IS systems) and want to convert FHIR resources and stored in Database. I think, I need to created various resources and then put all these resources in Bundle resources(transaction), and then stored this bundle resource in Database, but I am not clear, could you please advice me here, what to do.
I would be thankful for your this help and guidance.
Thanks,
Ayaz

NOTE: I am not working on the real system transaction. My main objective is just to map this data into FHIR resources and stored in the database(FHIR server).

In that case, no need for a Bundle. Just store the resources one at a time. Only other resource would be ServiceRequest which should map from the OBR.

Dear Sir,
I don’t understand your message. I would be so thankful if you could please elaborate your message. You mean just create individual resource and stored in the database (FHIR server). Please explain.
Second, could you please answer me the above message (the long message).
Thanks an advance,
Thanks,
Ayaz

Have you looked at the Observation examples in the FHIR core spec? That’ll give you some idea of how to handle references to Patients, Encounters, etc.

I would expect the first example would give you a Patient, Encounter and 3 Observations. The ‘Dr. John’ could be a Practitioner, but given the limited data, you could just put it in Reference.display

For the lab message, you’d have a Patient, ServiceRequest and Observation.

You might also look at the v2 to FHIR mapping IG

Dear Sir,
Thanks for your valuable advice. Yes, you are right, the first example(patient registration message) we can create Patient, Encounter and 3 observations and
From the second we can create Patient, Observation and ServiceRequest.
I assume that,
Patient (from PID segment)
Observation (from OBX segments) and
ServiceRequest (from OBR segment)
Am I right, please guide me.
PS: Also, where can I see Observation examples in the FHIR core spec.
Please guide me.
You advice me in your last message, you need to put all these resources in Bundle. My personal view is that, if I put all these resources in Bundle then it would be the collection of all data from single patient and would be work like a record set in data. Also, when we stored in the database, then we can perform other operations on these resources easily. What is your advice,
Bundle would be good and easy or without bundle would be easy and good. Need your advice.
Looking forward to hearing from you soon.
Thanks,
Ayaz

You can find examples of any of the resources by going to the page for that resource in the FHIR spec and clicking on the examples tab. You will have to read the full page for each resource you’re planning to implement. You’ll also have to read about the XML or JSON syntax.

If you’re storing the information in a database, you typically won’t want the data wrapped in a Bundle. Searching will be against the individual resources, not Bundles.

Dear Sir,
Thanks for your valuable information. Really, your mentioned information really informative and will help me a lot.
You mean, I don’t need to create bundle, just create individual resource and store in the database(FHIR server).
I would be so thankful if you could please share any project (GitHub if available) as an example. It will help me a lot.
Looking forward to hearing from you soon.
Thanks,
Ayaz

Dear Sir,
Your mentioned in your message that for the lab message, you can created the following resources

  1. Patient,
  2. ServiceRequest and
  3. Observation.
    According my understanding, the Patient resources (from PID segment), Observation (from OBX segments) but I am confused about ServiceRequest resource, could you please confirm me, we have OBR segment, which resource we can created from this segment.
    Please check it and confirm it, because, I check the FHIR documentation that you shared, the ServiceRequest is created from ORC segment which is not available in this message. (ServiceRequest - FHIR v4.0.1)
    I am waiting for your message.
    Thanks,
    Ayaz

There are a number of public test servers linked to from the FHIR home page you can experiment with. There is also a link to a number of reference implementations from the downloads page.

OBR and ORC are both relevant to the ordering process.

Dear Sir,
Thanks for your message. Do you mean ServiceRequest resource is used for ORB and ORC segments data?
Second, yes, I aware about the public available server and I test some resources as well, but I mean if there is any public project code available for these resources anywhere, then please share with me, it will help me.
Looking forward to hearing from you soon.
Thanks,
Ayaz

There isn’t always a 1…1 correspondence between segment and resource. What you had in OBR is about what was ordered - which means you need ServiceRequest.

The reference implementations are open-source code.

Dear Sir,
Thanks for your message and advice. Yes, I will map OBR data to ServiceRequest resource. However, I don’t understand 1…1 correspondence between segment and resource. I would be so thankful if you could you please elaborate it a bit.
Thanks,
Ayaz

OBR has some information that might correspond to DiagnosticReport and other information that corresponds to ServiceRequest. ORC also contains information that pertains to ServiceRequest. You can’t assume that each v2 segment will correspond with a single FHIR resource (or vice versa). Have you looked at the v2 mapping implementation guide?

Dear Sir,
Thanks for your shared information. I would be so thankful if you could please guide in my bellow OBR segment, all information would be map to ServiceRequest or NOT. please let me know
OBR|1||Order_NO_020|Test^METABOLIC: SODIUM|||20210830020021|||||||||D0020^DR.^West^Larry|||||||||||||||||||||||||||||||||
Looking forward to hearing from you soon.
Thanks,
Ayaz