Hi John,

If I understood, you want to pass the code to a method and return the description.

All descriptions of HL7 code tables are stored in the global ^EnsHL7.Description.

The structure of global is ^EnsHL7.Description(<category>,"CT",<codeTableCode,valurKey>)=<descritpion>.

For HL7 Schema Category 2.3.1 the global have the content:

^EnsHL7.Description("2.3.1","CT",270)="Document type"
^EnsHL7.Description("2.3.1","CT",270,"AR")="Autopsy report"
                                     "DI")="Diagnostic imaging"
                                     "DS")="Discharge summary"
                                     "ED")="Emergency department report"
                                     "HP")="History and physical examination"
                                     "OP")="Operative report"
                                     "PC")="Psychiatric consultation"
                                     "PH")="Psychiatric history and physical examination"
                                     "PN")="Procedure note"
                                     "PR")="Progress note"
                                     "SP")="Surgical pathology"
                                     "TS")="Transfer summary"

A generic method would be like:

Hi Igor,

This occur because some Business Host still processing a message or waiting for a response.

You can override the method StopProduction to force the production to stop.

Class br.cjs.test.TestProduction Extends %UnitTest.TestProduction

/// Class name of the production. It must contain the production class name.
Parameter PRODUCTION As %String = "HC.Production"; 

/// Paratmerter used to force stop production by Ens.Director
Parameter FORCESTOPPRODUCTION As %Boolean = 1;

/// Code to run right after the production is started. Used, for example, to call a method that initiates the test.
/// If an error status is returned, the test will be aborted and failed and the production will be stopped.
/// So if a non fatal error occurs, you may invoke ..LogErrors(status,"OnAfterProductionStart()") and return $$$OK.
Method OnAfterProductionStart() As %Status
    #Dim exception As %Exception.General = ""
    #Dim statusCode As %Status = $System.Status.OK()
        // Do Yor Tests
    Catch (exception)
        Set statusCode = exception.AsStatus()
    Return statusCode

Method StopProduction() As %Boolean [ Internal, Private ]
    Do ..GetMacros(.Macro)
    Do $$$LogMessage("Stopping production '"_..#PRODUCTION_"'")
    Set r = $$$AssertStatusOK(##class(Ens.Director).StopProduction(..#MAXWAIT, ..#FORCESTOPPRODUCTION), "Invoking Ens.Director::StopProduction")
    If 'r Quit 0
    Set r = $$$AssertStatusOK(..WaitForState(Macro("eProductionStateStopped")), "Verifying Ensemble state is 'Stopped'")
    If 'r Quit 0
    Quit 1