API browser of generalInvoiceRequest440 COM module


/images/arrow_right.png IGeneralInvoiceRequest::AddService method
Adds one non-Tarmed service record to the list of non-Tarmed services.
 
Auto-expansion: under the condition that the corresponding validator is installed and eIgnoreValidate=enNo then bstrText, dUnit, and dAmount are auto-expanded to the correct values by the validator if and only if these values are set empty or 0, respectively.
 
Important new feature: the AddService method has been patched to allow for controlling the underlying validators by using a pseudo service code: bstrCode="setParameter(cmd=value)", where cmd=value are validator specific commands. In such a case besides the service code (bstrCode) only the tariff type (bstrTariffType) and date (dDate) must be defined.
 
Currently there are defined pseudo codes for the following tariff types/validators in effect: Pseudo codes are active until the next call of the Initialize method and are then reset to their default values.
Do not use pseudo service codes if the validator is turned off by setting eIgnoreValidate=enYes!
 
If the return status is VARIANT_FALSE then the service record is not added or the pseudo service code was not accepted!
space
 
/images/arrow_right.png C/C++ calling syntax
HRESULT AddService( BSTR
BSTR
BSTR
double
long
DATE
BSTR
BSTR
BSTR
double
double
double
double
double
ObligationType
BSTR
BSTR
YesNoType
long
long
VARIANT_BOOL
bstrTariffType,
bstrCode,
bstrReferenceCode,
dQuantity,
lSessionNumber,
dDate,
bstrProviderEAN,
bstrResponsibleEAN,
bstrText,
dUnit,
dUnitFactor,
dExternalFactor,
dAmount,
dVatRate,
eIsObligatory,
bstrRemark,
bstrSectionCode,
eIgnoreValidate,
lServiceAttributes,
*plID,
*pbStatus);
 
/images/arrow_right.png Calling argument description
[in] BSTR bstrTariffType The official tariff type as defined by Forum Datenaustausch
[in] BSTR bstrCode The service code.
 
Important new feature: in order to control the underlying validators the feature of pseudo service codes bstrCode="setParameter(cmd=value)" have been defined, where cmd=value are validator specific.
[in] BSTR bstrReferenceCode The reference code if one must be supplied (otherwise bstrReferenceCode is ignored)
[in] double dQuantity The floating point quantity.
 
Note that quantity changes the sign if a credit advice or a storno request is produced.
[in] long lSessionNumber The session number - use a session value of 1 if no session concept is established for the used tariff
[in] DATE dDate The date of the service's application
[in] BSTR bstrProviderEAN EAN number of the service provider party.
 
Note if bstrProviderEAN is undefined and bstrResponsibleEAN is defined then bstrResponsibleEAN is copied into the bstrProviderEAN variable. If both variables are undefined the pseudo EAN "2099999999999" is set.
[in] BSTR bstrResponsibleEAN EAN number of the service responsible party.
 
Note if bstrResponsibleEAN is undefined and bstrProviderEAN is defined then bstrProviderEAN is copied into the bstrResponsibleEAN variable. If both variables are undefined the pseudo EAN "2099999999999" is set.
[in] BSTR bstrText The service name as defined by the used tariff
[in] double dUnit Tax points of the service.
[in] double dUnitFactor Tax point value of the service.
[in] double dExternalFactor The external scaling factor used to scale the tax point value e.g. to give a discount
 
In the case of a DRG service dExternalFactor is used to define any splitting situation!. If a 3-party splitting situation is described then dExternalFactor is the product of both splitting factors. The later 2 splitting factors are then defined and added by using the SetXtraDRG method!
[in] double dAmount The amount in CHF for the service.
 
Note that amount changes the sign if a credit advice or a storno request is produced.
[in] double dVatRate The VAT rate that should be applied to this service.
[in] ObligationType eIsObligatory Enumerator indicating whether the given service record is obligatory regarding the given law (UVG,KVG,...). If the enumerator is set to enObligationAutomatic then the status is set internally using some ad hoc rules.
[in] BSTR bstrRemark An optional remark for the given service
 
Patch for setting date_end
Some tariff partners ultimately enforce the specification of a date_end in the XML service records. Such a requirement is neither covered by the underlaying standard nor mostly justified by logic. Nevertheless, the following patch was introduced to fulfill such a requirement. The data is passed with an XML-like syntax as string via bstrRemark:
date_end='xml_date_time|microsoft_date_time'
like   date_end='2020-01-14T23:50:00'  or  date_end='41288.993'
The patch is neither case- nor whitespace-sensitive and will be removed from the remark in case of a positive detection. For better differentiation with normal text the following must be true as well: date_end > date_begin
 
Patch for populating service attributes
If service attribute keywords
{Code207 | Franchisefree_12e_d}
are supplied (case-independent) as part of the remark, than these keywords are migrated into the lServiceAttributes variable and thereafter removed from the remark.
Thus, this is an alternative method of setting lServiceAttributes - cf. below.
[in] BSTR bstrSectionCode An optional BfS section code where the service was applied as defined by Swiss Federal Statistical Office - this code is only given for eRoleType=enRoleHospital!
[in] YesNoType eIgnoreValidate Flag indicating whether the validation must be ignored that is whether the validator must not be called.
 
This flag might be useful in the following situation: the user wants to add the service even if the validation failed, perhaps he has a special agreement with the insurance or patient.
[in] long lServiceAttributes lServiceAttributes is a 32-bit integer where each bit position defines a special information.
 
Defined bit positions as of February 2021
Bit Meaning
Bit 1:
(0x000001)
Code207: no drug substitution due to medical reasons. Applies to drug services only!
 
If this bit ("Code207") is set, the service provider declares that the drug prescribed must not be substituted due to medical reasons.
Bit 2:
(0x000002)
franchisefree_12e_d: Franchise exemption according to Art. 12e lit. D KLV
 
If this bit ("franchisefree_12e_d") is set, the service provider declares that the service was prescribed as part of a preventive care program and the health care company must bill this service as franchise-free.
[out] long *plID This is the internal ID of the service record.
 
This internal ID is used to append extra drug or DRG information to this service with the SetXtraDrug or SetXtraDRG methods, respectively.
[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.