use of org.hl7.fhir.r4b.model.OperationOutcome in project openmrs-module-fhir2 by openmrs.
the class MedicationRequestFhirResourceProviderTest method deleteTask_shouldDeleteMedicationRequest.
@Test
public void deleteTask_shouldDeleteMedicationRequest() {
when(fhirMedicationRequestService.delete(MEDICATION_REQUEST_UUID)).thenReturn(medicationRequest);
OperationOutcome result = resourceProvider.deleteMedicationRequest(new IdType().setValue(MEDICATION_REQUEST_UUID));
assertThat(result, notNullValue());
assertThat(result.getIssue(), notNullValue());
assertThat(result.getIssueFirstRep().getSeverity(), equalTo(OperationOutcome.IssueSeverity.INFORMATION));
assertThat(result.getIssueFirstRep().getDetails().getCodingFirstRep().getCode(), equalTo("MSG_DELETED"));
}
use of org.hl7.fhir.r4b.model.OperationOutcome in project openmrs-module-fhir2 by openmrs.
the class ObservationFhirResourceProviderTest method deleteObservation_shouldDeleteObservation.
@Test
public void deleteObservation_shouldDeleteObservation() {
when(observationService.delete(OBSERVATION_UUID)).thenReturn(observation);
OperationOutcome result = resourceProvider.deleteObservationResource(new IdType().setValue(OBSERVATION_UUID));
assertThat(result, notNullValue());
assertThat(result.getIssue(), notNullValue());
assertThat(result.getIssueFirstRep().getSeverity(), equalTo(OperationOutcome.IssueSeverity.INFORMATION));
assertThat(result.getIssueFirstRep().getDetails().getCodingFirstRep().getCode(), equalTo("MSG_DELETED"));
}
use of org.hl7.fhir.r4b.model.OperationOutcome in project openmrs-module-fhir2 by openmrs.
the class PersonFhirResourceProviderTest method deletePerson_shouldDeletePerson.
@Test
public void deletePerson_shouldDeletePerson() {
when(fhirPersonService.delete(PERSON_UUID)).thenReturn(person);
OperationOutcome result = resourceProvider.deletePerson(new IdType().setValue(PERSON_UUID));
assertThat(result, notNullValue());
assertThat(result.getIssueFirstRep().getSeverity(), equalTo(OperationOutcome.IssueSeverity.INFORMATION));
assertThat(result.getIssueFirstRep().getDetails().getCodingFirstRep().getCode(), equalTo("MSG_DELETED"));
assertThat(result.getIssueFirstRep().getDetails().getCodingFirstRep().getDisplay(), equalTo("This resource has been deleted"));
}
use of org.hl7.fhir.r4b.model.OperationOutcome in project openmrs-module-fhir2 by openmrs.
the class MedicationRequestFhirResourceProviderTest method deleteMedicationRequest_shouldDeleteMedicationRequest.
@Test
public void deleteMedicationRequest_shouldDeleteMedicationRequest() {
when(fhirMedicationRequestService.delete(MEDICATION_REQUEST_UUID)).thenReturn(medicationRequest);
OperationOutcome result = resourceProvider.deleteMedicationRequest(new IdType().setValue(MEDICATION_REQUEST_UUID));
assertThat(result, notNullValue());
assertThat(result.getIssue(), notNullValue());
assertThat(result.getIssueFirstRep().getSeverity(), equalTo(OperationOutcome.IssueSeverity.INFORMATION));
assertThat(result.getIssueFirstRep().getDetails().getCodingFirstRep().getCode(), equalTo("MSG_DELETED"));
}
use of org.hl7.fhir.r4b.model.OperationOutcome in project openmrs-module-fhir2 by openmrs.
the class PatientFhirResourceProviderTest method deletePatient_shouldDeleteRequestedPatient.
@Test
public void deletePatient_shouldDeleteRequestedPatient() {
when(patientService.delete(PATIENT_UUID)).thenReturn(patient);
OperationOutcome result = patientFhirResourceProvider.deletePatient(new IdType().setValue(PATIENT_UUID));
assertThat(result, notNullValue());
assertThat(result.getIssue(), notNullValue());
assertThat(result.getIssueFirstRep().getSeverity(), equalTo(OperationOutcome.IssueSeverity.INFORMATION));
assertThat(result.getIssueFirstRep().getDetails().getCodingFirstRep().getCode(), equalTo("MSG_DELETED"));
assertThat(result.getIssueFirstRep().getDetails().getCodingFirstRep().getDisplay(), equalTo("This resource has been deleted"));
}
Aggregations