API browser of drgValidator100 COM module


/images/arrow_right.png IValidate::AddService method space
Adds a new service which will be validated against all previously added services of the same session. If the code supplied passes all validations a VARIANT_TRUE value is returned. If the code was not accepted VARIANT_FALSE is returned and the variable plStatus contains the error code.
 
swissDRG patch
There are 2 service providers in swissDRG -hospitals and maternity clinics- using the same service code space! Furthermore,
swissDRG distinguishes between normal and relocation cases. For being able to separate these cases, pseudo services have been defined
consisting of a tariff type, a date and a pseudo code! Such a pseudo code consists of:
setParameter(cmd=value)
where the whole pseudo code is case and whitespace insensitive. A pseudo code is active until the next call of the Initialize method and is then reset to the default values.
 
The following pseudo codes are defined for swissDRG:
  1. setParameter(providerType=value), with value = { hospital | maternityClinic }, and hospital as default.
    This command set the focus to swissDRG service records for hospitals or maternity clinics, respectively.
  2. setParameter(relocation=value), with value = { on | off }, and off as default.
    This command calculates the TP for the normal (off) or relocation (on) case.
The return value of AddService is S_OK for successfully set a pseudo value. However, do not call the properties as these are undefined in such a case
space
/images/arrow_right.png Restful webservice calling syntax
[POST] /baseURL/IValidate/AddService
[JSON input data] pIValidate:
ePatientSex:
dPatientBirthdate:
lLengthOfStay:
bstrTariffType:
bstrCode:
dQuantity:
dTP:
dTPValue:
dDate:
eIgnoreValidate:
lHook:
longValue,    //interface address
longValue,
variantDateValue | "stringISODateValue",
longValue,
"utf8StringValue",
"utf8StringValue",
doubleValue,
doubleValue,
doubleValue,
variantDateValue | "stringISODateValue",
longValue,
longValue
[JSON result data] plStatus:
pbStatus:
longValue,
booleanValue
 
[HTTP result status] 200 Return status 200 signals a successful method call
204 Return status 204 (noContent) signals that the end of an iteration is reached
>= 400 Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do.
space
/images/arrow_right.png C/C++ calling syntax
HRESULT AddService( long
SexType
DATE
long
BSTR
BSTR
double
double
double
DATE
YesNoType
long
VARIANT_BOOL
*plStatus,
ePatientSex,
dPatientBirthdate,
lLengthOfStay,
bstrTariffType,
bstrCode,
dQuantity,
dTP,
dTPValue,
dDate,
eIgnoreValidate,
lHook,
*pbStatus);
[C/C++ return value] S_OK This value is returned if the function call was successful.
S_FALSE This value is returned if the end of an iteration is reached
E_name This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions.
space
/images/arrow_right.png Calling argument description
[out] long *plStatus The principal validation status
  • =0 is returned for success
  • >0 indicates that a validation rule was not fulfilled. Use the GetAbortInfo to get an error description string.
  • <0 indicates that the service was not added (cf. the AbortValidateType enumeration for possible codes).
[in] SexType ePatientSex Gender of the patient
[in] DATE dPatientBirthdate Birth date of the patient
[in] long lLengthOfStay The effective length of stay to use for calculation the TP value
[in] BSTR bstrTariffType Tariff catalog to use.
Use the methods drgValidator::GetFirstTariff/drgValidator::GetNextTariff to iterate over all covered DRG tariff catalogs
[in] BSTR bstrCode Code of the service
 
swissDRG patch
Pseudo codes of the form setParameter(cmd=value) can be used to alter the default behavior.
[in] double dQuantity Quantity of the service
[in] double dTP Tax point TP of the service (aka the effective cost weight).
 
A zero value will be auto-expanded to the correct TP by the validator if and only if the TP can be calculated. That is for unweighted swissDRG positions or cost-undefined swissDRG additions a TP value must be supplied.
[in] double dTPValue Tax point value TPV of the service (aka base rate)
[in] DATE dDate Date of the service to ensure a valid date range of the service record itself
[in] YesNoType eIgnoreValidate Flag indicating whether the validation should be ignored or not.
To turn off the validation might be useful in the situation when a service should be added even if the validation failed due to a special agreement with the insurance or patient.
[in] long lHook External hook. The software house can provide e.g. a record ID of the service to identify this service later on when reading data back.
[out,retval] VARIANT_BOOL *pbStatus Return status. VARIANT_TRUE means S_OK, VARIANT_FALSE means S_FALSE (e.g. in an iterator) or an error (E_name).
In the later case check for possible errors with the GetAbortInfo method.
space