Search in sources :

Example 21 with Media

use of org.hl7.fhir.r4.model.Media in project nia-patient-switching-standard-adaptor by NHSDigital.

the class OperationOutcomeExceptionHandler method handleHttpMediaTypeNotSupported.

@Override
protected ResponseEntity<Object> handleHttpMediaTypeNotSupported(HttpMediaTypeNotSupportedException ex, HttpHeaders requestHeaders, HttpStatus status, WebRequest request) {
    CodeableConcept details = CodeableConceptUtils.createCodeableConcept("UNSUPPORTED_MEDIA_TYPE", ISSUE_SYSTEM, "Unsupported media " + "type", null);
    OperationOutcome operationOutcome = createOperationOutcome(NOTSUPPORTED, ERROR, details, ex.getMessage());
    return errorResponse(requestHeaders, status, operationOutcome);
}
Also used : OperationOutcome(org.hl7.fhir.dstu3.model.OperationOutcome) OperationOutcomeUtils.createOperationOutcome(uk.nhs.adaptors.pss.gpc.util.fhir.OperationOutcomeUtils.createOperationOutcome) CodeableConcept(org.hl7.fhir.dstu3.model.CodeableConcept)

Aggregations

FhirContext (ca.uhn.fhir.context.FhirContext)4 Complex (org.hl7.fhir.r4.utils.formats.Turtle.Complex)4 XhtmlNode (org.hl7.fhir.utilities.xhtml.XhtmlNode)4 Attachment (org.mitre.synthea.engine.Components.Attachment)4 Person (org.mitre.synthea.world.agents.Person)4 Provider (org.mitre.synthea.world.agents.Provider)4 HealthRecord (org.mitre.synthea.world.concepts.HealthRecord)4 CarePlan (org.mitre.synthea.world.concepts.HealthRecord.CarePlan)4 Encounter (org.mitre.synthea.world.concepts.HealthRecord.Encounter)4 ImagingStudy (org.mitre.synthea.world.concepts.HealthRecord.ImagingStudy)4 Medication (org.mitre.synthea.world.concepts.HealthRecord.Medication)4 Observation (org.mitre.synthea.world.concepts.HealthRecord.Observation)4 Procedure (org.mitre.synthea.world.concepts.HealthRecord.Procedure)4 Report (org.mitre.synthea.world.concepts.HealthRecord.Report)4 IOException (java.io.IOException)3 ArrayList (java.util.ArrayList)3 Bundle (org.hl7.fhir.dstu3.model.Bundle)3 BundleEntryComponent (org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent)3 XhtmlComposer (org.hl7.fhir.utilities.xhtml.XhtmlComposer)3 HashBasedTable (com.google.common.collect.HashBasedTable)2