【发布时间】:2016-06-21 07:46:15
【问题描述】:
我正在使用 Hapi FHIR DSTU2 HL7Org。在我的应用程序中,我需要创建一个 MedicationOrder 并提供更新/删除错误条目的可能性。我有创建的 MedicationOrder 的 id、patientId 等,但是用 where 子句编写代码是很成问题的。在我见过的所有例子中,像
这样的条目where(Patient.FAMILY.matches().value("duck")
礼物,但我得到 SP_PATIENT、SP_STATUS 等。
FhirContext ctx = FhirContext.forDstu2Hl7Org();
IGenericClient client = ctx.newRestfulGenericClient("http://fhirtest.uhn.ca/baseDstu2");
Bundle bundle = client.search().forResource(MedicationOrder.class).where(MedicationOrder.SP_PATIENT.equals("patientId")).returnBundle(Bundle.class).encodedXml().prettyPrint().execute();
上面的代码没有编译说“IQuery 类型中的方法 where(ICriterion) 不适用于参数 (boolean)”。我无法创建任何 IQuery 对象。
有人可以指导我如何进行吗?
【问题讨论】:
标签: java hl7-fhir hapi dstu2-fhir