Read Bundle from JSONData
  • 04 Apr 2024
  • 1 Minute to read
  • Dark
    Light

Read Bundle from JSONData

  • Dark
    Light

Article summary

Step Details

Introduced in Version4.0.0
Last Modified in Version7.1.0
LocationIntegration > FHIR

The Read Bundle From JSONData step takes in a JSON formatted string and outputs a Bundle.

Prerequisites 

This step requires the FHIR Module to be installed before it will be available in the Toolbox. 


Properties

Inputs

PropertyDescriptionData Type
JSON FHIRDataA JSON string formatted as an FHIR Bundle.String

Outputs

PropertyDescriptionData Type
OutputFHIR Bundle.Bundle

Example Inputs and Outputs

InputOutput
{"resourceType": "Bundle", "type": "transaction", "entry": [  {        "resource": {  "resourceType": "Patient", "name": [   {  "family": "Smith",  "given": [  "Darcy" ]  }  ], "gender": "female",          "birthDate": "2000-12-25", "address": [   {   "line": [                "123 Main St." ],  "city": "Anycity",   "state": "CA", "postalCode": "12345"   }  ] }, "request": {"method": "POST"  } },  {  "request": {          "method": "DELETE",   "url": "Patient/1234567890" } }]  }
FHIR Bundle
'{"name":"John", "age":30, "car":null}'
EXCEPTION MESSAGE
NullEXCEPTION MESSAGE
EmptyEXCEPTION MESSAGE


Common Errors

Invalid JSON Encountered

If the JSON string is not correctly formatted as JSON, the step will cause an error.

To correct this, ensure that the input value is valid JSON string.

Exception Message:

Exception Stack Trace: DecisionsFramework.Design.Flow.ErrorRunningFlowStep: Error running step Read Bundle From JSONData 1[ReadBundleFromJSONData] in flow [FHIR]: Exception invoking method ReadBundleFromJSONData on class FHIRDeserializeSteps
 ---> DecisionsFramework.LoggedException: Exception invoking method ReadBundleFromJSONData on class FHIRDeserializeSteps
 ---> System.FormatException: Invalid Json encountered. Details: Error reading JObject from JsonReader. Current JsonReader item is not an object: String. Path '', line 1, position 39.
 ---> Newtonsoft.Json.JsonReaderException: Error reading JObject from JsonReader. Current JsonReader item is not an object: String. Path '', line 1, position 39. at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings
 at Hl7.Fhir.Utility.SerializationUtil.JObjectFromReader(JsonReader reader)
   --- End of inner exception stack trace --- at Hl7.Fhir.Utility.SerializationUtil.JObjectFromReader(JsonReader reader
 at Hl7.Fhir.Serialization.FhirJsonNode.Read(JsonReader reader, String rootName, FhirJsonParsingSettings settings
 at Hl7.Fhir.Serialization.FhirJsonParser.Parse(JsonReader reader, Type dataType
 at Hl7.Fhir.Serialization.FhirJsonParser.Parse[T](JsonReader reader
 at Decisions.FHIR.FlowSteps.FHIRDeserializeSteps.ReadBundleFromJSONData(String jsonFHIRData)
   --- End of inner exception stack trace --- at DecisionsFramework.Design.Flow.StepImplementations.InvokeMethodStep.Run(StepStartData data
 at DecisionsFramework.Design.Flow.FlowStep.RunStepInternal(String flowTrackingID, String stepTrackingID, KeyValuePairDataStructure[] stepRunDataValues, AbstractFlowTrackingData trackingData
 at DecisionsFramework.Design.Flow.FlowStep.Start(String flowTrackingID, String stepTrackingID, FlowStateData data, AbstractFlowTrackingData trackingData, RunningStepData currentStepData)
   --- End of inner exception stack trace ---



Was this article helpful?