Package ca.cdr.api.pub.hl7v2.out
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 Summary
ConstructorDescriptionConversionContext
(ca.uhn.fhir.jpa.subscription.model.CanonicalSubscription theSubscription, IBaseResource theFocalResource, IHl7V2OutboundMapperSvc theHl7V2OutboundMapperSvc, ca.uhn.fhir.jpa.api.dao.DaoRegistry theDaoRegistry) Constructor -
Method Summary
Modifier and TypeMethodDescriptionca.uhn.fhir.jpa.subscription.model.CanonicalSubscription
<T extends IBaseResource>
TresolveFirstResourceFromMessageHeaderFocus
(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.<T extends IBaseResource>
TresolveResource
(IIdType theResourceId) This method may be used to resolve a resource from storage
-
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
- Returns:
- The FHIR subscription which triggered this action
-
getFocalResource
- Returns:
- The resource which triggered the Subscription and caused this conversion
-
resolveResource
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.classtheMessageHeader
- The MessageHeader resource to search
-