Compile function React_Prob_Cat_Services(@Service, @Params)
/***********************************************************************************************************************

    This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
    permission from SRP Computer Solutions, Inc.

    Name        :   React_Prob_Cat_Services

    Description :   Handler program for all module related services.

    Notes       :   The generic parameters should contain all the necessary information to process the services. Often
                    this will be information like the data Record and Key ID.

    Parameters  :
        Service         [in] -- Name of the service being requested
        Param1-10   [in/out] -- Additional request parameter holders
        Response       [out] -- Response to be sent back to the Controller (MCP) or requesting procedure

    Metadata    :

    History     :   (Date, Initials, Notes)

***********************************************************************************************************************/
#pragma precomp SRP_PreCompiler

$Insert SERVICE_SETUP
$Insert APP_INSERTS
$insert REACT_PROB_CAT_EQUATES

Declare Function   NextKey
Declare Subroutine Database_Services, Error_Services

GoToService

Return Response or ""

//----------------------------------------------------------------------------------------------------------------------
// SERVICES
//----------------------------------------------------------------------------------------------------------------------

Service Create(ReactProbCatName, ReactProbCat)
    
    Response = ''
    If ReactProbCatName NE '' then 
        RPRec                                = ''
        NewCatKey                            = NextKey('REACT_PROB_CAT')
        RPRec<REACT_PROB_CAT_CAT_DESC$>      = ReactProbCatName
        RPRec<REACT_PROB_CAT_ENTRY_ID$>      = @User4
        RPRec<REACT_PROB_CAT_ENTRY_DATE$>    = Date()
        RPRec<REACT_PROB_CAT_REACT_PROB_ID$> = ''
        Database_Services('WriteDataRow', 'REACT_PROB_CAT', NewCatKey, RPRec, True$, False$, False$)
        Response                             = NewCatKey
    end else
        Error_Services('Add', 'Error in ':Service:' service. Null ReactProbCatName passed into service.')
    end
    
End Service

