Sorry for asking a really basic question.
I want to implement a FHIR client to send a immunization resource request.
Can i send all the information like patient and location in the same request , rather than sending patient and location first and then immunization?
You could send all 3 resources in a transaction (if you actually wanted to create all 3). If what you really want to happen is to have the receiving system use the data in Patient and Location resources to match their local records, then you have a few choices:
If you want to stick with pure REST (and work with the existing APIs of most systems), then you’ll need to make separate calls - first to look up/match the existing Patient and Location records in the target system (possibly using the $patient-match operation) and determining the resource ids of each on the target system, then POSTing the new Immunization instance to the target system, referencing the appropriate resource ids for Patient, Location (and Practitioner and whatever else)
You could define a custom operation that takes all 3 resources and executes the desired behavior in a single call. However, all the systems involved would have to write custom code to support that operation
You could define a custom message that takes all 3 resources and executes the desired behavior in a single call. As with option 2, all systems involved would have to write custom code to support that message.