Reputation: 11
I have created a Patient resource and serialized to a string using Java Jackson JSON to below string:
{"xmlId":null,"extensions":[],"modifierExtensions":[],"text":null,"language":null,"contained":[],"identifier":[{"xmlId":null,"extensions":[],"use":null,"label":{"xmlId":null,"extensions":[],"value":"MRN"},"system":{"xmlId":null,"extensions":[],"value":"urn:oid:1.2.3.4.5.1000"},"value":{"xmlId":null,"extensions":[],"value":"50000160"},"period":null,"assigner":null,"useSimple":null,"systemSimple":"urn:oid:1.2.3.4.5.1000","valueSimple":"50000160","labelSimple":"MRN"},{"xmlId":null,"extensions":[],"use":null,"label":{"xmlId":null,"extensions":[],"value":"MRN"},"system":{"xmlId":null,"extensions":[],"value":"urn:oid:1.3.6.1.4.1.21367.2010.1.2.600"},"value":{"xmlId":null,"extensions":[],"value":"1000000002"},"period":null,"assigner":null,"useSimple":null,"systemSimple":"urn:oid:1.3.6.1.4.1.21367.2010.1.2.600","valueSimple":"1000000002","labelSimple":"MRN"}],"name":[{"xmlId":null,"extensions":[],"use":null,"text":null,"family":[{"xmlId":null,"extensions":[],"value":"ill"}],"given":[{"xmlId":null,"extensions":[],"value":"Very"}],"prefix":[{"xmlId":null,"extensions":[],"value":null}],"suffix":[],"period":null,"useSimple":null,"textSimple":null}],"telecom":[],"gender":{"xmlId":null,"extensions":[],"coding":[{"xmlId":null,"extensions":[],"system":{"xmlId":null,"extensions":[],"value":"http://hl7.org/fhir/v3/MaritalStatus"},"version":null,"code":{"xmlId":null,"extensions":[],"value":null},"display":null,"primary":null,"valueSet":null,"versionSimple":null,"primarySimple":false,"codeSimple":null,"displaySimple":null,"systemSimple":"http://hl7.org/fhir/v3/MaritalStatus"},{"xmlId":null,"extensions":[],"system":null,"version":null,"code":null,"display":null,"primary":null,"valueSet":null,"versionSimple":null,"primarySimple":false,"codeSimple":null,"displaySimple":null,"systemSimple":null}],"text":null,"textSimple":null},"birthDate":{"xmlId":null,"extensions":[],"value":{"year":1980,"month":1,"day":1,"time":false,"hour":0,"minute":0,"seconds":false,"second":0,"fractions":0,"fraction":0,"timezone":null,"tzHour":0,"tzMin":0}},"deceased":null,"address":[],"maritalStatus":{"xmlId":null,"extensions":[],"coding":[],"text":null,"textSimple":null},"multipleBirth":null,"photo":[],"contact":[],"animal":null,"communication":[],"careProvider":[],"managingOrganization":null,"link":[],"active":null,"resourceType":"Patient","activeSimple":false,"birthDateSimple":{"year":1980,"month":1,"day":1,"time":false,"hour":0,"minute":0,"seconds":false,"second":0,"fractions":0,"fraction":0,"timezone":null,"tzHour":0,"tzMin":0},"languageSimple":null}
When I use .Net client to deserialize it to Patient object, it fails with below error:
{"Error reading string. Unexpected token: StartObject. Path 'identifier[0].label', line 1, position 161."
Could you please help what is the exact issue here?
Thanks, Trivedi
Upvotes: 1
Views: 1422
Reputation: 3586
There's various errors in this example - you should compare with the example here: http://hl7.org/implement/standards/fhir/patient-example.json.html, or see the base specification here: http://hl7.org/implement/standards/fhir/json.html
Upvotes: 0