use of org.hl7.fhir.r5.model.OperationOutcome in project openmrs-module-fhir2 by openmrs.
the class GroupFhirResourceProviderTest method shouldDeleteRequestedGroup.
@Test
public void shouldDeleteRequestedGroup() {
when(fhirGroupService.delete(COHORT_UUID)).thenReturn(group);
OperationOutcome result = resourceProvider.deleteGroup(new IdType().setValue(COHORT_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.r5.model.OperationOutcome in project openmrs-module-fhir2 by openmrs.
the class EncounterFhirResourceProviderTest method deleteEncounter_shouldDeleteRequestedEncounter.
@Test
public void deleteEncounter_shouldDeleteRequestedEncounter() {
when(encounterService.delete(ENCOUNTER_UUID)).thenReturn(encounter);
OperationOutcome result = resourceProvider.deleteEncounter(new IdType().setValue(ENCOUNTER_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.r5.model.OperationOutcome in project openmrs-module-fhir2 by openmrs.
the class GroupFhirResourceProviderTest method shouldDeleteRequestedGroup.
@Test
public void shouldDeleteRequestedGroup() {
when(fhirGroupService.delete(COHORT_UUID)).thenReturn(group);
OperationOutcome result = resourceProvider.deleteGroup(new IdType().setValue(COHORT_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.r5.model.OperationOutcome in project openmrs-module-fhir2 by openmrs.
the class ProcedureRequestFhirResourceProviderTest method deleteProcedureRequest_shouldDeleteProcedureRequest.
@Test
public void deleteProcedureRequest_shouldDeleteProcedureRequest() {
when(serviceRequestService.delete(SERVICE_REQUEST_UUID)).thenReturn(serviceRequest);
OperationOutcome result = resourceProvider.deleteProcedureRequest(new IdType().setValue(SERVICE_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"));
assertThat(result.getIssueFirstRep().getDetails().getCodingFirstRep().getDisplay(), equalTo("This resource has been deleted"));
}
use of org.hl7.fhir.r5.model.OperationOutcome in project openmrs-module-fhir2 by openmrs.
the class TaskFhirResourceProviderTest method deleteTask_shouldDeleteRequestedTask.
@Test
public void deleteTask_shouldDeleteRequestedTask() {
when(taskService.delete(TASK_UUID)).thenReturn(task);
OperationOutcome result = resourceProvider.deleteTask(new IdType().setValue(TASK_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"));
}
Aggregations