Read JSON and Cast to FHIR Type
- 12 Aug 2024
- 1 Minute to read
- Print
- DarkLight
Read JSON and Cast to FHIR Type
- Updated on 12 Aug 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 | 9.2.0 |
Location | Integration > FHIR |
The Read JSON and Cast to FHIR Type step casts a JSON formatted string to a specified FHIR Type.
Prerequisites
This step requires the FHIR Module to be installed before it will be available in the Toolbox.
In version 9 a dependency to the module must be created in a Project for the steps to be visible.
Properties
Settings
Property | Description | Data Type |
---|---|---|
FHIRTypeName | Defines the FHIR Type to cast JSON string. | --- |
Inputs
Property | Description | Data Type |
---|---|---|
FHIR Resource JSON | JSON formatted string. | String |
Common Errors
Invalid JSON Encountered
If the JSON string is not correctly formatted or empty, the step will cause an error.
To correct this, ensure that the JSON string is valid and mapped or entered correctly.
Exception Message:
Exception Stack Trace: DecisionsFramework.Design.Flow.ErrorRunningFlowStep: Error running step Read JSON and Cast to FHIR Type 1[ReadResourceFromJSONAsType] in flow [FHIR]: Invalid Json encountered. Details: Error reading JObject from JsonReader. Path '', line 0, position 0.
---> System.FormatException: Invalid Json encountered. Details: Error reading JObject from JsonReader. Path '', line 0, position 0.
---> Newtonsoft.Json.JsonReaderException: Error reading JObject from JsonReader. Path '', line 0, position 0. 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
at Decisions.FHIR.FlowSteps.ReadResourceFromJSONAsType.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 ---
Feature Changes
Description | Version | Release Date | Developer Task |
---|---|---|---|
Change in types used by the step. | 9.2 | August 12, 2024 | DT-041549 |
Was this article helpful?