1
我正在創建提供唯一標識符的FHIR MedicationOrder資源。刪除這些MedicationOrders時,我想通過此標識符執行條件刪除。下面是我用通過FHIR DSTU2中的標識符刪除MedicationOrder HL7
getClient().delete().resourceConditionalByUrl("MedicationOrder?identifier=systemValue%7CuniqueId").encodedXml().execute();
的代碼,但此方法返回一個ClassCastException:
java.lang.ClassCastException: org.hl7.fhir.instance.model.OperationOutcome cannot be cast to ca.uhn.fhir.model.base.resource.BaseOperationOutcome
我試圖明確使用HttpDelete,但隨後它發送一個ClientProtocol例外說HttpDelete不被支持,即使它在FHIR內部使用。
有人可以幫忙嗎?由於我們的客戶想要使用DSTU2 HL7版本,所以我也不能與DSTU2混合使用。
我認爲你使用的是HAPI?你能否提供HAPI版本 –
是@GrahameGrieve,它的hapi-fhir-base 1.2和hapi-fhir-structures-hl7org-dstu2 1.2 –