API browser of generalCreditRequest430 COM module


/images/arrow_right.png IGeneralCreditRequest::AddService method
Adds one service record to the list of services. If the return status is VARIANT_FALSE then the service record is not added!

Note, that the notation of service here is much simpler than that in an invoice as the service is basically defined by a
tariff number, code and name, and a quantity, scale factor and base amount. The latter three form the amount as quantity * scale factor * base amount. Both the base amount and the amount are in CHF.
If a Tarmed service should be included then sum the medical and technical part to form the base amount.

Note as well, that the base amount includes any VAT portion and therefore the amount includes that portion as well.

space
 
/images/arrow_right.png C/C++ calling syntax
HRESULT AddService( BSTR
BSTR
BSTR
double
double
double
BSTR
VARIANT_BOOL
bstrTariffType,
bstrCode,
bstrText,
dQuantity,
dBaseAmount,
dScaleFactor,
bstrRemark,
*pbStatus);
 
/images/arrow_right.png Calling argument description
[in] BSTR bstrTariffType The official tariff type as defined by Forum Datenaustausch
bstrTariffType might be empty in special cases where the service is not covered by a official tariff catalog
[in] BSTR bstrCode Service code as given by the used tariff catalog.
bstrCode might be empty in special cases where the service is not covered by an official tariff catalog.
[in] BSTR bstrText The service name is the official service name as given by the used tariff catalog. If it is not a
service in the narrow sense (not covered by an official tariff catalog) then it describes that service with best effort.
[in] double dQuantity The floating point quantity.

Note, that dQuantity is defined as double spanning negative, zero and positive fractional values!

  • negative quantities are used for service records in a storno (cf. attribute SetRequest::eIsStorno)
  • a zero quantity is used for "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)

Note that quantity changes the sign if a storno request is produced.
[in] double dBaseAmount The base amount of one service in CHF.

Note, that the base amount includes any VAT portion

[in] double dScaleFactor The applied scale factor for the given service. In principle the scale factor is used for defining discounts or surchages.
However, it can be used as well for defining cost fractions e.g. in a DRG service.
[in] BSTR bstrRemark An optional remark for the given service.
[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.
 
/images/arrow_right.png C/C++ return value
S_OK This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE.
S_FALSE This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE.
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.