Class FhirCodec

java.lang.Object
de.gematik.bbriccs.fhir.codec.FhirCodec

public class FhirCodec extends Object
  • Constructor Details

    • FhirCodec

      protected FhirCodec(ca.uhn.fhir.context.FhirContext ctx, ValidatorFhir validator)
  • Method Details

    • encode

      public String encode(org.hl7.fhir.instance.model.api.IBaseResource resource, EncodingType encoding)
    • encode

      public String encode(org.hl7.fhir.instance.model.api.IBaseResource resource, EncodingType encoding, boolean prettyPrint)
    • decode

      public <T extends org.hl7.fhir.r4.model.Resource> T decode(Class<T> expectedClass, String content)
    • decode

      public <T extends org.hl7.fhir.r4.model.Resource> T decode(Class<T> expectedClass, String content, EncodingType encoding)
    • decode

      public org.hl7.fhir.r4.model.Resource decode(String content)
    • decode

      public org.hl7.fhir.r4.model.Resource decode(String content, EncodingType encoding)
      This method will decode the content to base resource without returning the concrete type of the resource. Whenever the expected type of the concrete resource is known, it is recommended to use the decode-variant with type expectation
      Parameters:
      content - to be decoded to a FHIR-Resource
      encoding - type of content
      Returns:
      decoded base FHIR-Resource
    • forR4

      public static FhirCodec.FhirCodecBuilder forR4()