API browser of generalInvoiceRequest500 COM module


/images/arrow_right.png IGeneralInvoiceRequest::AddServiceEx method space
Adds a service from an extended tariff to the list of services.
The term "extended" means a tariff whose services are splitted into a medical and technical part (like the Tarmed) as opposed to a simple tariff with a (code, name, tax point) structure. Note, that the IServiceExInput interface is needed to define further data even if a corresponding validator is not used.
 
Auto-expansion: under the condition that the corresponding validator is installed and eIgnoreValidate=enNo then bstrText, dUnitMT, dUnitTT, dUnitInternalScalingFactorMT, dUnitInternalScalingFactorTT, dAmountMT, dAmountTT and dAmount are auto-expanded to the correct values by the validator if and only if these values are set empty or 0, respectively.
 
If the return status is VARIANT_FALSE then the service record is not added!
space
/images/arrow_right.png Restful webservice calling syntax
[POST] /baseURL/IGeneralInvoiceRequest/AddServiceEx
[JSON input data] pIGeneralInvoiceRequest:
pIServiceExInput:
bstrTariffType:
bstrCode:
bstrReferenceCode:
dQuantity:
lSessionNumber:
lGroupSize:
dDateBegin:
dDateEnd:
eSide:
bstrServiceName:
dUnitMT:
dUnitFactorMT:
dUnitInternalScalingFactorMT:
dUnitExternalScalingFactorMT:
dAmountMT:
dUnitTT:
dUnitFactorTT:
dUnitInternalScalingFactorTT:
dUnitExternalScalingFactorTT:
dAmountTT:
dAmount:
dVatRate:
bstrRemark:
eIgnoreValidate:
lServiceAttributes:
longValue,    //interface address
longValue,
"utf8StringValue",
"utf8StringValue",
"utf8StringValue",
doubleValue,
longValue,
longValue,
variantDateValue | "stringISODateValue",
variantDateValue | "stringISODateValue",
longValue,
"utf8StringValue",
doubleValue,
doubleValue,
doubleValue,
doubleValue,
doubleValue,
doubleValue,
doubleValue,
doubleValue,
doubleValue,
doubleValue,
doubleValue,
doubleValue,
"utf8StringValue",
longValue,
longValue
[JSON result data] plID:
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 AddServiceEx( IServiceExInput
BSTR
BSTR
BSTR
double
long
long
DATE
DATE
SideType
BSTR
double
double
double
double
double
double
double
double
double
double
double
double
BSTR
YesNoType
long
long
VARIANT_BOOL
*pIServiceExInput,
bstrTariffType,
bstrCode,
bstrReferenceCode,
dQuantity,
lSessionNumber,
lGroupSize,
dDateBegin,
dDateEnd,
eSide,
bstrServiceName,
dUnitMT,
dUnitFactorMT,
dUnitInternalScalingFactorMT,
dUnitExternalScalingFactorMT,
dAmountMT,
dUnitTT,
dUnitFactorTT,
dUnitInternalScalingFactorTT,
dUnitExternalScalingFactorTT,
dAmountTT,
dAmount,
dVatRate,
bstrRemark,
eIgnoreValidate,
lServiceAttributes,
*plID,
*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] IServiceExInput *pIServiceExInput The instance of the IServiceExInput interface used for the given tariff.
 
Please note, that even if a validator is not used for the given tariff, IServiceExInput still holds data that is required to produce a standard compliant XML infoset like the billingRole and medicalRole. Therefore, the instance can not be NULL!
[in] BSTR bstrTariffType The official tariff type as defined by Forum Datenaustausch
[in] BSTR bstrCode The service code.
[in] BSTR bstrReferenceCode The reference code if one must be supplied.
 
Supply an empty string if there is no reference code to set.
[in] double dQuantity The floating point quantity.
 
Note that quantity changes the sign if a storno request is produced.
[in] long lSessionNumber lSessionNumber defines either a specific patient contact with an unique number over the entire treatment period or
a day-based session number. The session number divides the day into a series of individual treatment units (sessions), whereby by default
each day starts with the number 1 and is incremented by 1 for each new treatment unit.
&nbp;
Some tariffs do not include a session concept, others such as TARMED/TARDOC rely heavily on this paradigm.
For tariffs without a session concept, simply enter 1 as the session number for all services on one day.
[in] long lGroupSize lGroupSize defines the participating group size of a service whose quantity is calculated by the "Divisor Method". A value of < 2 means that there is no group size dependency!
[in] DATE dDateBegin The date of the service's prescription
[in] DATE dDateEnd The date of the last prescription of the service if and only if the service was applied over a period of time.
 
dDateEnd is ignored if the condition (dDateEnd > dDateBegin+1) is not true! Therefore dDateEnd=0 is supplied for the vast majority of services.
[in] SideType eSide The body side dependency of the service
[in] BSTR bstrServiceName The name of the service as defined by the used tariff
[in] double dUnitMT Tax points of the medical part (TP_MT) of the service.
[in] double dUnitFactorMT Tax point value of the medical part (TPV_MT) of the service.
[in] double dUnitInternalScalingFactorMT The internal scaling factor of the medical part of the service.
 
This is a modulation factor to represent percent services and is mostly 1 - set the factor 0 to auto-expand it depending on the service.
[in] double dUnitExternalScalingFactorMT dUnitExternalScalingFactorMT is an external scaling factor for the medical part laying in the provider's responsibility that modulates the corresponding service outside the official tariff structure.
The dUnitExternalScalingFactorMT is used for discounting or surcharging and can even take a zero value to supply a charge free service.
 
For tariff «007 - TarDoc» the tariff owner "OAAT-OTMA" will use the
external factor as an additional control element within its cost neutrality project. It is currently unclear how, where and when the
corresponding data will be made available. It is also unclear whether this is a date-historical usage of the factor.
[in] double dAmountMT The amount in CHF for the medical part of the service.
 
Note that amount changes the sign if a storno request is produced due to the sign change of dQuantity.
[in] double dUnitTT Tax points of the technical part (TP_TT) of the service.
[in] double dUnitFactorTT Tax point value of the technical part (TPV_TT) of the service.
[in] double dUnitInternalScalingFactorTT The internal scaling factor of the technical part of the service.
 
This is a modulation factor to represent percent services and is mostly 1 - set the factor 0 to auto-expand it depending on the service.
[in] double dUnitExternalScalingFactorTT dUnitExternalScalingFactorTT is an external scaling factor for the technical part laying in the provider's responsibility that modulates the corresponding service outside the official tariff structure.
The dUnitExternalScalingFactorTT is used for discounting or surcharging and can even take a zero value to supply a charge free service.
 
For tariff «007 - TarDoc» the tariff owner "OAAT-OTMA" will use the
external factor as an additional control element within its cost neutrality project. It is currently unclear how, where and when the
corresponding data will be made available. It is also unclear whether this is a date-historical usage of the factor.
[in] double dAmountTT The amount in CHF for the technical part of the service.
 
Note that amount changes the sign if a storno request is produced due to the sign change of dQuantity.
[in] double dAmount The amount in CHF for the service as sum over dAmountMT + dAmountTT
 
Note that amount changes the sign if a storno request is produced due to the sign change of dQuantity.
[in] double dVatRate The VAT rate in percent or as real number that should be applied to this service.
[in] BSTR bstrRemark An optional remark for the given service
 
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] YesNoType eIgnoreValidate Flag indicating whether the validation must be ignored that is whether the corresponding validator must be called or not.
 
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 returned internal ID of the service record.
[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