// wdev-13343 public ims.dto.client.Patient getPatient(String pid, String identifier) throws DomainInterfaceException { ims.dto.client.Patient patient = (ims.dto.client.Patient) getDTOInstance(ims.dto.client.Patient.class); patient.Filter.clear(); if (pid != null && pid.equals("-549")) patient.Filter.Nhsn = identifier; else patient.Filter.Hospnum = identifier; Result result = patient.get(); if (result != null) { throw new DomainInterfaceException(result.getMessage()); } return patient; }
// wdev-13343 public ims.dto.client.Patient getCCODTOPatient(String pkey) throws DomainInterfaceException { if (pkey == null) throw new DomainRuntimeException("Cannot get Patient for null pkey"); ims.dto.client.Patient patient = (ims.dto.client.Patient) getDTOInstance(ims.dto.client.Patient.class); patient.Filter.clear(); patient.Filter.Pkey = pkey; Result result = patient.get(); if (result != null) { if (result.getId() == -2) throw new DomainInterfaceException("Error Getting Patient Details for pkey = " + pkey); throw new DomainInterfaceException(result.getMessage()); } if (patient.DataCollection.count() != 1) throw new DomainInterfaceException("Failed to get patient record."); return patient; }