Class IHl7V2OutboundCustomMapper.ConversionContext

java.lang.Object
ca.cdr.api.pub.hl7v2.out.IHl7V2OutboundCustomMapper.ConversionContext
Enclosing interface:
IHl7V2OutboundCustomMapper

This class contains parameters for the IHl7V2OutboundCustomMapper.ConversionContext method.
  • Constructor Details

    • ConversionContext

      public ConversionContext(ca.uhn.fhir.jpa.subscription.model.CanonicalSubscription theSubscription, IBaseResource theFocalResource, IHl7V2OutboundMapperSvc theHl7V2OutboundMapperSvc, ca.uhn.fhir.jpa.api.dao.DaoRegistry theDaoRegistry)
      Constructor
  • Method Details

    • getHl7V2OutboundMapperSvc

      Returns:
      The outbound mapper service, which is used to create MappingTarget instances, and can be used to apply Smile CDR default segment or message mappings.
    • getSubscription

      public ca.uhn.fhir.jpa.subscription.model.CanonicalSubscription getSubscription()
      Returns:
      The FHIR subscription which triggered this action
    • getFocalResource

      Returns:
      The resource which triggered the Subscription and caused this conversion
    • resolveResource

      public <T extends IBaseResource> T resolveResource(IIdType theResourceId)
      This method may be used to resolve a resource from storage
    • resolveFirstResourceFromMessageHeaderFocus

      public <T extends IBaseResource> T resolveFirstResourceFromMessageHeaderFocus(Class<T> theResourceType, IBaseResource theMessageHeader)
      Given a MessageHeader resource in theMessageHeader, searches all repetitions of MessageHeader.focus for references to resource of type theResourceType, then resolves and returns the first.
      Parameters:
      theResourceType - The target resource type to search for, e.g. Patient.class
      theMessageHeader - The MessageHeader resource to search