Read Resource From Json
- 04 Apr 2024
- 1 Minute to read
- Print
- DarkLight
Read Resource From Json
- Updated on 04 Apr 2024
- 1 Minute to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
Step Details | |
Introduced in Version | 4.0.0 |
Last Modified in Version | 7.12.0 |
Location | Integration > FHIR |
Prerequisite | Installation of the FHIR Module |
The Read Resource From JSON step uses a JSON formatted string and outputs an FHIR Resource
Properties
Inputs
Property | Description | Data Type |
---|---|---|
Json FHIRData | The desired JSON string. | String |
Outputs
Property | Description | Data Type |
---|---|---|
Output | Outputs the string as a Resource Object. | --- |
Example Inputs and Outputs
Json FHIRData | Output |
---|---|
{"id":"example","resourceType":"Account","text":{"div":"<div>[Put rendering here]</div>","status":"generated"}} | List of Resource data |
"id":"example","resourceType":"Account","text":{"div":"<div>[Put rendering here]</div>","status":"generated | EXCEPTION MESSAGE |
Null | EXCEPTION MESSAGE |
Empty | EXCEPTION MESSAGE |
Common Errors
Invalid JSON Encountered
If the input string is not a correctly formatted JSON string, the step will cause an error.
To correct this, ensure that the JSON string is properly formatted into an FHIR Resource.
Exception Message:
Exception Stack Trace: DecisionsFramework.Design.Flow.ErrorRunningFlowStep: Error running step Read Resource From Json 1[ReadResourceFromJson] in flow [Flow 8]: Exception invoking method ReadResourceFromJson on class FHIRDeserializeSteps
---> DecisionsFramework.LoggedException: Exception invoking method ReadResourceFromJson on class FHIRDeserializeSteps
---> System.FormatException: Invalid Json encountered. Details: Unterminated string. Expected delimiter: ". Path 'id', line 1, position 12.
---> Newtonsoft.Json.JsonReaderException: Unterminated string. Expected delimiter: ". Path 'id', line 1, position 12. at Newtonsoft.Json.JsonTextReader.ReadStringIntoBuffer(Char quote
at Newtonsoft.Json.JsonTextReader.ParseValue(
at Newtonsoft.Json.Linq.JContainer.ReadContentFrom(JsonReader r, JsonLoadSettings settings
at Newtonsoft.Json.Linq.JContainer.ReadTokenFrom(JsonReader reader, JsonLoadSettings options
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.FhirJsonNode.Parse(String json, String rootName, FhirJsonParsingSettings settings
at Hl7.Fhir.Serialization.FhirJsonParser.Parse(String json, Type dataType
at Hl7.Fhir.Serialization.FhirJsonParser.Parse[T](String json
at Decisions.FHIR.FlowSteps.FHIRDeserializeSteps.ReadResourceFromJson(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?