0

我创建了一个 Patient 资源并使用 Java Jackson JSON 将其序列化为以下字符串:

{"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"} ,"句点":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":空,“扩展”:[],“值”:“生病”}],“给定”:[{“xmlId":null,"extensions":[],"value":"Very"}],"prefix":[{"xmlId":null,"extensions":[],"value":null}]," suffix":[],"period":null,"useSimple":null,"textSimple":null}],"telecom":[],"gender":{"xmlId":null,"extensions":[] ,"编码":[{"xmlId":null,"extensions":[],"system":{"xmlId":null,"extensions":[],"value":"xmlId":null,"extensions":[],"coding":[{"xmlId":null,"extensions":[],"system":{"xmlId":null,"extensions":[],"价值”:”xmlId":null,"extensions":[],"coding":[{"xmlId":null,"extensions":[],"system":{"xmlId":null,"extensions":[],"价值”:”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 ,"分":0,"秒":false,"秒":0,"分数":0,"分数":0,"时区":null,"tzHour":0,"tzMin":0}} ,"已故":null,"地址":[],"maritalStatus":{"xmlId":null,"extensions":[],"coding":[],"text":null,"textSimple":null},"multipleBirth":null,"photo":[], "contact":[],"animal":null,"communication":[],"careProvider":[],"managingOrganization":null,"link":[],"active":null,"resourceType": "病人","activeSimple":false,"birthDateSimple":{"year":1980,"month":1,"day":1,"time":false,"hour":0,"minute":0 ,"秒":false,"秒":0,"分数":0,"分数":0,"时区":null,"tzHour":0,"tzMin":0},"languageSimple":null}"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,"分数":0,"时区":null,"tzHour":0,"tzMin":0},"languageSimple":null}"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,"分数":0,"时区":null,"tzHour":0,"tzMin":0},"languageSimple":null}联系人":[],"动物":null,"通信":[],"careProvider":[],"managingOrganization":null,"link":[],"active":null,"resourceType":"患者","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}联系人":[],"动物":null,"通信":[],"careProvider":[],"managingOrganization":null,"link":[],"active":null,"resourceType":"患者","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}"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}"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}

当我使用 .Net 客户端将其反序列化为 Patient 对象时,它失败并出现以下错误:

{“读取字符串时出错。意外的标记:StartObject。路径 'identifier[0].label',第 1 行,位置 161。”

你能帮忙看看这里的确切问题是什么吗?

谢谢, 特里维迪

4

1 回答 1

0

此示例中存在各种错误 - 您应该与此处的示例进行比较:http: //hl7.org/implement/standards/fhir/patient-example.json.html,或查看基本规范:http://hl7。 org/implement/standards/fhir/json.html

于 2014-07-31T21:24:11.217 回答