Skip to main content

HS.HC.IHE.XDR.Recipient.CommonProcess

persistent class HS.HC.IHE.XDR.Recipient.CommonProcess extends Ens.BusinessProcess, HS.Util.BaseHost, HS.HC.Util.Trace.Helper, HS.IHE.Common.Actor.Base, HS.Util.XSLTTransformer

SQL Table Name: HS_HC_IHE_XDR_Recipient.CommonProcess

XDR recipient process to handle inbound XDR and process as XDS, or custom processing
Define the appropriate TransactionType to determine the code flow
  • Custom - completely custom handling of the inbound request
  • XDRProvide - Add patient to the registry and submit document as a XDSb Provide and Register
  • ClinicalMessage - Add patient to the registry and create clinical message to intended recipients
  • Optionally define the Setting CustomProcessor with a class which contains the OnPre / OnPost methods (see individual methods for more information.

    Property Inventory

    Method Inventory

    Parameters

    parameter SETTINGS = CustomProcessor:Basic,TransactionType:Basic,HUB:XDRProvide,MessageTarget:Basic,MetadataTransform,FromMetadataTransform,RegisterResponseTransform;
    Inherited description: List of properties can be set as settings in the configuration file format is a comma separated list of property names

    Properties

    property FromMetadataTransform as %String (MAXLEN = 250) [ InitialExpression = "IHE/XDSb/Version1/MetadataObject-to-Message.xsl" ];
    update to meta data need to transform it back from an object to the metadata
    Property methods: FromMetadataTransformDisplayToLogical(), FromMetadataTransformGet(), FromMetadataTransformGetStored(), FromMetadataTransformIsValid(), FromMetadataTransformLogicalToDisplay(), FromMetadataTransformLogicalToOdbc(), FromMetadataTransformNormalize(), FromMetadataTransformSet()
    property HUB as Ens.DataType.ConfigName [ InitialExpression = "HUB" ];
    Used for TransactionType = XDRProvide
    Config Item where the Add/Update Operations will be sent. Send Patient updates to the Hub prior to registering the document
    Property methods: HUBDisplayToLogical(), HUBGet(), HUBGetStored(), HUBIsValid(), HUBLogicalToDisplay(), HUBLogicalToOdbc(), HUBNormalize(), HUBParseConfigNameSpec(), HUBSet()
    property MessageTarget as Ens.DataType.ConfigName;
    Config Item where the updated Message will be delivered
    TransactionType XDRProvide - HS.IHE.XDSb.Repository.Process
    TransactionType Custom - MessageTarget can be used in the custom code Set tSC = pHost.SendRequestSync(pHost.MessageTarget,Request,.Response)
    Property methods: MessageTargetDisplayToLogical(), MessageTargetGet(), MessageTargetGetStored(), MessageTargetIsValid(), MessageTargetLogicalToDisplay(), MessageTargetLogicalToOdbc(), MessageTargetNormalize(), MessageTargetParseConfigNameSpec(), MessageTargetSet()
    property MetadataTransform as %String (MAXLEN = 250) [ InitialExpression = "IHE/XDSb/Version1/Message-to-MetadataObject.xsl" ];
    Property methods: MetadataTransformDisplayToLogical(), MetadataTransformGet(), MetadataTransformGetStored(), MetadataTransformIsValid(), MetadataTransformLogicalToDisplay(), MetadataTransformLogicalToOdbc(), MetadataTransformNormalize(), MetadataTransformSet()
    property RegisterResponseTransform as %String (MAXLEN = 250) [ InitialExpression = "IHE/XDSb/Version1/RegisterResponse.xsl" ];
    Property methods: RegisterResponseTransformDisplayToLogical(), RegisterResponseTransformGet(), RegisterResponseTransformGetStored(), RegisterResponseTransformIsValid(), RegisterResponseTransformLogicalToDisplay(), RegisterResponseTransformLogicalToOdbc(), RegisterResponseTransformNormalize(), RegisterResponseTransformSet()
    property TransactionType as %Integer (DISPLAYLIST = ",XDRProvide,Custom", VALUELIST = ",0,2") [ InitialExpression = 0 ];
    Used for TransactionType = XDRProvide
    The inbound request can be filed and sent to an XDSb Repository (XDRProvide) or sent to create a Clinical Message (Clinical Message) or Custom Processing can be done (Custom)
    Property methods: TransactionTypeDisplayToLogical(), TransactionTypeGet(), TransactionTypeGetStored(), TransactionTypeIsValid(), TransactionTypeLogicalToDisplay(), TransactionTypeNormalize(), TransactionTypeSet()

    Methods

    method BuildProvideAndRegister(pRequest As HS.Message.IHE.XDSb.Metadata, Output pOutboundRequest As HS.Message.XMLMessage) as %Status
    Called by XDRProvide, take Metadata Object and build outbound message (XMLMessage)

    Optionally define customization class by setting CustomProcessor to class name and define either method
    Tracing in the methods with HSTRACECALLED, HSTRACECALLEDMIN, HSTRACECALLEDERROR ClassMethod OnPreBuildProvideAndRegister(pHost As Ens.Host , Output pStopProcessing as %Boolean, pRequest As HS.Message.IHE.XDSb.Metadata, Output pOutboundRequest As HS.Message.XMLMessage) as %Status()
  • if pStopProcessing is true processing will terminate with tSC (either ok or error)
  • Updates can be done to the metadata object prior to any additional processing, such as providing necessary missing fields
  • ClassMethod OnPostBuildProvideAndRegister(pHost As Ens.Host, pRequest As HS.Message.IHE.XDSb.Metadata, Output pOutboundRequest As HS.Message.XMLMessage) as %Status()
  • Additional processing can be done to the response, or the response itself can be updated
  • method CreateXDSbResponse(pResponse As HS.Message.XMLMessage = "", pStatus=$$$QuerySuccess) as %Status
    Create a XDSb response object as HS.Message.XMLMessage with a status of Success or Failure
    method Custom(pRequest As HS.Message.IHE.XDSb.Metadata, Output pResponse As HS.Message.XMLMessage) as %Status
    Called for TransactionType = Custom
    Creates an XDSbResponse by calling Set tSC = ..CreateXDSbResponse(.pResponse)
    Optionally define customization class by setting CustomProcessor to class name and define either method
    Tracing in the methods with HSTRACECALLED, HSTRACECALLEDMIN, HSTRACECALLEDERROR ClassMethod OnPreCustom(pHost As Ens.Host , Output pStopProcessing as %Boolean, pRequest As HS.Message.IHE.XDSb.Metadata, pResponse as HS.Message.XMLMessage) as %Status()
  • if pStopProcessing is true processing will terminate with tSC (either ok or error)
  • ClassMethod OnPostCustom(pHost As Ens.Host, pRequest as HS.Message.IHE.XDSb.Metadata, pResponse as HS.Message.XMLMessage) as %Status()
  • Additional processing can be done to the response, or the response itself can be updated
  • method DirectDeliver(pRequest As HS.Message.IHE.XDSb.Metadata, Output pResponse As HS.Message.XMLMessage) as %Status
    Only available in HealthShare
    method GetDemographics(pRequest As HS.Message.IHE.XDSb.Metadata, Output pAddUpdateHubRequest As HS.Message.AddUpdateHubRequest) as %Status
    Extract demographics from the message metadata (uses the first submission set and first document) and place into AddUpdateHubRequest message and return

    Optionally define customization class by setting CustomProcessor to class name and define either method
    Tracing in the methods with HSTRACECALLED, HSTRACECALLEDMIN, HSTRACECALLEDERROR ClassMethod OnPreGetDemographics(pHost As Ens.Host , Output pStopProcessing as %Boolean, pRequest As HS.Message.IHE.XDSb.Metadata, pAddUpdateHubRequest As HS.Message.AddUpdateHubRequest) as %Status()
  • if pStopProcessing is true processing will terminate with tSC (either ok or error)
  • Updates can be done to the metadata object prior to any additional processing, such as providing necessary missing fields
  • ClassMethod OnPostGetDemographics(pHost As Ens.Host, As HS.Message.IHE.XDSb.Metadata, Output pAddUpdateHubRequest As HS.Message.AddUpdateHubRequest) as %Status()
  • Additional processing can be done to the response, or the response itself can be updated
  • method MetadataValidate(pRequest As HS.Message.IHE.XDSb.Metadata) as %Status
    Use the Metdata object (pRequest), validate the metadata object has a good structure

    Optionally define customization class by setting CustomProcessor to class name and define either method
    Tracing in the methods with HSTRACECALLED, HSTRACECALLEDMIN, HSTRACECALLEDERROR
    ClassMethod OnPreMetadataValidate(pHost As Ens.Host , Output pStopProcessing as %Boolean, pRequest As HS.Message.IHE.XDSb.Metadata) as %Status()
  • if pStopProcessing is true processing will terminate with tSC (either ok or error). It would be possible to turn off validation by creating a OnPreMetadataValidate that set the pStopProcessing =1 and Quit with success
  • Updates can be done to the metadata object prior to any additional processing, such as providing necessary missing fields
  • ClassMethod OnPostMetadataValidate(pHost As Ens.Host, pRequest) as %Status()
  • Additional processing can be done to the response, or the response itself can be updated
  • method OnInit() as %Status
    This user callback method is called via initConfig() from %OnNew() or in the case of SOAP Services from OnPreSOAP()
    method OnRequest(pRequest As %Library.Persistent, Output pResponse As %Library.Persistent) as %Status
    Main processing of the request
    method OnResponse(pRequest As Ens.Request, ByRef pResponse As Ens.Response, pCallrequest As Ens.Request, pCallresponse As Ens.Response, pCompletionKey As %String) as %Status
    OnResponse must be overridden here to avoid error upon response from async request.
    method ProcessProvideAndRegister(pRequest As HS.Message.XMLMessage, Output pResponse As HS.Message.XMLMessage) as %Status
    Use the transaction type to determine the code path

    Optionally define customization class by setting CustomProcessor to class name and define either method

    Tracing in the methods with HSTRACECALLED, HSTRACECALLEDMIN, HSTRACECALLEDERROR
    ClassMethod OnPreProcessProvideAndRegister(pHost As Ens.Host , Output pStopProcessing as %Boolean, pInboundRequest as HS.Message.XMLMessage, pRequest As HS.Message.IHE.XDSb.Metadata,ByRef pTransactionType, Output pResponse as HS.Message.XMLMessage) as %Status()
  • if pStopProcessing is true processing will terminate with tSC (either ok or error). It would be possible to dynamically determine the transaction type by the message content by updating pTransactionType
  • Updates can be done to the metadata object prior to any additional processing, such as providing necessary missing fields
  • ClassMethod OnPostProcessProvideAndRegister(pHost As Ens.Host, pRequest) as %Status()
  • Additional processing can be done to the response, or the response itself can be updated
  • Code path is determined by TransactionType
    method UpdatePatient(pRequest As HS.Message.IHE.XDSb.Metadata, Output pAddUpdateHubRequest As HS.Message.AddUpdateHubRequest) as %Status
    Using AddUpdateHubRequest created in GetDemographics, update the patient ID with MPI ID (submission set, documents, folders)

    Optionally define customization class by setting CustomProcessor to class name and define either method
    Tracing in the methods with HSTRACECALLED, HSTRACECALLEDMIN, HSTRACECALLEDERROR ClassMethod OnPreUpdatePatient(pHost As Ens.Host , Output pStopProcessing as %Boolean, pRequest As HS.Message.IHE.XDSb.Metadata, pAddUpdateHubRequest) as %Status()
  • if pStopProcessing is true processing will terminate with tSC (either ok or error)
  • Updates can be done to the metadata object prior to any additional processing, such as providing necessary missing fields
  • ClassMethod OnPostUpdatePatient(pDummy As %Boolean, pHost As Ens.Host, pRequest As HS.Message.IHE.XDSb.Metadata, pAddUpdateHubRequest,pAddUpdateHubResponse) as %Status()
  • Additional processing can be done to the response, or the response itself can be updated
  • pDummy is present only for compatibility reasons and doesn't affect anything within UpdatePatient
  • method XDRProvide(pRequest As HS.Message.IHE.XDSb.Metadata, Output pResponse As %Library.Persistent) as %Status
    Called for TransactionType = XDRProvide
    Uses the Metdata object (pRequest) and calls
  • GetDemographics - Uses metadata to build AddUpdateHubRequest
  • UpdatePatient - Uses built AddUpdateHubRequest (from above) and submits to the registry
  • BuildProvideAndRegister - tranform the metadta object and submit to the repository

  • Optionally define customization class by setting CustomProcessor to class name and define either method
    Tracing in the methods with HSTRACECALLED, HSTRACECALLEDMIN, HSTRACECALLEDERROR ClassMethod OnPreXDRProvide(pHost As Ens.Host , Output pStopProcessing as %Boolean, pRequest As HS.Message.IHE.XDSb.Metadata, pResponse as HS.Message.XMLMessage) as %Status()
  • if pStopProcessing is true processing will terminate with tSC (either ok or error)
  • Updates can be done to the metadata object prior to any additional processing, such as providing necessary missing fields
  • ClassMethod OnPostXDRProvide(pHost As Ens.Host, pRequest As HS.Message.IHE.XDSb.Metadata, pResponse as HS.Message.XMLMessage) as %Status()
  • Additional processing can be done to the response, or the response itself can be updated
  • Inherited Members

    Inherited Properties

    Inherited Methods

    Storage

    Gray indicates storage defined by superclasses.

    Storage Model: Storage (Ens.BusinessProcess)

    ^Ens.BusinessProcessD(ID,"pending",n)
    =
    %MasterPendingResponses(n)

    Storage Model: Storage (Ens.BusinessProcess)

    ^Ens.BusinessProcessD(ID,"received",n)
    =
    %MessagesReceived(n)

    Storage Model: Storage (Ens.BusinessProcess)

    ^Ens.BusinessProcessD(ID,"sent",n)
    =
    %MessagesSent(n)

    Storage Model: Storage (Ens.BusinessProcess)

    ^Ens.BusinessProcessD(ID)
    =
    %%CLASSNAME
    %ConfigQueueName
    %IsCompleted
    %MasterPendingResponsesOld
    %PrimaryRequestHeader
    %PrimaryResponseHeader
    %RepliedStatus
    %responseId
    Adapter
    %SessionId
    %TimeCompleted
    %TimeCreated
    %ConfigName
    %QuitTask
    AlertOnError
    %responseClassName
    %IsTimerInterrupted
    %IsTerminated
    %StatusCode
    %MessagesReceivedOld
    %MessagesSentOld
    ReplyCodeActions
    RetryInterval
    AlertRetryGracePeriod
    FailureTimeout
    Retry
    SuspendMessage
    QueueCountAlert
    QueueWaitAlert
    InactivityTimeout
    BusinessPartner
    AlertGroups
    %SuperSession

    Storage Model: Storage (HS.HC.IHE.XDR.Recipient.CommonProcess)

    ^Ens.BusinessProcessD(ID,"CommonProcess")
    =
    CustomProcessor
    CustomProcessorIsValid
    TransactionType
    HUB
    XSLTErrorHandlerClass
    Errors
    CallbackHandler
    ErrorHandler
    RegisterResponseTransform
    DoHSTrace
    ClearCallbackVariables
    FromMetadataTransform
    MessageTarget
    MetadataTransform
    TraceOperations
    UseXSLT2
    XSLTCacheMode
    XSLTCallbackHandlerClass
    XSLTDirectory
    FeedbackOpens in a new tab