API browser of CareCreditRequest450 COM module


/images/arrow_right.png ICareCreditRequest::AddPlanningRecord method space
Adds a planning record to the list of planning records. A planning record describes a specific treatment measure as well as the applicable frequency over the given treatment period. Furthermore the planning data can optionally be mapped to the incurred costs by specifying the service data.
 
The calculation of the caused incurred costs is as follows:
dTariffQuantity * dTP * dTPV * dExternalFactor = total_caused_costs

 
If the return status is VARIANT_FALSE then the planning record is not added to the list of planning records
space
/images/arrow_right.png Restful webservice calling syntax
[POST] /baseURL/ICareCreditRequest/AddPlanningRecord
[JSON input data] pICareCreditRequest:
bstrPlanningType:
bstrPlanningCode:
bstrPlanningText:
dQuantity:
bstrMultiplierSymbol:
dMultiplier:
dBaseUnit:
eIsTraining:
dCorrUnit:
dTotalUnit:
bstrRemark:
bstrTariffType:
bstrTariffCode:
bstrTariffText:
dTariffQuantity:
dTP:
dTPV:
dExternalFactor:
longValue,    //interface address
"utf8StringValue",
"utf8StringValue",
"utf8StringValue",
doubleValue,
"utf8StringValue",
doubleValue,
doubleValue,
longValue,
doubleValue,
doubleValue,
"utf8StringValue",
"utf8StringValue",
"utf8StringValue",
"utf8StringValue",
doubleValue,
doubleValue,
doubleValue,
doubleValue
[JSON result data] pbStatus: 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 AddPlanningRecord( BSTR
BSTR
BSTR
double
BSTR
double
double
YesNoType
double
double
BSTR
BSTR
BSTR
BSTR
double
double
double
double
VARIANT_BOOL
bstrPlanningType,
bstrPlanningCode,
bstrPlanningText,
dQuantity,
bstrMultiplierSymbol,
dMultiplier,
dBaseUnit,
eIsTraining,
dCorrUnit,
dTotalUnit,
bstrRemark,
bstrTariffType,
bstrTariffCode,
bstrTariffText,
dTariffQuantity,
dTP,
dTPV,
dExternalFactor,
*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
[in] BSTR bstrPlanningType The official planning type designator, e.g. "RAI-NC", "BESA 5", "KLV7" and the like
[in] BSTR bstrPlanningCode The planning code as defined by the used planning catalog
[in] BSTR bstrPlanningText The name of the planning record as defined by the used planning catalog
[in] double dQuantity The quantity aka the frequency per day of the planning record
 
Note, that the quantity is defined as double, spanning zero and positive fractional values!
  • negative quantities are used to effectively "subtract" planning records from the grand total
  • a zero quantity is used for "non-billable" and "pro memoria" planning records
  • positive quantities are used for "normal" planning records
The quantity must not be rounded but given in full precision.
[in] BSTR bstrMultiplierSymbol The Multiplier Symbol corresponds to a temporal multiplication function that distributes a singular object over the whole treatment interval. The functional behavior is supplied by a set of (language-dependent) symbols like "t3", "w", "m" etc.

Please note that -since the symbols are language sensitive and unstandardized<7b>- these tokens are supplied for documentation/display purposes only but not used in any calculation. It is the dMultiplier factor that is used for the calculation!

[in] double dMultiplier The dMultiplier number is the numerical representation of the bstrMultiplierSymbol and defines the multiplication factor that a singular planning object is distributed over the whole treatment interval.
 
Please note, that the magnitude of the multiplier might be fractional since an instruction like "t3" might not be transformed to an integer dependent on the given treatment interval.
[in] double dBaseUnit The base unit of a singular planning object as defined in the planning catalog - this is the planning equivalent of the tax point for tariff services.
[in] YesNoType eIsTraining eIsTraining is a Boolean value indicating whether the planning record is performed in training mode.

Note, that this Boolean is mostly enNo outside a home care situation.

[in] double dCorrUnit dCorrUnit is used to optionally correct the total unit dTotalUnit of the planning record.
 
Please note, that the sign is significant, i.e. a downscale correction corresponds to a negative value. Furthermore, "dCorrUnit" is an absolute value and is not modulated by "dQuantity" and "dMultiplier" (cf. the defined equation under "dTotalUnit").
 
The necessity of a correction depends on the used catalog and is justified by the non-orthogonality of the catalog planning records.
[in] double dTotalUnit dTotalUnit defines the calculated units over the full treatment interval as given by the equation:
 
( dQuantity * dMultiplier * dBaseUnit ) + dCorrUnit = dTotalUnit

 
The equation is calculated in full precision and the result rounded to 2 significant decimal places.
[in] BSTR bstrRemark An optional remark for the given planning record and tariff record
[in] BSTR bstrTariffType The official tariff type as defined by Forum Datenaustausch.

If there must not be a coupling of the planning set to the corresponding incurred cost record than supply a empty tariff type.

[in] BSTR bstrTariffCode The tariff code as defined by the used tariff
 
If there must not be a coupling of the planning set to the corresponding incurred cost record than supply a empty tariff code.
[in] BSTR bstrTariffText The name of the tariff record as defined by the used tariff
[in] double dTariffQuantity The quantity of the defined service.
 
Note, that the quantity is defined as double, spanning zero and positive fractional values!
  • a zero quantity is used for "non-billable" and "pro memoria" services
  • positive quantities are used for "normal" services
  • fractional values are used whenever a part of the "full" service is used (e.g. quantity=0.5 for 500ml of a 1000ml infusion solution)
  • negative quantities are set for a storno to reflect the negative incurred cost situation
The quantity must not be rounded but given in full precision.
[in] double dTP The tax points (TP) of the defined tariff record
[in] double dTPV The tax point value (TPV) of the defined tariff record
[in] double dExternalFactor The external scaling factor used to scale the tariff record e.g. to give a discount or surcharge or to use the factor as a measure of splitting costs.

[out,retval] VARIANT_BOOL *pbStatus Return status of the method. If pbStatus is VARIANT_FALSE then an error occurred and GetAbortInfo should be called to retrieve the error string.
space