 API browser of generalInvoiceRequest500 COM module
Interface version: | 5.00
Interface date: | 27 Nov 2024

The GeneralInvoiceRequestManager is an ATL COM module which provides methods to generate invoices, reminders for all roles and places. Such an object is printed or a XML infoset is produced which can be transported electronically to the recipient. In the latter case the object optionally can be signed and/or encrypted . Due to the processing attributes "storno" and "copy" a previously generated object can be canceled or a copy can be produced. The subchapter object reference provides an in-depth description of the concept of "object reference". |  | space
Interfaces |  | 5 interface
IAddress | The utility interface IAddress is available for setting and retrieving structured address data. |
IGeneralInvoiceRequest | With the IGeneralInvoiceRequest interface all invoice/reminder related data can be set/defined by the interface's methods. |
IGeneralInvoiceRequestManager | The main interface IGeneralInvoiceRequestManager -creatable in its own right- provides methods to generate invoices or reminders for all roles and places. Furthermore, created XML infosets can be loaded back into memory for further processing. |
IGeneralInvoiceResult | The interface IGeneralInvoiceResult allows to read back all data that have been defined with the IGeneralInvoiceRequest interface or by loading a previously generated XML infoset. |
IServiceExInput | The utility interface IServiceExInput provides methods and properties that allow to input data for Tarmed-like validators. |
Types |  |
type definitions | List of all used builtin, composite and enumeration types |
Important documents about the usage and handling |  |
Document | General usage of the generalInvoiceRequest500 COM module - an overview |
Document | List of major changes between the schema files generalInvoiceRequest450 vs generalInvoiceRequest500 |
Document | What to do in a 64bit environment - is there a 64bit Sumex1 COM dll? |
Document | Pseudo service codes in AddService allows to controll the underlying validators |
Document | Overview of the concept of "Object reference" |
Document | Notes about the processing attributes |
Document | Overview about how to best generate a reminder, storno,... |
Document | How to set the default printer for a certain invoice/reminder |
Document | Syntax of the printTemplate variable of the Print method |
Document | How to print electronic stamps onto an invoice/reminder |
Document | How to generate a PDF archive file of a invoice/reminder |
Document | VB/CS code snippet for using the generalInvoiceRequest500 COM module |
Document | generalInvoiceRequestManagerServer500: Introduction, overview and usage of the Restful Webservice Server |

© by sumex1.net - all rights reserved


  • generalInvoiceRequest500
  • IAddress

IAddress interface |  | V5.00/27 Nov 2024
With the IAddress interface structured address data can be set and retrieved. The whole address can be seen as a collection of substructures like the name, the postal part, a communication part etc. Where each of these sub structure can be set or retrieved by an interface method. The name part of a person is set by the method SetPerson and a company's name is entered by the method SetCompany. Before setting a new address the internal data has to be initialized by the method Initialize. |  | space
space
Methods |  | 13 methods
AddPhone | Adds a structured phone number |
GetAbortInfo | Get the abort information string with the error coded in the module language |
GetCompany | Retrieves the company's naming part of the address |
GetFirstPhone | Retrieves the first phone number information |
GetNextPhone | Retrieves the next phone number information |
GetOnline | Retrieves the structured online part of the address |
GetPerson | Retrieves the person's naming part of the address |
GetPostal | Retrieves the structured postal address part of the address. |
Initialize | Initializes all internal address variables |
SetCompany | Sets the company's naming part of the address |
SetOnline | Sets the structured online part of the address. |
SetPerson | Sets the person's naming part of the address |
SetPostal | Sets the structured postal address part |
space
Properties |  | 2 properties
[put] DestructAddress | Destructs/invalidates this IAddress interface instance |
[get] Type | GetType returns the type of address either enAddressPerson or enAddressCompany if an address is defined at all |
space |


  • IAddress
  • AddPhone

IAddress::AddPhone method |  |  | space
Adds a structured phone number. The Swiss international calling code +41 is filtered out in the printing. If the main software does not support structured pone numbers then all data is supplied in the bstrNumber variable. However, +41 is then no longer filtered. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IAddress/AddPhone
[JSON input data] | pIAddress: bstrNumber: bstrLocalCode: bstrInternationalCode: bstrExt: | longValue, //interface address "utf8StringValue", "utf8StringValue", "utf8StringValue", "utf8StringValue"
[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
C/C++ calling syntax |  |  |
HRESULT AddPhone( | BSTR BSTR BSTR BSTR VARIANT_BOOL | bstrNumber, bstrLocalCode, bstrInternationalCode, bstrExt, *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
Calling argument description |  |  |
[in] BSTR | bstrNumber | The pure phone number part of the telephone number. It is possible to set the full telephone number in this variable and leave the other parts of the telephone number empty |
[in] BSTR | bstrLocalCode | The local area code part of the telephone number. |
[in] BSTR | bstrInternationalCode | The international calling code part of the telephone number. |
[in] BSTR | bstrExt | The optional extension number part of the telephone number. |
[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 |


  • IAddress
  • GetAbortInfo

IAddress::GetAbortInfo method |  |  | space
Get the abort information string with the error coded in the module language. Call this method whenever the returned pbStatus variable of the primarily called method is VARIANT_FALSE and the primarily called method is not an iterator (GetFirst/GetNext). In the later case VARIANT_FALSE signals the end of data. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IAddress/GetAbortInfo
[JSON input data] | pIAddress: | longValue, //interface address
[JSON result data] | pbstrAbort: pbStatus: | "utf8StringValue", 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
C/C++ calling syntax |  |  |
HRESULT GetAbortInfo( | BSTR VARIANT_BOOL | *pbstrAbort, *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
Calling argument description |  |  |
[out] BSTR | *pbstrAbort | Abort information string coded in the module language. |
[out,retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE then an error-in-error situation occurred. |
space |


  • IAddress
  • GetCompany

IAddress::GetCompany method |  |  | space
Retrieves the company's naming part of the address. Call the property GetType first to test if GetPerson or GetCompany should be called. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IAddress/GetCompany
[JSON input data] | pIAddress: | longValue, //interface address
[JSON result data] | pbstrCompanyName: pbstrDepartment: pbstrSubaddressing: pbStatus: | "utf8StringValue", "utf8StringValue", "utf8StringValue", 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
C/C++ calling syntax |  |  |
HRESULT GetCompany( | BSTR BSTR BSTR VARIANT_BOOL | *pbstrCompanyName, *pbstrDepartment, *pbstrSubaddressing, *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
Calling argument description |  |  |
[out] BSTR | *pbstrCompanyName | The company's name. |
[out] BSTR | *pbstrDepartment | The optional department part of the company. |
[out] BSTR | *pbstrSubaddressing | The optional subaddressing information, e.g. a "c/o" like information as defined by the Post |
[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 |


  • IAddress
  • GetFirstPhone

IAddress::GetFirstPhone method |  |  | space
Retrieves the first phone number information. VARIANT_FALSE is returned if the end of the phone list is reached. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IAddress/GetFirstPhone
[JSON input data] | pIAddress: | longValue, //interface address
[JSON result data] | pbstrNumber: pbstrLocalCode: pbstrInternationalCode: pbstrExt: pbStatus: | "utf8StringValue", "utf8StringValue", "utf8StringValue", "utf8StringValue", 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
C/C++ calling syntax |  |  |
HRESULT GetFirstPhone( | BSTR BSTR BSTR BSTR VARIANT_BOOL | *pbstrNumber, *pbstrLocalCode, *pbstrInternationalCode, *pbstrExt, *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
Calling argument description |  |  |
[out] BSTR | *pbstrNumber | The pure phone number part of the full telephone number. It is possible that the full telephone number is returned in this variable and the other parts of the telephone number left empty. |
[out] BSTR | *pbstrLocalCode | The local area code part of the telephone number. |
[out] BSTR | *pbstrInternationalCode | The international calling code part of the telephone number. |
[out] BSTR | *pbstrExt | the extension number part of the telephone number. |
[out,retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE the end of data is reached |
space |


  • IAddress
  • GetNextPhone

IAddress::GetNextPhone method |  |  | space
Retrieves the next phone number information. VARIANT_FALSE is returned if the end of the phone list is reached. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IAddress/GetNextPhone
[JSON input data] | pIAddress: | longValue, //interface address
[JSON result data] | pbstrNumber: pbstrLocalCode: pbstrInternationalCode: pbstrExt: pbStatus: | "utf8StringValue", "utf8StringValue", "utf8StringValue", "utf8StringValue", 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
C/C++ calling syntax |  |  |
HRESULT GetNextPhone( | BSTR BSTR BSTR BSTR VARIANT_BOOL | *pbstrNumber, *pbstrLocalCode, *pbstrInternationalCode, *pbstrExt, *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
Calling argument description |  |  |
[out] BSTR | *pbstrNumber | The pure phone number part of the full telephone number. It is possible that the full telephone number is returned in this variable and the other parts of the telephone number left empty. |
[out] BSTR | *pbstrLocalCode | The local area code part of the telephone number. |
[out] BSTR | *pbstrInternationalCode | The international calling code part of the telephone number. |
[out] BSTR | *pbstrExt | the extension number part of the telephone number. |
[out,retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE the end of data is reached |
space |


  • IAddress
  • GetOnline

IAddress::GetOnline method |  |  | space
Retrieves the structured online part of the address. Empty variables are returned if there is no online information available. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IAddress/GetOnline
[JSON input data] | pIAddress: | longValue, //interface address
[JSON result data] | pbstrEMail: pbstrUrl: pbStatus: | "utf8StringValue", "utf8StringValue", 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
C/C++ calling syntax |  |  |
HRESULT GetOnline( | BSTR BSTR VARIANT_BOOL | *pbstrEMail, *pbstrUrl, *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
Calling argument description |  |  |
[out] BSTR | *pbstrEMail | A relevant email address. |
[out] BSTR | *pbstrUrl | A relevant URL. |
[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 |


  • IAddress
  • GetPerson

IAddress::GetPerson method |  |  | space
Retrieves the person's naming part of the address. Call the property GetType first to test if GetPerson or GetCompany should be called. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IAddress/GetPerson
[JSON input data] | pIAddress: | longValue, //interface address
[JSON result data] | pbstrFamilyname: pbstrGivenname: pbstrSalutation: pbstrTitle: pbstrSubaddressing: pbStatus: | "utf8StringValue", "utf8StringValue", "utf8StringValue", "utf8StringValue", "utf8StringValue", 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
C/C++ calling syntax |  |  |
HRESULT GetPerson( | BSTR BSTR BSTR BSTR BSTR VARIANT_BOOL | *pbstrFamilyname, *pbstrGivenname, *pbstrSalutation, *pbstrTitle, *pbstrSubaddressing, *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
Calling argument description |  |  |
[out] BSTR | *pbstrFamilyname | The family name (or last name) of the person. |
[out] BSTR | *pbstrGivenname | The given name (or first name) of the person. |
[out] BSTR | *pbstrSalutation | The optional salutation of the person. |
[out] BSTR | *pbstrTitle | The optional title of the person. |
[out] BSTR | *pbstrSubaddressing | The optional subaddressing information, e.g. a "c/o" like information as defined by the Post |
[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 |


  • IAddress
  • GetPostal

IAddress::GetPostal method |  |  | space
Retrieves the structured postal address part of the address. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IAddress/GetPostal
[JSON input data] | pIAddress: | longValue, //interface address
[JSON result data] | pbstrStreet: pbstrPoBox: pbstrZip: pbstrCity: pbstrStateCode: pbstrCountry: pbstrCountryCode: pbStatus: | "utf8StringValue", "utf8StringValue", "utf8StringValue", "utf8StringValue", "utf8StringValue", "utf8StringValue", "utf8StringValue", 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
C/C++ calling syntax |  |  |
HRESULT GetPostal( | BSTR BSTR BSTR BSTR BSTR BSTR BSTR VARIANT_BOOL | *pbstrStreet, *pbstrPoBox, *pbstrZip, *pbstrCity, *pbstrStateCode, *pbstrCountry, *pbstrCountryCode, *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
Calling argument description |  |  |
[out] BSTR | *pbstrStreet | The street name part of an address. |
[out] BSTR | *pbstrPoBox | The P.O. box code part of an address. Note that according to the Post the street and poBox parts should be used mutually exclusive. |
[out] BSTR | *pbstrZip | The ZIP code part of an address. |
[out] BSTR | *pbstrCity | The city name of an address. |
[out] BSTR | *pbstrStateCode | The optional state code part of an address. |
[out] BSTR | *pbstrCountry | The optional bstrCountry supplies the country name of the address given |
[out] BSTR | *pbstrCountryCode | The ISO 3166-1 alpha-2 country designator (2 uppercase characters) of the address given |
[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 |


  • IAddress
  • Initialize

IAddress::Initialize method |  |  | space
Initializes all internal address variables. This method should be called before new data is supplied to reset all internally stored data. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IAddress/Initialize
[JSON input data] | pIAddress: | longValue, //interface address
[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
C/C++ calling syntax |  |  |
HRESULT Initialize( | VARIANT_BOOL | *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
Calling argument description |  |  |
[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 |


  • IAddress
  • SetCompany

IAddress::SetCompany method |  |  | space
Sets the company's naming part of the address. Note that the subaddressing is part of the extended name and is always printed before any postal information. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IAddress/SetCompany
[JSON input data] | pIAddress: bstrCompanyName: bstrDepartment: bstrSubaddressing: | longValue, //interface address "utf8StringValue", "utf8StringValue", "utf8StringValue"
[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
C/C++ calling syntax |  |  |
HRESULT SetCompany( | BSTR BSTR BSTR VARIANT_BOOL | bstrCompanyName, bstrDepartment, bstrSubaddressing, *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
Calling argument description |  |  |
[in] BSTR | bstrCompanyName | The company's name. |
[in] BSTR | bstrDepartment | The optional department part of the company. |
[in] BSTR | bstrSubaddressing | The optional subaddressing information, e.g. a "c/o" like information as defined by the Post |
[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 |


  • IAddress
  • SetOnline

IAddress::SetOnline method |  |  | space
Sets the structured online part of the address. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IAddress/SetOnline
[JSON input data] | pIAddress: bstrEMail: bstrUrl: | longValue, //interface address "utf8StringValue", "utf8StringValue"
[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
C/C++ calling syntax |  |  |
HRESULT SetOnline( | BSTR BSTR VARIANT_BOOL | bstrEMail, bstrUrl, *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
Calling argument description |  |  |
[in] BSTR | bstrEMail | A relevant email address. |
[in] BSTR | bstrUrl | A relevant URL address. |
[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 |


  • IAddress
  • SetPerson

IAddress::SetPerson method |  |  | space
Sets the person's naming part of the address. Note that the subaddressing is part of the extended name and is always printed before any postal information. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IAddress/SetPerson
[JSON input data] | pIAddress: bstrFamilyname: bstrGivenname: bstrSalutation: bstrTitle: bstrSubaddressing: | longValue, //interface address "utf8StringValue", "utf8StringValue", "utf8StringValue", "utf8StringValue", "utf8StringValue"
[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
C/C++ calling syntax |  |  |
HRESULT SetPerson( | BSTR BSTR BSTR BSTR BSTR VARIANT_BOOL | bstrFamilyname, bstrGivenname, bstrSalutation, bstrTitle, bstrSubaddressing, *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
Calling argument description |  |  |
[in] BSTR | bstrFamilyname | The family name (or last name) of the person. |
[in] BSTR | bstrGivenname | The given name (or first name) of the person. |
[in] BSTR | bstrSalutation | The optional salutation of the person. |
[in] BSTR | bstrTitle | The optional title of the person. |
[in] BSTR | bstrSubaddressing | The optional subaddressing information, e.g. a "c/o" like information as defined by the Post |
[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 |


  • IAddress
  • SetPostal

IAddress::SetPostal method |  |  | space
Sets the structured postal address part. The Swiss ISO county code is the default but is filtered in the printing. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IAddress/SetPostal
[JSON input data] | pIAddress: bstrStreet: bstrPoBox: bstrZip: bstrCity: bstrStateCode: bstrCountry: bstrCountryCode: | longValue, //interface address "utf8StringValue", "utf8StringValue", "utf8StringValue", "utf8StringValue", "utf8StringValue", "utf8StringValue", "utf8StringValue"
[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
C/C++ calling syntax |  |  |
HRESULT SetPostal( | BSTR BSTR BSTR BSTR BSTR BSTR BSTR VARIANT_BOOL | bstrStreet, bstrPoBox, bstrZip, bstrCity, bstrStateCode, bstrCountry, bstrCountryCode, *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
Calling argument description |  |  |
[in] BSTR | bstrStreet | The full street name of the address given |
[in] BSTR | bstrPoBox | The P.O. box code part of the address given Note that according to the Post the street and poBox parts should be used mutually exclusive. |
[in] BSTR | bstrZip | The mandatory ZIP code of the address given |
[in] BSTR | bstrCity | The mandatory city name of the address given |
[in] BSTR | bstrStateCode | The optional state code part of the address given |
[in] BSTR | bstrCountry | The optional bstrCountry supplies the country name of the address given |
[in] BSTR | bstrCountryCode | The ISO 3166-1 alpha-2 country designator (2 uppercase characters) of the address given |
[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 |


  • IAddress
  • DestructAddress

IAddress::DestructAddress property |  |  | space
This property has a Restful Webservice representation only! Destructs/invalidates this IAddress interface instance. The counterpart property to generate an IAddress interface instance is IGeneralInvoiceRequest::GetCreateAddress. |  |  |
space
Restful webservice calling syntax |  |  |
[PUT] | /baseURL/ IAddress/PutDestructAddress
[JSON input data] | pIAddress: | longValue, //interface address
[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
Remarks |  |  |
This property has a Restful Webservice representation only! |  |  |
space |


  • IAddress
  • Type

IAddress::Type property | space
GetType returns the type of address either enAddressPerson or enAddressCompany if an address is defined at all.

If no address is defined then enAddressUndefined is returned.
space
Restful webservice calling syntax
[GET] | /baseURL/ IAddress/GetType?param
[param] pIAddress= longValue
[JSON result data] peType: longValue
[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
C/C++ calling syntax
[get] HRESULT | Type( AddressType *peType );
[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
Calling argument description
[out,retval] AddressType | *peType
space
Remarks
If SmartPointers are used than the function names and calls are rewritten by Microsoft into the form
  • AddressType *GetType(void);
space


  • IGeneralInvoiceRequest

IGeneralInvoiceRequest interface |  | V5.00/27 Nov 2024
With the IGeneralInvoiceRequest interface all invoice/reminder related data and parameters can be set by the available interface methods like SetPatient, SetTreatment,... Alternatively to producing the data from scratch the data of a previously generated XML infoset can be loaded with the IGeneralInvoiceRequestManager::LoadXML method and thereafter data can selectively be changed. |  | space
space
Methods |  | 35 methods
AddCaseDetail | Adds a case detail to the list of case details - this method is needed for stationary cases only! |
AddDiagnosis | Adds a diagnosis to the list of diagnoses. |
AddDocument | Attaches a PDF, JPG or PNG document -inline- to the list of documents |
AddInstruction | Adds one instruction to the list of instructions |
AddPartner | Adds a partner address and ist mandatory GLN, type as well as some optional other keys like ZSR |
AddService | Adds a service from a simple/normal tariff to the list of services |
AddServiceEx | Adds a service from an extended tariff to the list of services |
AddXtraService | Allows to add additional service record data for any tariff by setting any number of token=value pairs |
Finalize | Finalizes and validates all data set so far in the IGeneralInvoiceRequest interface |
GetAbortInfo | Get the abort information string with the error coded in the module language |
Initialize | Initializes all input data in the IGeneralInvoiceRequest interface |
SetBillerGLN | Sets the biller's structured address as well as its mandatory GLN |
SetBillerZSR | Sets the biller's structured address as well as its mandatory ZSR |
SetCredit | Sets the optional credit object reference parameters |
SetDebitor | Sets the debitor's GLN and the structured address |
SetEsrQR | Sets the ESR information of type enEsrQR or enEsrQRplus |
SetEsrRedQR | Sets the ES information of type enRedPayinSlipQR (red payin slip with QR code). |
SetGuarantor | Sets the guarantor's structured address |
SetInsurance | Sets the GLN and the structured address of the insurance |
SetInsured | Sets the primary parameters and structured address of an insured person that is in fact the mother's address of a newborn |
SetInvoice | Sets the invoice object reference parameters |
SetLaw | Sets the data about the applied law and its dependent information |
SetPackage | Defines the identification parameters of the main software. |
SetPatient | Sets the primary parameters and structured address of the patient |
SetProcessing | Sets the defined processing information that are in effect at the site of the last intermediate. |
SetProviderGLN | Sets the provider's structured address as well as its mandatory GLN |
SetProviderZSR | Sets the provider's structured address as well as its mandatory ZSR |
SetReminder | Sets the reminder object reference parameters |
SetRequest | Sets the primary parameters of the request, namely the language the data is supplied, the "storno" and "copy" status besides an optional remark |
SetTiers | Sets the Tiers Garant (TG), Tiers Soldant (TS) or Tiers Payant (TP) mode together with the VAT number and some other data |
SetTransport | Sets transport information that is the routing information going from a sender (from) over the first intermediate (via) to the receiver (to) |
SetTreatment | Sets the basic treatment parameters. |
SetXtraDRG | Defines the splitting ratio between the two remaining parties if a 3-party splitting situation must be described! |
SetXtraDrug | Sets additional input data for the given drug service record if and only if eRoleType=enRolePharmacist |
SetXtraHospital | Sets additional treatment data if eRoleType=enRoleHospital and/or ePlaceType=enPlaceHospital |
space
Properties |  | 5 properties
[get] CreateAddress | Creates an instance of the IAddress interface |
[get] CreateServiceExInput | Creates an instance of the IServiceExInput interface |
[put] DestructAddress | Destructs/invalidates the IAddress interface instance |
[put] DestructGeneralInvoiceRequest | Destructs/invalidates this IGeneralInvoiceRequest interface instance |
[put] DestructServiceExInput | Destructs/invalidates the IServiceExInput interface instance |
space |


  • IGeneralInvoiceRequest
  • AddCaseDetail

IGeneralInvoiceRequest::AddCaseDetail method |  |  | space
Adds a case detail to the list of case details - this method is needed for stationary cases only! Case detail records are used to supply the complete history of the DRG case in terms of the treatment, possible relocation and re-opening of that case. Obviously, a case detail list make sense only if there is more than one entry in the list, since the used DRG service in itself defines already 1 case detail record. Note, that the case details are optional and if used then it should be supplied in reverse chronological order. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceRequest/AddCaseDetail
[JSON input data] | pIGeneralInvoiceRequest: bstrTariffType: bstrCode: dDateBegin: dDateEnd: bstrACID: eResidenceAfterDischarge: | longValue, //interface address "utf8StringValue", "utf8StringValue", variantDateValue | "stringISODateValue", variantDateValue | "stringISODateValue", "utf8StringValue", longValue
[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
C/C++ calling syntax |  |  |
HRESULT AddCaseDetail( | BSTR BSTR DATE DATE BSTR ResidenceAfterDischarge VARIANT_BOOL | bstrTariffType, bstrCode, dDateBegin, dDateEnd, bstrACID, eResidenceAfterDischarge, *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
Calling argument description |  |  |
[in] BSTR | bstrTariffType | The official tariff type as defined by Forum Datenaustausch This should be DRG tariff type "010". |
[in] BSTR | bstrCode | The DRG service code |
[in] DATE | dDateBegin | The starting date and time of the current case detail. Note, that this date must be equal or greater then the dDateBegin of the treatment period set in SetTreatment method. |
[in] DATE | dDateEnd | The ending date and time of the current case detail. Note, that this date must be less or equal the dDateEnd of the treatment period set in SetTreatment method. |
[in] BSTR | bstrACID | The Administrative Case IDentification for the current DRG case detail. |
[in] ResidenceAfterDischarge | eResidenceAfterDischarge | The Residence After Discharge variable supplies information about the discharge location where the patient is going to encoded by a terminal set of tokens |
[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 |


  • IGeneralInvoiceRequest
  • AddDiagnosis

IGeneralInvoiceRequest::AddDiagnosis method |  |  | space
Adds a diagnosis to the list of diagnoses. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceRequest/AddDiagnosis
[JSON input data] | pIGeneralInvoiceRequest: eDiagnosisType: bstrCode: bstrText: | longValue, //interface address longValue, "utf8StringValue", "utf8StringValue"
[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
C/C++ calling syntax |  |  |
HRESULT AddDiagnosis( | DiagnosisType BSTR BSTR VARIANT_BOOL | eDiagnosisType, bstrCode, bstrText, *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
Calling argument description |  |  |
[in] DiagnosisType | eDiagnosisType | The type of the diagnosis catalog |
[in] BSTR | bstrCode | The code of the diagnosis as given in the corresponding diagnosis catalog defined by DiagnosisType . |
[in] BSTR | bstrText | The textual description of the diagnosis as given in the corresponding diagnosis catalog defined by DiagnosisType . |
[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 |


  • IGeneralInvoiceRequest
  • AddDocument

IGeneralInvoiceRequest::AddDocument method | space
Attaches a PDF, JPG or PNG document -inline- to the list of documents.

Internally, the inline document will be transformed to a BASE64 octet representation to safeguard the binary nature of the file.
space
Restful webservice calling syntax
[POST] | /baseURL/ IGeneralInvoiceRequest/AddDocument?param
[param] pIGeneralInvoiceRequest=longValue&
bstrFile=urlEncodedString&
eDocumentType=longValue&
bstrMimeType=urlEncodedString
+
<application/octet-stream> input_file_upload_stream
[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
C/C++ calling syntax
HRESULT AddDocument( BSTR
DocumentType
BSTR
VARIANT_BOOL 		bstrFile,
eDocumentType,
bstrMimeType,
*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
Calling argument description
[in] BSTR | bstrFile | bstrFile is a full file name (path + name) of the primary document. Be sure, that privileges allows opening and reading the file since the content is internally BASE64 coded.
[in] DocumentType | eDocumentType | eDocumentType describes the document in terms of ist semantic content encoded by a terminal set of tokens
[in] BSTR bstrMimeType The MIME type of the document. The MIME type enables applications to define the format and eventually read the file (cf. RFC 2046 standardizes and names the commonly used MIME types).

Since the underlying XSD schema restricts the type of files, the MIME type must be one of
  • application/pdf for PDF files
  • image/jpeg for JPG graphic files
  • image/png for PNG graphic files
[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


  • IGeneralInvoiceRequest
  • AddInstruction

IGeneralInvoiceRequest::AddInstruction method |  |  | space
Adds one instruction to the list of instructions. The instruction container demanded by cantonal authorities basically consisting as a simple token/value pair whose semantic, grammar, nomenclature as well as its target audience is unstandardized/unknown and bilateral in nature between sender and receiver. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceRequest/AddInstruction
[JSON input data] | pIGeneralInvoiceRequest: bstrToken: bstrValue: | longValue, //interface address "utf8StringValue", "utf8StringValue"
[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
C/C++ calling syntax |  |  |
HRESULT AddInstruction( | BSTR BSTR VARIANT_BOOL | bstrToken, bstrValue, *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
Calling argument description |  |  |
[in] BSTR | bstrToken | The name of the token/value instruction pair |
[in] BSTR | bstrValue | The data of the token/value instruction pair |
[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 |


  • IGeneralInvoiceRequest
  • AddPartner

IGeneralInvoiceRequest::AddPartner method |  |  | space
Adds a partner address and ist mandatory GLN, type as well as some optional other keys like ZSR. Please note that the type, cardinality and scope of the partner address is determined by the applicable law and/or the underlying tariff contract. The types 'service_provider' is an exception to this rule. This type defines/subsumes the address and GLN of all unique service provider and service responsible, that are referenced in service@provider_id, service@responsible_id, serviceEx@provider_id and serviceEx@responsible_id, respectively. Each call of the methods AddService and AddServiceEx does automatically inject an empty address and the defined GLN into the partner list. At least for law=enVVG the corresponding address to the given GLN should be completed. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceRequest/AddPartner
[JSON input data] | pIGeneralInvoiceRequest: ePartnerType: bstrOtherPartnerType: bstrGLN: bstrZSR: pIAddress: | longValue, //interface address longValue, "utf8StringValue", "utf8StringValue", "utf8StringValue", longValue
[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
C/C++ calling syntax |  |  |
HRESULT AddPartner( | PartnerType BSTR BSTR BSTR IAddress VARIANT_BOOL | ePartnerType, bstrOtherPartnerType, bstrGLN, bstrZSR, *pIAddress, *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
Calling argument description |  |  |
[in] PartnerType | ePartnerType | ePartnerType is the type/flavor of a partner encoded by a terminal set of tokens. The partner specification was primarily demanded by the "FinMa - Swiss Financial Market Supervisory Authority" to enhance the billing transparency in VVG cases. |
[in] BSTR | bstrOtherPartnerType | The optional type description of the partner if ePartnerType=enOther is set. |
[in] BSTR | bstrGLN | The GLN of the partner as supplied by Stiftung Refdata |
[in] BSTR | bstrZSR | The optional ZSR number of the partner as supplied by Santesuisse |
[in] IAddress | *pIAddress | The instance of a IAddress interface that holds the structured address parts. A NULL pointer is supplied if no address should be set. |
[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 |


  • IGeneralInvoiceRequest
  • AddService

IGeneralInvoiceRequest::AddService method | space
Adds a service from a simple/normal tariff to the list of services.
The term "normal" means a tariff with a simple (code, name, tax point) structure as opposed to "extended" tariffs whose services are splitted into a medical and technical part (like Tarmed or Tardoc).

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:
  • tariff type 010/swissDRG/drgValidator: pseudo codes allows to control the provider type, and relocation status - cf. New and important features of the drgValidator regarding swissDRG and references therein!
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
Restful webservice calling syntax
[POST] | /baseURL/ IGeneralInvoiceRequest/AddService
[JSON input data] pIGeneralInvoiceRequest:
bstrTariffType:
bstrCode:
bstrReferenceCode:
dQuantity:
lSessionNumber:
lGroupSize:
dDateBegin:
dDateEnd:
bstrProviderGLN:
bstrResponsibleGLN:
eSide:
bstrServiceName:
dUnit:
dUnitFactor:
dExternalFactor:
dAmount:
dVatRate:
bstrRemark:
bstrSectionCode:
eIgnoreValidate:
lServiceAttributes: 		longValue, //interface address
"utf8StringValue",
"utf8StringValue",
"utf8StringValue",
doubleValue,
longValue,
longValue,
variantDateValue | "stringISODateValue",
variantDateValue | "stringISODateValue",
"utf8StringValue",
"utf8StringValue",
longValue,
"utf8StringValue",
doubleValue,
doubleValue,
doubleValue,
doubleValue,
doubleValue,
"utf8StringValue",
"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
C/C++ calling syntax
HRESULT AddService( BSTR
BSTR
BSTR
double
long
long
DATE
DATE
BSTR
BSTR
SideType
BSTR
double
double
double
double
double
BSTR
BSTR
YesNoType
long
long
VARIANT_BOOL 		bstrTariffType,
bstrCode,
bstrReferenceCode,
dQuantity,
lSessionNumber,
lGroupSize,
dDateBegin,
dDateEnd,
bstrProviderGLN,
bstrResponsibleGLN,
eSide,
bstrServiceName,
dUnit,
dUnitFactor,
dExternalFactor,
dAmount,
dVatRate,
bstrRemark,
bstrSectionCode,
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
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.

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 size of a participating group of a service whose quantity is calculated by the "Divisor Method".
It should be noted that the group size is declarative only with a default value equals to 1 implicitly meaning that it is NO service defined via the "Divisor Method" as the group size for such a service is always larger than 1.

Please note that in the "Divisor Method" the quantity is coded by definition as follows: quantity = effective_quantity / group_size.
[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] BSTR bstrProviderGLN The GLN of the service provider as supplied by Stiftung Refdata

Note if bstrProviderGLN is undefined and bstrResponsibleGLN is defined then bstrResponsibleGLN is copied into the bstrProviderGLN variable. If both variables are undefined the pseudo GLN "2099999999998" is set.
[in] BSTR bstrResponsibleGLN The GLN of the responsible for the service as supplied by Stiftung Refdata

Note if bstrResponsibleGLN is undefined and bstrProviderGLN is defined then bstrProviderGLN is copied into the bstrResponsibleGLN variable. If both variables are undefined the pseudo EAN "2099999999998" is set.
[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 | dUnit | Tax points (TP) of the service.
[in] double | dUnitFactor | Tax point value (TPV) of the service.
[in] double dExternalFactor dExternalFactor is an external scaling factor in the provider's responsibility that modulates the corresponding service outside the official tariff structure.
The dExternalFactor is used for discounting or surcharging and can even take a zero value to supply a charge free service.

For tariff «005 - AmbulatoryCaseFlatrate» the tariff owner "OAAT-OTMA" will use the
dExternalFactor 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.

For tariff «010 - DRG» the external factor is used for defining the splitting situation between insurance and canton.
[in] double dAmount The amount in CHF for the service.

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 as real number that should be applied to this service e.g. 0.081 for a VAT rate of 8.1%.
[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] BSTR bstrSectionCode The optional bstrSectionCode stems from a variable set defined by "OAAT-OTMA - Reglement Fachbereiche", that designates the service-providing department within a hospital or medical practice, e.g. 'M100.06' for the gastroenterology department.

The list of all departments is documented elsewhere on the "OAAT-OTMA" website, whereby the tariffs used, the law applied or special contracts stipulates the application/usage of the section code (primarily for body@role=hospital, body@role=rehab_clinic, body@role=psychiatric_clinic).
[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 November 2024
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. In a printed invoice/reminder, bit 1 is written as SA='Code207' in the comment line, case insensitive. If more than one service attribute is set, all defined mnemonics are combined as SA='BitX+BitY+BitZ'.
Bit 2: (0x000002) | franchiseFree: Franchise exemption of given service If this bit ("franchiseFree") is set, the service provider declares that the service was provided as franchise free. In a printed invoice/reminder, bit 2 is written as SA='franchiseFree' in the comment line, case insensitive. If more than one service attribute is set, all defined mnemonics are combined as SA='BitX+BitY+BitZ'.
Bit 3: (0x000004) | drugOffLabelUse: off label use of a drug in accordance with Art. 71a-c KVV If this bit ("drugOffLabelUse") is set, the service provider declares that the off-label prescription of the drug has been approved by the healthcare insurance by means of a prior accepted credit request. In a printed invoice/reminder, bit 3 is written as SA='drugOffLabelUse' in the comment line, case insensitive. If more than one service attribute is set, all defined mnemonics are combined as SA='BitX+BitY+BitZ'.
Bit 4: (0x000008) | withoutDoctorsOrder: Services without a doctor's order (Art. 59 KVV, Abs. 3bis) If this bit ("withoutDoctorsOrder") is set, the service provider declares that the service was provided without a doctor's order. In a printed invoice/reminder, bit 4 is written as SA='withoutDoctorsOrder' in the comment line, case insensitive. If more than one service attribute is set, all defined mnemonics are combined as SA='BitX+BitY+BitZ'.
Bit 5: (0x000010) | noObligation: the applied service is not an obligatory insurance benefit under the given Law (or Contract) If this bit ("noObligation") is set, the service provider declares that the service provided is not an obligatory insurance benefit under the given law (or contract). In a printed invoice/reminder, bit 5 is written as SA='noObligation' in the comment line, case insensitive. If more than one service attribute is set, all defined mnemonics are combined as SA='BitX+BitY+BitZ'.
[out] long *plID This is the returned internal ID of the service record.

This internal ID is used to append extraService, extraDrug and/or xtraDRG information for the focused service with the SetXtraService, 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.
space


  • IGeneralInvoiceRequest
  • AddServiceEx

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
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
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
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


  • IGeneralInvoiceRequest
  • AddXtraService

IGeneralInvoiceRequest::AddXtraService method | space
Allows to add additional service record data for any tariff by setting any number of token=value pairs.

The allowed tokens are fixed named mnemonics with a predefined and known semantics that are defined and being in the responsibility of the
schema owner Forum Datenaustausch
space
Restful webservice calling syntax
[POST] | /baseURL/ IGeneralInvoiceRequest/AddXtraService
[JSON input data] pIGeneralInvoiceRequest:
lID:
bstrToken:
bstrValue: 		longValue, //interface address
longValue,
"utf8StringValue",
"utf8StringValue"
[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
C/C++ calling syntax
HRESULT AddXtraService( long
BSTR
BSTR
VARIANT_BOOL 		lID,
bstrToken,
bstrValue,
*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
Calling argument description
[in] long | lID | The unique ID of the prior defined service for which the xtra service data should be defined.
[in] BSTR bstrToken The token names by definition are case insensitive.

Forum Datenaustausch has defined the following tokens as of November 2024
Token | Meaning
ICD10 | The expression ICD10='icd10_diagnosis_code' (e.g. ICD10='A32.1') allows to define/set an ICD10 diagnosis code applicable to a specific service record for instance for an Ambulatory Case Flaterate (ACF) service record.
TI | The expression TI='ticino_diagnosis_code' (e.g. TI='E7') allows to define/set an Ticino diagnosis code applicable to a specific service record for instance for an Ambulatory Case Flaterate (ACF) service record.
Capitulum | The expression Capitulum='capitulum_chapter' (e.g. Capitulum='Cap01') allows to define/set a specific capitulum of an Ambulatory Case Flaterate (ACF) service record.
SLIndication | The expression SLIndication='sl_indication_code' (e.g. SLIndication='21316.01') allows to define/set a specific SL indication code for a drug record of tariff type 402.
[in] BSTR | bstrValue | The value of the token=value pair
[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


  • IGeneralInvoiceRequest
  • Finalize

IGeneralInvoiceRequest::Finalize method | space
Finalizes and validates all data set so far in the IGeneralInvoiceRequest interface. This method is the counterpart to the Initialize method.

This method should be called after all data have been set in the IGeneralInvoiceRequest interface since higher-level validation rules can only be called at the end of input phase. Therefore, be prepared to get validation errors at that point.

Please note, that apart from validation tasks there are automatic assignments of addresses as well, should such an address be missing.
Eventually the following addresses are cloned in the given sequence:
  • if the guarantor address is missing than it is cloned from the patient's address
  • if the debitor address is missing than dependent on the tiers mode it is clone from the guarantor's address (TG) or the insurance's address (TP)
  • if the ESR creditor address is missing than it is cloned from the biller's address
space
Restful webservice calling syntax
[POST] | /baseURL/ IGeneralInvoiceRequest/Finalize
[JSON input data] pIGeneralInvoiceRequest: longValue, //interface address
[JSON result data] pdRoundDifference:
pbStatus: 		doubleValue,
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
C/C++ calling syntax
HRESULT Finalize( double
VARIANT_BOOL 		*pdRoundDifference,
*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
Calling argument description
[out] double *pdRoundDifference Supplies the rounding difference as defined by
«dRoundDiff = amount(hU) - amount(2d)»

where the amount(2d) is 2-digit precision total amount of all services and
amount(hU) is that total amount rounded half up ("Kaufmännisches Runden")
[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


  • IGeneralInvoiceRequest
  • GetAbortInfo

IGeneralInvoiceRequest::GetAbortInfo method |  |  | space
Get the abort information string with the error coded in the module language. Call this method whenever the returned pbStatus variable of the primarily called method is VARIANT_FALSE and the primarily called method is not an iterator (GetFirst/GetNext). In the later case VARIANT_FALSE signals the end of data. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceRequest/GetAbortInfo
[JSON input data] | pIGeneralInvoiceRequest: | longValue, //interface address
[JSON result data] | pbstrAbort: pbStatus: | "utf8StringValue", 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
C/C++ calling syntax |  |  |
HRESULT GetAbortInfo( | BSTR VARIANT_BOOL | *pbstrAbort, *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
Calling argument description |  |  |
[out] BSTR | *pbstrAbort | Abort information string coded in the module language. |
[out,retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE then an error-in-error situation occurred. |
space |


  • IGeneralInvoiceRequest
  • Initialize

IGeneralInvoiceRequest::Initialize method |  |  | space
Initializes all input data in the IGeneralInvoiceRequest interface. This method is the counterpart to the Finalize method. This method should be called before any input is set in the IGeneralInvoiceRequest interface. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceRequest/Initialize
[JSON input data] | pIGeneralInvoiceRequest: eDataLanguage: | longValue, //interface address longValue
[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
C/C++ calling syntax |  |  |
HRESULT Initialize( | LanguageType VARIANT_BOOL | eDataLanguage, *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
Calling argument description |  |  |
[in] LanguageType | eDataLanguage | Sets the language in which the data part is coded. It is exactly the language in which the response is formulated. Note, that the data language and the module language (given by IGeneralInvoiceRequestManager::SetModuleLanguage property) are independent and can be different! |
[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 |


  • IGeneralInvoiceRequest
  • SetBillerGLN

IGeneralInvoiceRequest::SetBillerGLN method |  |  | space
Sets the biller's structured address as well as its mandatory GLN. Please note that the biller's GLN address does not include a ZSR. Furthermore, the structured address is defined via a IAddress interface instance and the address data must be defined prior to call this method. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceRequest/SetBillerGLN
[JSON input data] | pIGeneralInvoiceRequest: bstrGLN: pIAddress: | longValue, //interface address "utf8StringValue", longValue
[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
C/C++ calling syntax |  |  |
HRESULT SetBillerGLN( | BSTR IAddress VARIANT_BOOL | bstrGLN, *pIAddress, *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
Calling argument description |  |  |
[in] BSTR | bstrGLN | The GLN of the biller as supplied by Stiftung Refdata |
[in] IAddress | *pIAddress | The instance of a IAddress interface that holds the structured address parts. A NULL pointer is supplied if no address should be set. |
[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 |


  • IGeneralInvoiceRequest
  • SetBillerZSR

IGeneralInvoiceRequest::SetBillerZSR method |  |  | space
Sets the biller's structured address as well as its mandatory ZSR. Please note that the biller's ZSR address does not include a GLN. Furthermore, the structured address is defined via a IAddress interface instance and the address data must be defined prior to call this method. Note that the billers's ZSR address is optional in terms of the XSD schema definition. However, it may be the case that the underlying tariff contracts, applied law and/or special contracts between service providers and insurances change the optionality into a mandatory data specification. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceRequest/SetBillerZSR
[JSON input data] | pIGeneralInvoiceRequest: bstrZSR: pIAddress: | longValue, //interface address "utf8StringValue", longValue
[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
C/C++ calling syntax |  |  |
HRESULT SetBillerZSR( | BSTR IAddress VARIANT_BOOL | bstrZSR, *pIAddress, *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
Calling argument description |  |  |
[in] BSTR | bstrZSR | The mandatory ZSR number of the biller as supplied by Santesuisse |
[in] IAddress | *pIAddress | The instance of a IAddress interface that holds the structured address parts. A NULL pointer is supplied if no address should be set. |
[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 |


  • IGeneralInvoiceRequest
  • SetCredit

IGeneralInvoiceRequest::SetCredit method |  |  | space
Sets the optional credit object reference parameters. This object reference is only set if such a credit request was generated and accepted prior to the invoice generation. The credit, invoice and reminder object references (if supplied in the request) form a object reference chain (credit -> invoice -> reminder) with the reminder as topmost object reference if supplied in the request otherwise the invoice is the topmost object reference (the invoice object is mandatory in all cases!). The page "object reference" provides an in-depth description of the concepts of "object reference", "object reference chain", and "topmost object reference". |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceRequest/SetCredit
[JSON input data] | pIGeneralInvoiceRequest: bstrRequestCreditID: dRequestCreditDate: lRequestCreditTimestamp: | longValue, //interface address "utf8StringValue", variantDateValue | "stringISODateValue", longValue
[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
C/C++ calling syntax |  |  |
HRESULT SetCredit( | BSTR DATE long VARIANT_BOOL | bstrRequestCreditID, dRequestCreditDate, lRequestCreditTimestamp, *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
Calling argument description |  |  |
[in] BSTR | bstrRequestCreditID | The request ID is the main software's identification of the credit ("Kostengutsprachenummer"). This is one of 3 identifiers that form the credit object reference. |
[in] DATE | dRequestCreditDate | The request date is the main software's date of the credit request ("Kostengutsprachedatum"). This is one of 3 identifiers that form the credit object reference. |
[in] long | lRequestCreditTimestamp | This is a UNIX timestamp defined at the moment of the credit's infoset generation. This is one of 3 identifiers that form the credit object reference. |
[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 |


  • IGeneralInvoiceRequest
  • SetDebitor

IGeneralInvoiceRequest::SetDebitor method |  |  | space
Sets the debitor's GLN and the structured address. If the debitor is not supplied than dependent on the tiers mode a clone of the guarantor's address (TG) or the insurance's address (TP|TS) is automatically assigned in the Finalize method. The structured address is defined via a Iaddress interface instance and the address data must be defined prior to call this method. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceRequest/SetDebitor
[JSON input data] | pIGeneralInvoiceRequest: bstrGLN: pIAddress: | longValue, //interface address "utf8StringValue", longValue
[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
C/C++ calling syntax |  |  |
HRESULT SetDebitor( | BSTR IAddress VARIANT_BOOL | bstrGLN, *pIAddress, *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
Calling argument description |  |  |
[in] BSTR | bstrGLN | The GLN of the debitor as supplied by Stiftung Refdata Note, that the debitor's GLN is a required parameter. However, debitors in Tiers Garant might not possess such a GLN. Therefore do supply a GLN from the private GLN sector (e.g. 2000000000008) in such a case. |
[in] IAddress | *pIAddress | The instance of a IAddress interface that holds the structured address parts. A NULL pointer is supplied if no address should be set. |
[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 |


  • IGeneralInvoiceRequest
  • SetEsrQR

IGeneralInvoiceRequest::SetEsrQR method |  |  | space
Sets the ESR information of type enEsrQR or enEsrQRplus. Caution: As of 01.10.2022 all payments must be processed exclusively using the new QR method (SetEsrQR() and SetEsrRedQR() methods). |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceRequest/SetEsrQR
[JSON input data] | pIGeneralInvoiceRequest: eEsrType: bstrIBAN: bstrReferenceNumber: bstrCustomerNote: pICreditorAddress: lPaymentPeriod: | longValue, //interface address longValue, "utf8StringValue", "utf8StringValue", "utf8StringValue", longValue, longValue
[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
C/C++ calling syntax |  |  |
HRESULT SetEsrQR( | EsrType BSTR BSTR BSTR IAddress long VARIANT_BOOL | eEsrType, bstrIBAN, bstrReferenceNumber, bstrCustomerNote, *pICreditorAddress, lPaymentPeriod, *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
Calling argument description |  |  |
[in] EsrType | eEsrType | The type of ESR, either 'enEsrQR' or 'enEsrQRplus' |
[in] BSTR | bstrIBAN | The account number in form of a QR-IBAN supplied from the bank. The IBAN format is either the one for Switzerland or Lichtenstein. Please note that a QR-IBAN basically has the digit '3' at the 5th position of the IBAN code. |
[in] BSTR | bstrReferenceNumber | The required ESR reference number in the usual 27-digit form. |
[in] BSTR | bstrCustomerNote | The optional customer note that is part of the QR code. |
[in] IAddress | *pICreditorAddress | The instance of an IAddress interface that defines the creditor address. If a NULL address is defined than a clone of the biller's address is automatically assigned in the Finalize method. However, due to the Anti-Money Laundering Act, Art. 95, 98 FC, the naming of the creditor should be the same as on the bank account and this naming scheme might be different from the biller's address. |
[in] long | lPaymentPeriod | The defined payment period |
[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 |


  • IGeneralInvoiceRequest
  • SetEsrRedQR

IGeneralInvoiceRequest::SetEsrRedQR method |  |  | space
Sets the ES information of type enRedPayinSlipQR (red payin slip with QR code). |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceRequest/SetEsrRedQR
[JSON input data] | pIGeneralInvoiceRequest: eEsrType: bstrIBAN: bstrRemarks: bstrCustomerNote: pICreditorAddress: lPaymentPeriod: | longValue, //interface address longValue, "utf8StringValue", "utf8StringValue", "utf8StringValue", longValue, longValue
[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
C/C++ calling syntax |  |  |
HRESULT SetEsrRedQR( | EsrType BSTR BSTR BSTR IAddress long VARIANT_BOOL | eEsrType, bstrIBAN, bstrRemarks, bstrCustomerNote, *pICreditorAddress, lPaymentPeriod, *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
Calling argument description |  |  |
[in] EsrType | eEsrType | The subtype of esrReqQR basically either with or without an amount: eEsrType = (enRedPayinSlipQR|enRedPayinSlipQRPlus) |
[in] BSTR | bstrIBAN | The account number in form of a regular IBAN supplied from the bank. The IBAN format is either the one for Switzerland or Lichtenstein. Please note that a QR-IBAN (basically having a digit '3' at the 5th position of the IBAN code) is not allowed here! |
[in] BSTR | bstrRemarks | The optional remark that should be printed on the red payin slip |
[in] BSTR | bstrCustomerNote | The optional customer note that is part of the QR code. |
[in] IAddress | *pICreditorAddress | The instance of an IAddress interface that defines the creditor address. If a NULL address is defined than a clone of the biller's address is automatically assigned in the Finalize method. However, due to the Anti-Money Laundering Act, Art. 95, 98 FC, the naming of the creditor should be the same as on the bank account and this naming scheme might be different from the biller's address. |
[in] long | lPaymentPeriod | The defined payment period |
[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 |


  • IGeneralInvoiceRequest
  • SetGuarantor

IGeneralInvoiceRequest::SetGuarantor method |  |  | space
Sets the guarantor's structured address. The guarantor is the legal representative and debtor of the premiums. The address is defined via an IAddress interface pointer and the address data must be defined prior to call this method. Please note, that a clone of the patient"s address is automatically assigned as guarantor address in the Finalize method should the SetGuarantor method not be called. Furthermore, dependent on the tiers mode a clone of the guarantor's address (TG) or the insurance's address (TP) is automatically assigned as debitor address in the Finalize method should the SetDebitor method not be called. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceRequest/SetGuarantor
[JSON input data] | pIGeneralInvoiceRequest: bstrGLN: bstrUID: pIAddress: | longValue, //interface address "utf8StringValue", "utf8StringValue", longValue
[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
C/C++ calling syntax |  |  |
HRESULT SetGuarantor( | BSTR BSTR IAddress VARIANT_BOOL | bstrGLN, bstrUID, *pIAddress, *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
Calling argument description |  |  |
[in] BSTR | bstrGLN | The GLN of the guarantor as supplied by Stiftung Refdata Note, that the guarantor's GLN is a required parameter. However, guarantors might not possess such a GLN. Therefore do supply a GLN from the private GLN sector (e.g. 2000000000008) in such a case. |
[in] BSTR | bstrUID | The optional bstrUID is the UID of the guarantor in the electronic layout as defined by the "Swiss Federal Tax Administration". In the electronic layout all punctuation characters ('-' and '.') are striped. |
[in] IAddress | *pIAddress | The instance of a IAddress interface that holds the structured address parts. A NULL pointer is supplied if no address should be set. |
[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 |


  • IGeneralInvoiceRequest
  • SetInsurance

IGeneralInvoiceRequest::SetInsurance method |  |  | space
Sets the GLN and the structured address of the insurance. The address is defined via an IAddress interface pointer and the address data must be defined prior to call this method. Please note, that dependent on the tiers mode a clone of the guarantor's address (TG) or the insurance's address (TP) is automatically assigned as debitor address in the Finalize method should the SetDebitor method not be called. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceRequest/SetInsurance
[JSON input data] | pIGeneralInvoiceRequest: bstrGLN: pIAddress: | longValue, //interface address "utf8StringValue", longValue
[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
C/C++ calling syntax |  |  |
HRESULT SetInsurance( | BSTR IAddress VARIANT_BOOL | bstrGLN, *pIAddress, *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
Calling argument description |  |  |
[in] BSTR | bstrGLN | The GLN of the insurance as supplied by Stiftung Refdata |
[in] IAddress | *pIAddress | The instance of a IAddress interface that holds the structured address parts. A NULL pointer is supplied if no address should be set. |
[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 |


  • IGeneralInvoiceRequest
  • SetInsured

IGeneralInvoiceRequest::SetInsured method | space
Sets the primary parameters and structured address of an insured person that is in fact the mother's address of a newborn.
If the following conditions are true then and only then the mother's address of a newborn must be supplied:
  • it is an invoice of a stationary DRG case
  • the DRG position defines a normal birth
  • the patient is the healthy newborn
In all other circumstances the semantics of "insured" is unknown.

The address is defined via an IAddress interface pointer and the address data must be defined prior to call this method.
space
Restful webservice calling syntax
[POST] | /baseURL/ IGeneralInvoiceRequest/SetInsured
[JSON input data] pIGeneralInvoiceRequest:
eSexType:
eGenderType:
dBirthdate:
bstrSSN:
bstrInsuredID:
pIAddress: 		longValue, //interface address
longValue,
longValue,
variantDateValue | "stringISODateValue",
"utf8StringValue",
"utf8StringValue",
longValue
[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
C/C++ calling syntax
HRESULT SetInsured( SexType
GenderType
DATE
BSTR
BSTR
IAddress
VARIANT_BOOL 		eSexType,
eGenderType,
dBirthdate,
bstrSSN,
bstrInsuredID,
*pIAddress,
*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
Calling argument description
[in] SexType | eSexType | The insured's medical sex (pre-dominantly induced by the actual hormonal balance of the body) encoded by a terminal set of tokens.
[in] GenderType | eGenderType | The insured's social gender encoded by a terminal set of tokens
[in] DATE | dBirthdate | The insured's birthdate.
[in] BSTR bstrSSN Defines the requiered insured's social security number (SSN) in the printed form whereupon 3 distinguished types are possible:
  • the new 13 digit Swiss SSN ("SV-Nummer") beginning with 756 as defined by Federal Social Insurance Office
  • the new 4-10 digit SSN of Liechtenstein ("AHV-Nummer") as defined by Liechtensteinische AHV-IV-FAK
  • the 13 digit IDNR number of Liechtenstein ("IDNR-Nummer") beginning with 438

If for any reasons the SSN of the insured person is unknown, than the unknownSSN = 7569999999991 must be defined to satisfy the schema validity!
[in] BSTR bstrInsuredID bstrInsuredID defines the required 20-digits official card insurance ID of the insured person.
If this ID is unknown or unavailable then supply the old proprietary 7-digits insurance ID identifying the insured at the insurance.
[in] IAddress *pIAddress The instance of a IAddress interface that holds the structured address parts.
A NULL pointer is supplied if no address should be set.
[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


  • IGeneralInvoiceRequest
  • SetInvoice

IGeneralInvoiceRequest::SetInvoice method |  |  | space
Sets the invoice object reference parameters. The credit, invoice and reminder object references (if supplied in the request) form a object reference chain (credit -> invoice -> reminder) with the reminder as topmost object reference if supplied in the request otherwise the invoice is the topmost object reference (the invoice object is mandatory in all cases!). The page "object reference" provides an in-depth description of the concepts of "object reference", "object reference chain", and "topmost object reference". |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceRequest/SetInvoice
[JSON input data] | pIGeneralInvoiceRequest: bstrRequestInvoiceID: dRequestInvoiceDate: lRequestInvoiceTimestamp: | longValue, //interface address "utf8StringValue", variantDateValue | "stringISODateValue", longValue
[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
C/C++ calling syntax |  |  |
HRESULT SetInvoice( | BSTR DATE long VARIANT_BOOL | bstrRequestInvoiceID, dRequestInvoiceDate, lRequestInvoiceTimestamp, *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
Calling argument description |  |  |
[in] BSTR | bstrRequestInvoiceID | The request ID is the main software's identification of the invoice ("Rechnungsnummer"). This is one of 3 identifiers that form the invoice object reference. |
[in] DATE | dRequestInvoiceDate | The request date is the main software's date of the invoice request ("Rechnungsdatum") This is one of 3 identifiers that form the invoice object reference. |
[in] long | lRequestInvoiceTimestamp | This is a UNIX timestamp defined at the moment of the invoice infoset generation. Set this variable 0 to indicate the generation of a new invoice object reference. The IGeneralInvoiceRequestManager::GetXML and/or IGeneralInvoiceRequestManager::Print method will return the timestamp that must be used from that point on as 3rd parameter of the object reference. This is one of 3 identifiers that form the invoice object reference. The timestamp will be generated once for a certain invoice object reference and thereafter the timestamp is always referenced. |
[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 |


  • IGeneralInvoiceRequest
  • SetLaw

IGeneralInvoiceRequest::SetLaw method |  |  | space
Sets the data about the applied law and its dependent information |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceRequest/SetLaw
[JSON input data] | pIGeneralInvoiceRequest: eLawType: dCaseDate: bstrCaseID: bstrInsuredID: | longValue, //interface address longValue, variantDateValue | "stringISODateValue", "utf8StringValue", "utf8StringValue"
[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
C/C++ calling syntax |  |  |
HRESULT SetLaw( | LawType DATE BSTR BSTR VARIANT_BOOL | eLawType, dCaseDate, bstrCaseID, bstrInsuredID, *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
Calling argument description |  |  |
[in] LawType | eLawType | The type of law to set from the LawType enumeration |
[in] DATE | dCaseDate | The case date of the insurance (e.g. date of accident in UVG) This date might be undefined for certain laws (e.g. KVG|VVG) and left empty in such a case |
[in] BSTR | bstrCaseID | The case ID of the insurance (e.g. accident number in UVG) This ID might be undefined for certain laws (e.g. KVG|VVG) and left empty in such a case |
[in] BSTR | bstrInsuredID | bstrInsuredID defines the required 20-digits official card ID of the patient. If this ID is unknown or unavailable then supply the old proprietary 7-digits insurance ID identifying the patient at the insurance. This insuredID might be undefined for certain laws (e.g. UVG|MVG) and left empty in such a case. |
[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 |


  • IGeneralInvoiceRequest
  • SetPackage

IGeneralInvoiceRequest::SetPackage method |  |  | space
Defines the identification parameters of the main software. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceRequest/SetPackage
[JSON input data] | pIGeneralInvoiceRequest: bstrSoftwarePackage: lSoftwareVersion: lSoftwareID: bstrSoftwareCopyright: | longValue, //interface address "utf8StringValue", longValue, longValue, "utf8StringValue"
[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
C/C++ calling syntax |  |  |
HRESULT SetPackage( | BSTR long long BSTR VARIANT_BOOL | bstrSoftwarePackage, lSoftwareVersion, lSoftwareID, bstrSoftwareCopyright, *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
Calling argument description |  |  |
[in] BSTR | bstrSoftwarePackage | Name of the main software. |
[in] long | lSoftwareVersion | Version of the main software coded as 32-bit value where lSoftwareVersion = 100*Major version + Minor version. |
[in] long | lSoftwareID | Optional ID of the main software |
[in] BSTR | bstrSoftwareCopyright | The copyright notice of the main software. |
[out,retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE then no package data is available |
space |


  • IGeneralInvoiceRequest
  • SetPatient

IGeneralInvoiceRequest::SetPatient method | space
Sets the primary parameters and structured address of the patient.

Please note, that a clone of the patient"s address is automatically assigned as guarantor address in the Finalize method should the SetGuarantor method not be called.

The address is defined via an IAddress interface pointer and the address data must be defined prior to call this method.
space
Restful webservice calling syntax
[POST] | /baseURL/ IGeneralInvoiceRequest/SetPatient
[JSON input data] pIGeneralInvoiceRequest:
eSexType:
eGenderType:
dBirthdate:
bstrSSN:
pIAddress: 		longValue, //interface address
longValue,
longValue,
variantDateValue | "stringISODateValue",
"utf8StringValue",
longValue
[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
C/C++ calling syntax
HRESULT SetPatient( SexType
GenderType
DATE
BSTR
IAddress
VARIANT_BOOL 		eSexType,
eGenderType,
dBirthdate,
bstrSSN,
*pIAddress,
*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
Calling argument description
[in] SexType | eSexType | The patient's medical sex (pre-dominantly induced by the actual hormonal balance of the body) encoded by a terminal set of tokens.
[in] GenderType | eGenderType | The patient's social gender encoded by a terminal set of tokens
[in] DATE | dBirthdate | The patient's birthdate.
[in] BSTR bstrSSN Defines the required patient's social security number (SSN) whereupon 3 distinguished types are allowed:
  • the new 13 digit Swiss SSN ("SV-Nummer") beginning with 756 as defined by Federal Social Insurance Office
  • the new 4-10 digit SSN of Liechtenstein ("AHV-Nummer") as defined by Liechtensteinische AHV-IV-FAK
  • the 13 digit IDNR number of Liechtenstein ("IDNR-Nummer") beginning with 438

If for any reasons the SSN of the patient is unknown, than the unknownSSN = 7569999999991 must be defined to satisfy the schema validity!
[in] IAddress | *pIAddress | Pointer to an IAddress interface instance that holds the structured address parts.
[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


  • IGeneralInvoiceRequest
  • SetProcessing

IGeneralInvoiceRequest::SetProcessing method | space
Sets the defined processing information that are in effect at the site of the last intermediate.
space
Restful webservice calling syntax
[POST] | /baseURL/ IGeneralInvoiceRequest/SetProcessing
[JSON input data] pIGeneralInvoiceRequest:
ePrintPatientInvoiceOnly:
ePrintCopyToGuarantor:
bstrTrustCenterGLN: 		longValue, //interface address
longValue,
longValue,
"utf8StringValue"
[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
C/C++ calling syntax
HRESULT SetProcessing( YesNoType
YesNoType
BSTR
VARIANT_BOOL 		ePrintPatientInvoiceOnly,
ePrintCopyToGuarantor,
bstrTrustCenterGLN,
*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
Calling argument description
[in] YesNoType ePrintPatientInvoiceOnly The Boolean ePrintPatientInvoiceOnly is an instruction for the last intermediate whether to print out the patient summary form only without any additional accompanying forms like "Rückerstattungsbeleg" or "TP-Rechnung" or "Barcode Annex".

The Boolean is primarily relevant in a genuine invoicing process of a Tiers Garant case in which the remaining amount (Tiers Soldant deductible or modified/unpaid Tiers Payant services) is claimed directly from the patient/guarantor. Since the insurance company already has the original TS or TP document, no further document addressed to the insurance company needs to be printed out and sent to the patient!
[in] YesNoType | ePrintCopyToGuarantor | The Boolean ePrintCopyToGuarantor is an instruction for the last intermediate in a Tiers Payant case whether a printed copy of the invoice should be sent to the guarantor's address, basically to fulfill the legal requirement of a "patient copy".
[in] BSTR bstrTrustCenterGLN bstrTrustCenterGLN instructs the last intermediate to send a copy of the XML infoset to the defined trust center defined by the GLN.

It should be noted that
  • this process is to be considered as 2nd process. Therefore, it is carried out with the best effort and without the possibility of error propagation to the sender. Under all circumstances, the processing of the 1st process (the delivery to transport@from) must not be affected by a potentially occurring error in the 2nd process!
[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


  • IGeneralInvoiceRequest
  • SetProviderGLN

IGeneralInvoiceRequest::SetProviderGLN method |  |  | space
Sets the provider's structured address as well as its mandatory GLN. Please note that the provider's GLN address does not include a ZSR. Furthermore, the structured address is defined via a IAddress interface instance and the address data must be defined prior to call this method. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceRequest/SetProviderGLN
[JSON input data] | pIGeneralInvoiceRequest: bstrGLN: bstrGLNLocation: pIAddress: | longValue, //interface address "utf8StringValue", "utf8StringValue", longValue
[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
C/C++ calling syntax |  |  |
HRESULT SetProviderGLN( | BSTR BSTR IAddress VARIANT_BOOL | bstrGLN, bstrGLNLocation, *pIAddress, *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
Calling argument description |  |  |
[in] BSTR | bstrGLN | The GLN of the provider as supplied by Stiftung Refdata |
[in] BSTR | bstrGLNLocation | The bstrGLNLocation codes the provider's workplace by a required GLN as defined by RefData If there is no such specific workplace defined then input the bstrGLN as its GLN location, basically defining the default workplace/location. |
[in] IAddress | *pIAddress | The instance of a IAddress interface that holds the structured address parts. A NULL pointer is supplied if no address should be set. |
[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 |


  • IGeneralInvoiceRequest
  • SetProviderZSR

IGeneralInvoiceRequest::SetProviderZSR method |  |  | space
Sets the provider's structured address as well as its mandatory ZSR. Please note that the provider's ZSR address does not include a GLN. Furthermore, the structured address is defined via a IAddress interface instance and the address data must be defined prior to call this method. Note that the providers's ZSR address is optional in terms of the XSD schema definition. However, it may be the case that the underlying tariff contracts, applied law and/or special contracts between service providers and insurances change the optionality into a mandatory data specification. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceRequest/SetProviderZSR
[JSON input data] | pIGeneralInvoiceRequest: bstrZSR: pIAddress: | longValue, //interface address "utf8StringValue", longValue
[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
C/C++ calling syntax |  |  |
HRESULT SetProviderZSR( | BSTR IAddress VARIANT_BOOL | bstrZSR, *pIAddress, *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
Calling argument description |  |  |
[in] BSTR | bstrZSR | The mandatory ZSR number of the provider as supplied by Santesuisse |
[in] IAddress | *pIAddress | The instance of a IAddress interface that holds the structured address parts. A NULL pointer is supplied if no address should be set. |
[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 |


  • IGeneralInvoiceRequest
  • SetReminder

IGeneralInvoiceRequest::SetReminder method |  |  | space
Sets the reminder object reference parameters. The credit, invoice and reminder object references (if supplied in the request) form a object reference chain (credit -> invoice -> reminder) with the reminder as topmost object reference if supplied in the request otherwise the invoice is the topmost object reference (the invoice object is mandatory in all cases!). The page "object reference" provides an in-depth description of the concepts of "object reference", "object reference chain", and "topmost object reference". |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceRequest/SetReminder
[JSON input data] | pIGeneralInvoiceRequest: bstrRequestReminderID: dRequestReminderDate: lRequestReminderTimestamp: lReminderLevel: bstrReminderText: dAmountReminder: | longValue, //interface address "utf8StringValue", variantDateValue | "stringISODateValue", longValue, longValue, "utf8StringValue", 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
C/C++ calling syntax |  |  |
HRESULT SetReminder( | BSTR DATE long long BSTR double VARIANT_BOOL | bstrRequestReminderID, dRequestReminderDate, lRequestReminderTimestamp, lReminderLevel, bstrReminderText, dAmountReminder, *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
Calling argument description |  |  |
[in] BSTR | bstrRequestReminderID | The request ID is the main software's identification of the reminder ("Mahnnummer"). This is one of 3 identifiers that form the reminder object reference. |
[in] DATE | dRequestReminderDate | The request date is the main software's date of the reminder request ("Mahndatum"). This is one of 3 identifiers that form the reminder object reference. |
[in] long | lRequestReminderTimestamp | This is a UNIX timestamp defined at the moment of the reminder infoset generation. Set this variable 0 to indicate the generation of a new reminder object reference. The IGeneralInvoiceRequestManager::GetXML and/or IGeneralInvoiceRequestManager::Print method will return the timestamp that must be used from that point on as 3rd parameter of the object reference. This is one of 3 identifiers that form the reminder object reference. The timestamp will be generated once for a certain reminder object reference and thereafter the timestamp is always referenced. |
[in] long | lReminderLevel | The lReminderLevel is the main software's reminder level ("Mahnstufe") which must be between 1 and 3. |
[in] BSTR | bstrReminderText | A reminder text that is either in plain text format or RTF format. Note that the reminder text is printed instead of the remark if bstrReminderText is set here. |
[in] double | dAmountReminder | The optional reminder charge. |
[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 |


  • IGeneralInvoiceRequest
  • SetRequest

IGeneralInvoiceRequest::SetRequest method |  |  | space
Sets the primary parameters of the request, namely the language the data is supplied, the "storno" and "copy" status besides an optional remark. Note, that whenever the "storno" and/or "copy" parameters are set then the timestamp of the topmost object reference (SetInvoice or SetReminder) must be defined as >0 otherwise an error will result in the Finalize method. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceRequest/SetRequest
[JSON input data] | pIGeneralInvoiceRequest: eRoleType: ePlaceType: bstrRoleTitle: eRequestType: eRequestSubtype: bstrRefundList: bstrRemark: | longValue, //interface address longValue, longValue, "utf8StringValue", longValue, longValue, "utf8StringValue", "utf8StringValue"
[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
C/C++ calling syntax |  |  |
HRESULT SetRequest( | RoleType PlaceType BSTR RequestType RequestSubtype BSTR BSTR VARIANT_BOOL | eRoleType, ePlaceType, bstrRoleTitle, eRequestType, eRequestSubtype, bstrRefundList, bstrRemark, *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
Calling argument description |  |  |
[in] RoleType | eRoleType | Defines the role categories that the main provider is best categorized. If the main provider has an other role than defined then use enRoleOther and additionally supply a role title with a description of the role |
[in] PlaceType | ePlaceType | Defines the principle place where the main provider is applying the treatment |
[in] BSTR | bstrRoleTitle | Optional role title/description of the main provider. If a suitable predefined role can not be set then bstrRoleTitle is mandatory (use enRoleOther as role in that case) |
[in] RequestType | eRequestType | Defines the principle type of request encoded by a terminal set of tokens. Currently, there are two request types allowed: 'invoice' and 'reminder' |
[in] RequestSubtype | eRequestSubtype | Subspecifies the XML infoset with respect to its modification from the standard data space. Such a modification can be seen as a request variation, subsuming a specific data set, where the set of discrete subtypes is encoded by a terminal set of tokens. |
[in] BSTR | bstrRefundList | If eRequestSubtype= enRequestSubtypeRefund and services have been prior loaded using LoadXML than the quantity of services given in the supplied comma-separated list of service Ids are multiplied by -1, whereas the quantity of the remaining services are nullified. |
[in] BSTR | bstrRemark | An overall optional remark for the invoice/reminder Note that the reminder text is printed instead of the remark if bstrReminderText is set in the SetReminder method. |
[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 |


  • IGeneralInvoiceRequest
  • SetTiers

IGeneralInvoiceRequest::SetTiers method | space
Sets the Tiers Garant (TG), Tiers Soldant (TS) or Tiers Payant (TP) mode together with the VAT number and some other data.

  • In the TG case a prepaid amount can be defined, such that the due amount is calculated as «amount + reminder amount - prepaid amount».
  • In the TS case or TP case the prepaid amount must be zero, as the debitor is not the patient (that prepaid the amount!)!
space
Restful webservice calling syntax
[POST] | /baseURL/ IGeneralInvoiceRequest/SetTiers
[JSON input data] pIGeneralInvoiceRequest:
eTiersMode:
ePatientAllowTS:
eAllowTPModification:
bstrVatNumber:
dAmountPrepaid: 		longValue, //interface address
longValue,
longValue,
longValue,
"utf8StringValue",
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
C/C++ calling syntax
HRESULT SetTiers( TiersModeType
YesNoType
YesNoType
BSTR
double
VARIANT_BOOL 		eTiersMode,
ePatientAllowTS,
eAllowTPModification,
bstrVatNumber,
dAmountPrepaid,
*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
Calling argument description
[in] TiersModeType | eTiersMode | The tiers mode ("Tiers Garant" or "Tiers Payant") is set from the TiersMode enumeration list
[in] YesNoType ePatientAllowTS The Boolean ePatientAllowTS confirms that the patient allows the usage of Tiers Soldant (TS).
Furthermore, it implies the existence of a salary cession document signed by the patient and included as PDF attachment.
Please note, that if ePatientAllowTS=enNo then the request should not be processed at the insurance's site but rejected due to the missing approval.
[in] YesNoType eAllowTPModification The Boolean eAllowTPModification gives or denies the placet for the health care insurance to correct quantities of supplied services.

The service quantity can be changed in the range R0+ (positive real numbers including zero), which changes the amounts of individual services as well as the total invoice amount and the vat accounting.
Please note that if eAllowTPModification=enNo, the entire request should be rejected if the insurance company questions one or more services.
[in] BSTR bstrVatNumber The VAT number of the biller as given by the "Swiss Federal Tax Administration". if he possesses one.

Both forms the old 6-digit number as well as the new UID dependent number are allowed. The latter one can be given in its full form, as UID, or just the digits whereas the last digit is automatically expanded if missing.
[in] double dAmountPrepaid The prepaid amount.
The due amount is calculated as «amount + reminder amount - prepaid amount»

As of version 450, the prepaid amount is fixed to 0.00 in the TP case. If this rule is violated then an error is returned from the finalizing step Finalize.
[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


  • IGeneralInvoiceRequest
  • SetTransport

IGeneralInvoiceRequest::SetTransport method | space
Sets transport information that is the routing information going from a sender (from) over the first intermediate (via) to the receiver (to). All the involved parties are defined by GLN numbers as defined by Stiftung Refdata.

Furthermore, the underlaying standard generalInvoiceRequest500 defines 2 very special, semantically loaded GLN, that can be used for special routing.
  • <attribute name='define_gln_printcenter' type='invoice:glnPartyType' fixed='2005555555003'/>
    The 'printCenterGLN'='2005555555003' used as to variable forces a printout at the print center of the intermediate no matter what other parameters of the XML infoset are!

    Conversely, please note that if an unknown GLN (not the printCenterGLN) is used in a TG case, this will result in a rejection due to unclear routing - there is no automatic printout!
  • <attribute name='define_gln_norecipient' type='invoice:glnPartyType' fixed='2006666666008'/>
    The 'noRecipientGLN'='2006666666008' used as to variable forces a deletion of this primary process at the intermediate after all secondary processes are satiesfied.
    These secondary processes are:
    • sending a patient copy to the guarantor if ePrintCopyToGuarantor=enYes in IGeneralInvoiceRequest::SetProcessing() of a TP case!
    • sending the current XML infoset to the designated TrustCenter if bstrTrustCenterGLN='gln' in IGeneralInvoiceRequest::SetProcessing(). Such an action is neccessary for a storno XML that is signaled
      to the TrustCenter but not to the primary recipient (because the storno is due to a rejected XML).
space
Restful webservice calling syntax
[POST] | /baseURL/ IGeneralInvoiceRequest/SetTransport
[JSON input data] pIGeneralInvoiceRequest:
bstrFromGLN:
bstrFromPFXFile:
bstrFromPFXPassword:
bstrViaGLN:
bstrToGLN:
bstrToBinDERFile: 		longValue, //interface address
"utf8StringValue",
"utf8StringValue",
"utf8StringValue",
"utf8StringValue",
"utf8StringValue",
"utf8StringValue"
[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
C/C++ calling syntax
HRESULT SetTransport( BSTR
BSTR
BSTR
BSTR
BSTR
BSTR
VARIANT_BOOL 		bstrFromGLN,
bstrFromPFXFile,
bstrFromPFXPassword,
bstrViaGLN,
bstrToGLN,
bstrToBinDERFile,
*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
Calling argument description
[in] BSTR | bstrFromGLN | The GLN of the sender as supplied by Stiftung Refdata
[in] BSTR bstrFromPFXFile The file name of the PFX certificate that is the private certificate of the "from" entity.
If the variable is empty or NULL then no signature is applied otherwise a signature might be applied depending on the lXMLGenerationAttributes of the GetXML method.
[in] BSTR | bstrFromPFXPassword | The password to open the PFX certificate. The password is only used if a PFX certificate is supplied.
[in] BSTR | bstrViaGLN | The GLN of the first intermediate as supplied by Stiftung Refdata
[in] BSTR bstrToGLN The GLN of the receiver as supplied by Stiftung Refdata
  • bstrToGLN='2005555555003' forces routing to the print center (mnemonic 'printCenterGLN')
  • bstrToGLN='2006666666008' forces routing to /dev/null aka deletion (mnemonic 'noRecipientGLN')
[in] BSTR bstrToBinDERFile The file name of the binary DER certificate that is the public certificate of the "to" entity.
If the variable is empty or NULL then no encryption is applied otherwise encryption might be applied depending on the lXMLGenerationAttributes of the GetXML
[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


  • IGeneralInvoiceRequest
  • SetTreatment

IGeneralInvoiceRequest::SetTreatment method |  |  | space
Sets the basic treatment parameters. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceRequest/SetTreatment
[JSON input data] | pIGeneralInvoiceRequest: bstrAPID: bstrACID: dDateBegin: dDateEnd: eTreatmentCanton: eTreatmentType: eTreatmentReason: dGestationWeek13: dEndOfBirth: | longValue, //interface address "utf8StringValue", "utf8StringValue", variantDateValue | "stringISODateValue", variantDateValue | "stringISODateValue", longValue, longValue, longValue, variantDateValue | "stringISODateValue", variantDateValue | "stringISODateValue"
[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
C/C++ calling syntax |  |  |
HRESULT SetTreatment( | BSTR BSTR DATE DATE CantonType TreatmentType TreatmentReasonType DATE DATE VARIANT_BOOL | bstrAPID, bstrACID, dDateBegin, dDateEnd, eTreatmentCanton, eTreatmentType, eTreatmentReason, dGestationWeek13, dEndOfBirth, *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
Calling argument description |  |  |
[in] BSTR | bstrAPID | The optional Administrative Patient IDentification. |
[in] BSTR | bstrACID | The optional Administrative Case IDentification. |
[in] DATE | dDateBegin | dDateBegin is the start of the treatment Note, that the date of every service must be greater or equal dDateBegin otherwise it is a content error |
[in] DATE | dDateEnd | dDateEnd is the end of the treatment Note, that the date of every service must be less or equal dDateEnd otherwise it is a content error |
[in] CantonType | eTreatmentCanton | The treatment canton given by the CantonType enumeration |
[in] TreatmentType | eTreatmentType | The treatment type (ambulatory or stationary) given by the TreatmentType enumeration |
[in] TreatmentReasonType | eTreatmentReason | The treatment reason given by the TreatmentReasonType enumeration |
[in] DATE | dGestationWeek13 | Any day of the 13th gestation week as requested by Article 105 of the Swiss Federal Act on Health Insurance (KVV). This date is set once in the first invoice about a pregnancy if (peTreatmentReason=enMaternity AND law=enKVG ). In any other case a value of 0 is defined, basically to "empty" the semantic meaning. |
[in] DATE | dEndOfBirth | The dEndOfBirth date is defined when the placenta has been completely expelled from the body. This date is required only if (peTreatmentReason=enMaternity AND law=enKVG ). In any other case a value of 0 is defined, basically to "empty" the semantic meaning. |
[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 |


  • IGeneralInvoiceRequest
  • SetXtraDRG

IGeneralInvoiceRequest::SetXtraDRG method |  |  | space
Defines the splitting ratio between the two remaining parties if a 3-party splitting situation must be described! |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceRequest/SetXtraDRG
[JSON input data] | pIGeneralInvoiceRequest: lID: dCostFraction: | longValue, //interface address longValue, 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
C/C++ calling syntax |  |  |
HRESULT SetXtraDRG( | long double VARIANT_BOOL | lID, dCostFraction, *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
Calling argument description |  |  |
[in] long | lID | The internal ID of the DRG service record returned in the AddService method to which the extra DRG information is appended. |
[in] double | dCostFraction | Defines the splitting ratio between the two remaining parties of a 3-party splitting situation, whereas the service@externalFactor defines the splitting between the debitor and the other two parties. The cost_fraction is provided solely for informational purposes of the debitor. For example, if the debitor has to pay 40%, meaning service@externalFactor=0.4, then a cost fraction=0.5 would define a cost split of 50% each for the remaining two parties. |
[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 |


  • IGeneralInvoiceRequest
  • SetXtraDrug

IGeneralInvoiceRequest::SetXtraDrug method | space
Sets additional input data for the given drug service record if and only if eRoleType=enRolePharmacist.

The defined bit positions for lRegulationAttributes are from November 2024
space
Restful webservice calling syntax
[POST] | /baseURL/ IGeneralInvoiceRequest/SetXtraDrug
[JSON input data] pIGeneralInvoiceRequest:
lID:
lRegulationAttributes: 		longValue, //interface address
longValue,
longValue
[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
C/C++ calling syntax
HRESULT SetXtraDrug( long
long
VARIANT_BOOL 		lID,
lRegulationAttributes,
*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
Calling argument description
[in] long | lID | The internal ID of the drug service record returned in the AddService method to which the extra drug information are appended.
[in] long lRegulationAttributes lRegulationAttributes is a 32 bit integer where each bit defines one specific regulation code as contracted between pharmacists and insurances. The individual regulation codes can be ORed together to form to overall regulation.

The defined bit positions for lRegulationAttributes are of November 2024
Bit |  | Code | Meaning
Bit 1 | (0x000001) | code 100 | "Nicht-SL Produkt ist vom Vertrauensarzt bewilligt worden" "Produit non LS a été autorisé par le médecin-conseil"
Bit 2 | (0x000002) | code 101 | "Notfall: Abgabe eines anderen Produktes als auf dem Rezept" "Cas d'urgence: remise d'un autre produit que celui figurant sur l'ordonnance"
Bit 3 | (0x000004) | code 102 | "Abgabe eines anderen Produktes als auf dem Rezept in Rücksprache mit dem Arzt" "Remise d'un autre produit, après consultation du médecin, que celui figurant sur l'ordonnance"
Bit 4 | (0x000008) | code 103 | "Abgabe einer grösseren Packung (nicht-SL) anstelle von mehreren kleineren Packungen (SL)" "Remise d'un emballage plus grand (non LS) en lieu et place de plusieurs emballages plus petits (LS)"
Bit 5 | (0x000010) | code 104 | "Abgabe einer kleineren Anzahl Packungen als verschrieben" "Remise d'un nombre moins élevé d'emballages que le nombre prescrit"
Bit 6 | (0x000020) | code 105 | "Abgabe einer kleineren Packung als verschrieben" "Remise d'un plus petit emballage que la grandeur prescrite"
Bit 7 | (0x000040) | code 106 | "SL-Limitation vom Vertrauensarzt aufgehoben" "Limitation LS supprimée par le médecin-conseil"
Bit 8 | (0x000080) | code 107 | "Lehnt der Arzt oder die Ärztin beziehungsweise der Chiropraktor oder die Chiropraktorin aus medizinischen Gründen eine Substitution des Originalpräparats ab, so kommt der Selbstbehalt von 40% nicht zur Anwendung." "Refus de substitution du médicament original par le médecin ou le chiropraticien pour raisons médicales - 40% de participation ne s'applique pas."
Bit 9 | (0x000100) | code 108 | "Lehnt der Apotheker oder die Apothekerin aus medizinischen Gründen eine Substitution des Originalpräparats ab, so kommt der Selbstbehalt von 40% nicht zur Anwendung." "Refus de substitution du médicament original par le pharmacien ou la pharmacienne pour raisons médicales - 40% de participation ne s'applique pas."
Bit 10 | (0x000200) | code 109 | "Dem Apotheker liegt eine Kostengutsprache nach Art. 71a-c KVV vor." "Le pharmacien dispose d'une garantie de prise en charge des coûts selon l'art. 71a-c OAMal."
[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


  • IGeneralInvoiceRequest
  • SetXtraHospital

IGeneralInvoiceRequest::SetXtraHospital method | space
Sets additional treatment data if eRoleType=enRoleHospital and/or ePlaceType=enPlaceHospital.

If this method is used then it does implicitly mean that the "hospital" invoice form is used in printing the detailed invoice/reminder.
space
Restful webservice calling syntax
[POST] | /baseURL/ IGeneralInvoiceRequest/SetXtraHospital
[JSON input data] pIGeneralInvoiceRequest:
eTreatmentType:
dDateHospitalization:
lTreatmentDays:
eHospitalizationType:
eHospitalizationMode:
eHospitalizationClass:
eHospitalAdmissionType:
eResidenceBeforeAdmission:
eHospitalDischargeType:
eResidenceAfterDischarge:
eHospitalProviderType:
bstrSectionMajor:
eHasExpenseLoading:
bstrHPSG: 		longValue, //interface address
longValue,
variantDateValue | "stringISODateValue",
longValue,
longValue,
longValue,
longValue,
longValue,
longValue,
longValue,
longValue,
longValue,
"utf8StringValue",
longValue,
"utf8StringValue"
[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
C/C++ calling syntax
HRESULT SetXtraHospital( TreatmentType
DATE
long
HospitalizationType
HospitalizationMode
HospitalizationClass
HospitalAdmissionType
ResidenceBeforeAdmission
HospitalDischargeType
ResidenceAfterDischarge
HospitalProviderType
BSTR
YesNoType
BSTR
VARIANT_BOOL 		eTreatmentType,
dDateHospitalization,
lTreatmentDays,
eHospitalizationType,
eHospitalizationMode,
eHospitalizationClass,
eHospitalAdmissionType,
eResidenceBeforeAdmission,
eHospitalDischargeType,
eResidenceAfterDischarge,
eHospitalProviderType,
bstrSectionMajor,
eHasExpenseLoading,
bstrHPSG,
*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
Calling argument description
[in] TreatmentType | eTreatmentType | The type of treatment -ambulatory or stationary- given by the TreatmentType enumeration
[in] DATE dDateHospitalization dDateHospitalization is the date and time of the hospitalization. This information is not used in the ambulatory case!

Note, that this date must be less or equal the dDateBegin of the treatment period set in SetTreatment method.
[in] long lTreatmentDays lTreatmentDays is the number of treatment days within the given treatment period. This information is not used in the ambulatory case!

The calculation of these treatment days is dependent on whether SwissDRG is used nor not!
The treatment days are calculated as
  • Non-SwissDRG: «(treatment@date_end - treatment@date_begin + 1 - vacation_days)»
  • SwissDRG: «(treatment@date_end - treatment@date_begin - vacation_days)»
where vacation_days is the number of vacation days (the leave days when the patient was not in the hospital for treatment).
[in] HospitalizationType | eHospitalizationType | The type/reason of hospitalization given by the HospitalizationType enumeration
[in] HospitalizationMode eHospitalizationMode The mode/indication of hospitalization given by the HospitalizationMode enumeration.

This information is not used in the ambulatory case!
[in] HospitalizationClass eHospitalizationClass The hospitalization class given by the HospitalizationClass enumeration.

This information is not used in the ambulatory case!
[in] HospitalAdmissionType | eHospitalAdmissionType | The hospital admission type defines the DRG grouper relevant admission reasons into the hospital encoded by the HospitalAdmissionType enumeration
[in] ResidenceBeforeAdmission | eResidenceBeforeAdmission | The residence before admission defines the DRG grouper relevant admission location where the patient stayed before admission, encoded by the ResidenceBeforeAdmission enumeration
[in] HospitalDischargeType | eHospitalDischargeType | The hospital discharge type defines the DRG grouper relevant discharge reasons out from hospital encoded by the HospitalDischargeType enumeration
[in] ResidenceAfterDischarge | eResidenceAfterDischarge | The residence after discharge defines the DRG grouper relevant location where the patient is going to, encoded by the ResidenceAfterDischarge enumeration
[in] HospitalProviderType | eHospitalProviderType | The hospital provider Type defines the DRG grouper relevant provider types, encoded by the HospitalProviderType enumeration
[in] BSTR | bstrSectionMajor | The major BfS section code as defined by Swiss Federal Statistical Office
[in] YesNoType eHasExpenseLoading The Boolean eHasExpenseLoading defines if there is an expense loading by the patient ("Spitalkostenbeitrag").

This information is not used in the ambulatory case!
[in] BSTR bstrHPSG The HPSG is used to define a so-called "Hospital Planning Service Group" if the underlaying tariff contract stipulates the need for such an HPSG code.

This information is not used in the ambulatory case!
[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


  • IGeneralInvoiceRequest
  • CreateAddress

IGeneralInvoiceRequest::CreateAddress property | space
Creates an instance of the IAddress interface.

Any address data is specified or retrieved using properties and methods of this interface. The interface is reusable for any semantic type of address. Just call the IAddress:Initialize method before starting to input new address data.
space
Restful webservice calling syntax
[GET] | /baseURL/ IGeneralInvoiceRequest/GetCreateAddress?param
[param] pIGeneralInvoiceRequest= longValue
[JSON result data] pIAddress: longValue //interface address
[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
C/C++ calling syntax
[get] HRESULT | CreateAddress( IAddress **peCreateAddress );
[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
Calling argument description
[out,retval] IAddress **peCreateAddress The instance of an IAddress interface that allows to read back the structured address data.
If no address is defined then the handle is NULL.
space
Remarks
If SmartPointers are used than the function names and calls are rewritten by Microsoft into the form
  • IAddress **GetCreateAddress(void);
space


  • IGeneralInvoiceRequest
  • CreateServiceExInput

IGeneralInvoiceRequest::CreateServiceExInput property | space
Creates an instance of the IServiceExInput interface.

Each type of "extended service" -services that are split into a medical and technical part- are added by the IGeneralInvoiceRequest::AddServiceEx method and additionally by input parameters supplied via the utility interface IServiceExInput.
space
Restful webservice calling syntax
[GET] | /baseURL/ IGeneralInvoiceRequest/GetCreateServiceExInput?param
[param] pIGeneralInvoiceRequest=
bstrTariffType= 		longValue&
urlEncodedStringValue
[JSON result data] pIServiceExInput: longValue //interface address
[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
C/C++ calling syntax
[get] HRESULT CreateServiceExInput( BSTR bstrTariffType,
IServiceExInput **pIServiceExInput );
[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
Calling argument description
[in] BSTR bstrTariffType The official 3-character tariff type as defined by Forum Datenaustausch for which the input interface is used.

Currently, the tariff number 001 for TarMed and 007 for TarDoc are the only allowed input data.
[out,retval] IServiceExInput | **pIServiceExInput | The returned instance of the IServiceExInput interface.
space
Remarks
If SmartPointers are used than the function names and calls are rewritten by Microsoft into the form
  • IServiceExInput **GetCreateServiceExInput( BSTR bstrTariffType);
space


  • IGeneralInvoiceRequest
  • DestructAddress

IGeneralInvoiceRequest::DestructAddress property |  |  | space
This property has a Restful Webservice representation only! Destructs/invalidates the IAddress interface instance. The counterpart property to generate an IAddress interface instance is IGeneralInvoiceRequest::GetCreateAddress. |  |  |
space
Restful webservice calling syntax |  |  |
[PUT] | /baseURL/ IGeneralInvoiceRequest/PutDestructAddress
[JSON input data] | pIGeneralInvoiceRequest: pIAddress: | longValue, //interface address longValue, //interface address
[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
Remarks |  |  |
This property has a Restful Webservice representation only! |  |  |
space |


  • IGeneralInvoiceRequest
  • DestructGeneralInvoiceRequest

IGeneralInvoiceRequest::DestructGeneralInvoiceRequest property |  |  | space
This property has a Restful Webservice representation only! Destructs/invalidates this IGeneralInvoiceRequest interface instance. The counterpart property to generate an IGeneralInvoiceRequest interface instance is IGeneralInvoiceRequestManager::GetGeneralInvoiceRequest. |  |  |
space
Restful webservice calling syntax |  |  |
[PUT] | /baseURL/ IGeneralInvoiceRequest/PutDestructGeneralInvoiceRequest
[JSON input data] | pIGeneralInvoiceRequest: | longValue, //interface address
[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
Remarks |  |  |
This property has a Restful Webservice representation only! |  |  |
space |


  • IGeneralInvoiceRequest
  • DestructServiceExInput

IGeneralInvoiceRequest::DestructServiceExInput property |  |  | space
This property has a Restful Webservice representation only! Destructs/invalidates the IServiceExInput interface instance. The counterpart property to generate an IServiceExInput interface instance is IGeneralInvoiceRequest::GetCreateServiceExInput. |  |  |
space
Restful webservice calling syntax |  |  |
[PUT] | /baseURL/ IGeneralInvoiceRequest/PutDestructServiceExInput
[JSON input data] | pIGeneralInvoiceRequest: pIServiceExInput: | longValue, //interface address longValue, //interface address
[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
Remarks |  |  |
This property has a Restful Webservice representation only! |  |  |
space |


  • IGeneralInvoiceRequestManager

IGeneralInvoiceRequestManager interface |  | V5.00/27 Nov 2024
The IGeneralInvoiceRequestManager interface provides all the necessary tools to produce an invoice or a reminder of type generalInvoiceRequest_500 for all roles and places. Firstly, an instance of the IGeneralInvoiceRequest interface is created by the GetGeneralInvoiceRequest property. All the invoice/reminder related data and parameters can be set by the supplied interface methods like SetPatient, SetTreatment,... After all information is defined the invoice/reminder is printed or a XML infoset is produced which can be electronically transported to a recipient. In the latter case the invoice/reminder optionally can be signed and/or encrypted . Due to the processing attributes "storno" and "copy" a previously generated invoice or reminder can be canceled or a copy can be produced (cf. Notes about processing attributes). |  | space
space
Methods |  | 9 methods
GetAbortInfo | Get the abort information string with the error coded in the module language |
GetLogSettings | Get the log settings for the module. |
GetXML | The GetXML method generates the XML infoset based on the data of the IGeneralInvoiceRequest interface and the XML generation attributes, validates the XML against the XSD schema, and stores the XML content as UTF8 file in the internal working directory |
LoadXML | Loads a previously generated XML infoset back into memory for further processing via the returned interface handles |
Print | The Print method validates the defined invoice/reminder data and prints the request on the local printer |
PrintAdjust | Shows the print object adjustment dialog that allows to move print objects of a .vps report generator file |
PrintSetup | Shows the printer setup dialog that allows to define the printer and its settings |
SetLogo | Optionally sets a logo to be locally printed atop of the patient's summary invoice |
SetLogSettings | Sets the log setting preferences for the module |
space
Properties |  | 9 properties
[get] CreateGeneralInvoiceRequestManager | Creates an instance of the main IGeneralInvoiceRequestManager interface |
[put] DestructGeneralInvoiceRequest | Destructs/invalidates this IGeneralInvoiceRequest interface instance |
[put] DestructGeneralInvoiceRequestManager | Destructs/invalidates a main instance of the IGeneralInvoiceRequestManager interface |
[put] DestructGeneralInvoiceResult | Destructs/invalidates this IGeneralInvoiceResult interface instance. |
[get] GeneralInvoiceRequest | Gets the IGeneralInvoiceRequest interface instance |
[get/put] ModuleLanguage | Get/Set the language for the module i.e |
[get] ModuleVersion | Get the version of the GeneralInvoiceRequestManager module. |
[get] ModuleVersionText | Get the version of the GeneralInvoiceRequestManager module in textual form. |
[get/put] Modus | Gets/Sets the operation modus of the module |
space |


  • IGeneralInvoiceRequestManager
  • GetAbortInfo

IGeneralInvoiceRequestManager::GetAbortInfo method |  |  | space
Get the abort information string with the error coded in the module language. Call this method whenever the returned pbStatus variable of the primarily called method is VARIANT_FALSE and the primarily called method is not an iterator (GetFirst/GetNext). In the later case VARIANT_FALSE signals the end of data. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceRequestManager/GetAbortInfo
[JSON input data] | pIGeneralInvoiceRequestManager: | longValue, //interface address
[JSON result data] | pbstrAbort: pbStatus: | "utf8StringValue", 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
C/C++ calling syntax |  |  |
HRESULT GetAbortInfo( | BSTR VARIANT_BOOL | *pbstrAbort, *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
Calling argument description |  |  |
[out] BSTR | *pbstrAbort | Abort information string coded in the module language. |
[out,retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE then an error-in-error situation occurred. |
space |


  • IGeneralInvoiceRequestManager
  • GetLogSettings

IGeneralInvoiceRequestManager::GetLogSettings method | space
Get the log settings for the module.
space
Restful webservice calling syntax
[POST] | /baseURL/ IGeneralInvoiceRequestManager/GetLogSettings
[JSON input data] pIGeneralInvoiceRequestManager: longValue, //interface address
[JSON result data] plLogLevel:
plMaxSizeKB:
peDoArchive:
pbstrArchiveDir:
pbStatus: 		longValue,
longValue,
longValue,
"utf8StringValue",
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
C/C++ calling syntax
HRESULT GetLogSettings( long
long
YesNoType
BSTR
VARIANT_BOOL 		*plLogLevel,
*plMaxSizeKB,
*peDoArchive,
*pbstrArchiveDir,
*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
Calling argument description
[out] long *plLogLevel The log activity level where
lLogLevel = 0 | Logging is turned off
lLogLevel = 1 | Normal log activity
lLogLevel > 1 | Debug log activity. Use this level only for debugging purposes
[out] long | *plMaxSizeKB | The maximum size in KB of the log file.
[out] YesNoType | *peDoArchive | eDoArchive defines if the log file is recycled if the maximum size is reached (enNo) or if the log file is archived (enYes).
[out] BSTR | *pbstrArchiveDir | The base directory where log files are archived. bstrArchiveDir is only defined if eDoArchive=enYes otherwise bstrArchiveDir is empty.
[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


  • IGeneralInvoiceRequestManager
  • GetXML

IGeneralInvoiceRequestManager::GetXML method |  |  | space
The GetXML method generates the XML infoset based on the data of the IGeneralInvoiceRequest interface and the XML generation attributes, validates the XML against the XSD schema, and stores the XML content as UTF8 file in the internal working directory. The full file name to this XML document is replied in the pbstrOutputFile output variable. The XML file must be saved to a different location as all temporary XML files in the working directory are deleted before the COM module shuts down! |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceRequestManager/GetXML
[JSON input data] | pIGeneralInvoiceRequestManager: lGenerationAttributes: plTimestamp: | longValue, //interface address longValue, longValue
[JSON result data] | pbstrOutputFile: plValidationError: plTimestamp: pbstrUsedSchema: pIGeneralInvoiceResult: pbStatus: | "utf8StringValue", longValue, "utf8StringValue", 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
C/C++ calling syntax |  |  |
HRESULT GetXML( | long BSTR long long BSTR IGeneralInvoiceResult VARIANT_BOOL | lGenerationAttributes, *pbstrOutputFile, *plValidationError, *plTimestamp, *pbstrUsedSchema, **pIGeneralInvoiceResult, *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
Calling argument description |  |  |
[in] long | lGenerationAttributes | This variable overrules the default behavior of the XML generation process even if the appropriate data have been defined. lGenerationAttributes is a 32-bit integer where the possible "commands" are values from the generationAttributes data type ORed together to form the overall command. This feature is necessary to generate different "flavors" of XML infosets without re-setting input data. For instance, an encrypted XML infoset for the "to" entity can be produced and in a second call the XML infoset without encryption (lGenerationAttributes=enGenerateXMLWithoutEncryption) is requested for a local archive (that can be loaded back later!). Moreover, the downgrade to the lower version is defined by setting the enGenerateDowngradeToV440 bit. |
[out] BSTR | *pbstrOutputFile | The full file name (path + name) where the XML infoset is stored in UTF-8 mode. The XML file must be saved to a different location as all temporary XML files in the working directory are deleted before the COM module shuts down! In Restful Webservice output: pbstrOutputFile is a releative URL which must be downloaded in a subsequent GET process. |
[out] long | *plValidationError | lValidationError is filled with the validation error code returned by the MSXML DOM parser. A zero value indicates that the validation was successful. |
[in,out] long | *plTimestamp | The timestamp of the XML document as epoch time (seconds elapsed since 1.1.1970) that is used as timestamp of the topmost object reference from that point on. If the timestamp for the topmost object reference was already set (e.g. to produce a copy) then this same timestamp is returned. |
[out] BSTR | *pbstrUsedSchema | The full XSD name that was used to generate the XML infoset. In a standard situation this would be generalInvoiceRequest_450.xsd. However, a downgrade to generalInvoiceRequest_440.xsd can be requested by using lGenerationAttributes=enGenerateDowngradeToV440. |
[out] IGeneralInvoiceResult | **pIGeneralInvoiceResult | The instance of a IGeneralInvoiceResult interface allows to read all loaded data back. The handle is NULL if an error occurred. |
[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 |


  • IGeneralInvoiceRequestManager
  • LoadXML

IGeneralInvoiceRequestManager::LoadXML method | space
Loads a previously generated XML infoset back into memory for further processing via the returned interface handles. The GeneralInvoiceRequest500 COM module understands and processes the generalInvoiceRequest_500 XSD standard as well as its predecessor, namely generalInvoiceRequest_450.

To analyze and retrieve the loaded data use the returned instance of the IGeneralInvoiceRequest interface and/or preview/print the data.

Furthermore, this method serves as dashboard e.g. to produce a "storno", "copy" or "refund" XML infoset.
  • Load the initial XML infoset with LoadXML
  • set the appropriate storno or copy values with the IGeneralInvoiceRequest::SetRequest method
  • do further manipulate the data space with methods of the IGeneralInvoiceRequest interface
  • produce the XML infoset again with the GetXML method or print the invoice/reminder with the Print method.
space
Restful webservice calling syntax
[POST] | /baseURL/ IGeneralInvoiceRequestManager/LoadXML?param
[param] pIGeneralInvoiceRequestManager=longValue&
bstrInputFile=urlEncodedString
+
<application/octet-stream> input_file_upload_stream
[JSON result data] pbstrUsedSchema:
pIGeneralInvoiceRequest:
pIGeneralInvoiceResult:
pbStatus: 		"utf8StringValue",
longValue,
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
C/C++ calling syntax
HRESULT LoadXML( BSTR
BSTR
IGeneralInvoiceRequest
IGeneralInvoiceResult
VARIANT_BOOL 		bstrInputFile,
*pbstrUsedSchema,
**pIGeneralInvoiceRequest,
**pIGeneralInvoiceResult,
*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
Calling argument description
[in] BSTR | bstrInputFile | The input XML infoset (full file name) that must be loaded and analyzed.
[out] BSTR *pbstrUsedSchema The full XSD name of the loaded XML file.

Since the current standard and its predecessor can natively be loaded the returned schema is either generalInvoiceRequest_450.xsd or generalInvoiceRequest_440.xsd. This variable is not set if the loading of an XML infoset was unsuccessful.
[out] IGeneralInvoiceRequest **pIGeneralInvoiceRequest The IGeneralInvoiceRequest interface handle that allows to add further data.
The handle is NULL if an error occurred.
[out] IGeneralInvoiceResult **pIGeneralInvoiceResult The instance of a IGeneralInvoiceResult interface allows to read all loaded data back.
The handle is NULL if an error occurred.
[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


  • IGeneralInvoiceRequestManager
  • Print

IGeneralInvoiceRequestManager::Print method | space
The Print method validates the defined invoice/reminder data and prints the request on the local printer. The printer selection is done via the used report generator template file. If the template file was not connected to a printer with the PrintSetup method then the default printer with its default settings is used.

The bstrPrintTemplate variable obeys a special syntax and can optionally be used to set special print commands like using electronic webstamps, producing PDFs or changing print objects dynamically.
  • "How to print webstamps" is a description how to integrate electronic stamps into the invoice/reminder
  • "How to generate PDF archive file" is a description about generating PDF archive files of the invoice/reminder
  • "How to use an alternate print template" is a description about overriding the default print template
  • "Syntax of the printTemplate variable"

IMPORTANT LICENSE NOTE The report engine used is Hexatech's ViewPro (www.hexatech.com). If you supply your own template files then you must have your own ViewPro license. By using this COM module you implicitly agree upon this restriction!
space
Restful webservice calling syntax
[POST] | /baseURL/ IGeneralInvoiceRequestManager/Print
[JSON input data] pIGeneralInvoiceRequestManager:
bstrPrintTemplate:
lGenerationAttributes:
ePrintPreview:
eAddressRight:
plTimestamp: 		longValue, //interface address
"utf8StringValue",
longValue,
longValue,
longValue,
longValue
[JSON result data] plTimestamp:
pIGeneralInvoiceResult:
pbStatus:
pbstrPDFFile: 		longValue,
booleanValue,
"utf8StringValue"
[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
C/C++ calling syntax
HRESULT Print( BSTR
long
YesNoType
YesNoType
long
IGeneralInvoiceResult
VARIANT_BOOL 		bstrPrintTemplate,
lGenerationAttributes,
ePrintPreview,
eAddressRight,
*plTimestamp,
**pIGeneralInvoiceResult,
*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
Calling argument description
[in] BSTR bstrPrintTemplate The bstrPrintTemplate variable is used to explicitly change print template reports and/or print objects as defined in "Syntax of the printTemplate variable".

If bstrPrintTemplate is empty then the default print template of the defined data language ( IGeneralInvoiceRequest:: Initialize method) is used.
[in] long lGenerationAttributes This variable overrules the default behavior of the print process.

lGenerationAttributes is a 32-bit integer where the possible "commands" are values from the generationAttributes data type ORed together to form the overall command.

Besides the manipulation of the printed ESR parameters the downgrade to version V440 can be enforced here!
[in] YesNoType ePrintPreview A Boolean that defines if print preview is used (enYes) or printing is done (enNo)

In Restful Webservice system: ePrintPreview is automatically set to enNo no matter what the input value is. Furthermore, printing is automatically redirected to a PDF output file since there are no printers available.

[in] YesNoType eAddressRight A Boolean that defines on which side -left or right- the receiver address should be printed.

Note that left-sided addressing is only allowed for the summary invoice/reminder forms. The parameter is silently ignored for the detailed invoice/reminder forms.
[in,out] long *plTimestamp The timestamp of the XML document as epoch time (seconds elapsed since 1.1.1970) that is used as timestamp of the topmost object reference from that point on.

If the timestamp for the topmost object reference was already set (e.g. to produce a copy) then this same timestamp is returned.
[out] IGeneralInvoiceResult **pIGeneralInvoiceResult The IGeneralInvoiceResult interface handle that allows to get all loaded data back.
The handle is NULL if an error occurred.
[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.
[out] BSTR *pbstrPDFFile In Restful webservice output:

pbstrPDFFile is a relative URL to a PDF file holding the result of the Print method. Therefore, after receiving the JSON result data do GET pbstrPDFile such as to have the produced printout.
space


  • IGeneralInvoiceRequestManager
  • PrintAdjust

IGeneralInvoiceRequestManager::PrintAdjust method | space
Shows the print object adjustment dialog that allows to move print objects of a .vps report generator file.

Besides the position adjustment of any available print object, there exists the possibility of move all print objects globally.
In the absence of any ESR coding lines, the necessity for this kind of service has become mostly obsolete.
space
Restful webservice calling syntax
This method has no Restful Webservice representation!
space
C/C++ calling syntax
HRESULT PrintAdjust( BSTR
BSTR
VARIANT_BOOL 		bstrPrintTemplate,
bstrINIPath,
*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
Calling argument description
[in] BSTR bstrPrintTemplate Either the full file name (path + name) or a logical name of a target .vps report generator file for which the settings will be defined.

There are predefined .vps files in the installation directory that can be accessed via one of the following case insensitive logical names:
Summary[_version]_addressSide_language
- the 1-page, ESR-containing template for law<>enORG
FeeSummary[_version]_addressSide_language
- the 1-page, ESR-containing template for law=enORG
Detail[_version]_TYPER_language
- the multi-page invoice template for law<>enORG
FeeDetail[_version]_GR_language
- the multi-page invoice template for law=enORG
where
  • version is one of {_450, _440}, the absence of a version identifier defaults to _450
  • language is one of {dt, fr, it}.
  • addressSide is R for right sided addressing or L for left sided addressing of the recipient.
  • TYPE is the type of form to use, where G is for the general ambulatory case and H is for the stationary case.

For example the logical name "Detail_HR_fr" is the French print template of version 450 with right sided addressing for a stationary ("hospital") case.
[in] BSTR bstrINIPath Optional path to a directory where the .vpd printer setting file is stored. The name of the printer setting file is the same name as the .vps file but with a .vpd extension.

If bstrINIPath is left empty then the standard directory (the directory of the dll) is used.
[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


  • IGeneralInvoiceRequestManager
  • PrintSetup

IGeneralInvoiceRequestManager::PrintSetup method | space
Shows the printer setup dialog that allows to define the printer and its settings. When saving the data the selected print and the currently used computer is connected with the given .vps report generator file.
space
Restful webservice calling syntax
This method has no Restful Webservice representation!
space
C/C++ calling syntax
HRESULT PrintSetup( BSTR
BSTR
VARIANT_BOOL 		bstrPrintTemplate,
bstrINIPath,
*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
Calling argument description
[in] BSTR bstrPrintTemplate Either the full file name (path + name) or a logical name of a target .vps report generator file for which the settings will be defined.

There are predefined .vps files in the installation directory that can be accessed via one of the following case insensitive logical names:
Summary[_version]_addressSide_language
- the 1-page, ESR-containing template for law<>enORG
FeeSummary[_version]_addressSide_language
- the 1-page, ESR-containing template for law=enORG
Detail[_version]_TYPER_language
- the multi-page invoice template for law<>enORG
FeeDetail[_version]_GR_language
- the multi-page invoice template for law=enORG
where
  • version is one of {_450, _440}, the absence of a version identifier defaults to _450
  • language is one of {dt, fr, it}.
  • addressSide is R for right sided addressing or L for left sided addressing of the recipient.
  • TYPE is the type of form to use, where G is for the general ambulatory case and H is for the stationary case.

For example the logical name "Detail_HR_fr" is the French print template of version 450 with right sided addressing for a stationary ("hospital") case.
[in] BSTR bstrINIPath Optional path to a directory where the .vpd printer setting file is stored. The name of the printer setting file is the same name as the .vps file but with a .vpd extension.

If bstrINIPath is left empty then the standard directory (the directory of the dll) is used.
[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


  • IGeneralInvoiceRequestManager
  • SetLogo

IGeneralInvoiceRequestManager::SetLogo method |  |  | space
Optionally sets a logo to be locally printed atop of the patient's summary invoice. Since the detailed invoice for the insurance is standardized the logo can not be applied and printed there. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceRequestManager/SetLogo
[JSON input data] | pIGeneralInvoiceRequestManager: bstrBMPLogoFile: lMMWidth: lMMHeigth: | longValue, //interface address "utf8StringValue", longValue, longValue
[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
C/C++ calling syntax |  |  |
HRESULT SetLogo( | BSTR long long VARIANT_BOOL | bstrBMPLogoFile, lMMWidth, lMMHeigth, *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
Calling argument description |  |  |
[in] BSTR | bstrBMPLogoFile | The full file name (path + name) of a BMP logo. |
[in] long | lMMWidth | The width in mm of the logo |
[in] long | lMMHeigth | The height in mm of the logo |
[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 |


  • IGeneralInvoiceRequestManager
  • SetLogSettings

IGeneralInvoiceRequestManager::SetLogSettings method | space
Sets the log setting preferences for the module.

The default for the log activity are: level=1, lMaxSizeKB=1000,eDoArchive=enNo, and the log settings are persistent via the log file itself.

Note, that the log facility is a best effort system. If there is an error e.g. due to insufficient privileges to write the log entries then nothing is logged.
space
Restful webservice calling syntax
[POST] | /baseURL/ IGeneralInvoiceRequestManager/SetLogSettings
[JSON input data] pIGeneralInvoiceRequestManager:
lLogLevel:
lMaxSizeKB:
eDoArchive:
bstrArchiveDir: 		longValue, //interface address
longValue,
longValue,
longValue,
"utf8StringValue"
[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
C/C++ calling syntax
HRESULT SetLogSettings( long
long
YesNoType
BSTR
VARIANT_BOOL 		lLogLevel,
lMaxSizeKB,
eDoArchive,
bstrArchiveDir,
*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
Calling argument description
[in] long lLogLevel The log activity level where
lLogLevel = 0 | Logging is turned off
lLogLevel = 1 | Normal log activity
lLogLevel > 1 | Debug log activity. Use this level only for debugging purposes

Any log level below 0 is corrected to 0.
[in] long lMaxSizeKB The maximum size in KB of the log file.
Any size below 1000 KB (= the default value) is corrected to the default value
[in] YesNoType | eDoArchive | eDoArchive defines if the log file is recycled once the maximum size is reached (enNo) or if the log file is archived (enYes) into the archive directory.
[in] BSTR bstrArchiveDir Defines the base directory where log files are archived. bstrArchiveDir is only used if eDoArchive=enYes. If bstrArchiveDir is empty and eDoArchive=enYes then the place of the module is used as the base archive directory.

If the base archive directory or directories below have insufficient privileges to create directories or write files archiving is not done!
[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


  • IGeneralInvoiceRequestManager
  • CreateGeneralInvoiceRequestManager

IGeneralInvoiceRequestManager::CreateGeneralInvoiceRequestManager property |  |  | space
This property has a Restful Webservice representation only! Creates an instance of the main IGeneralInvoiceRequestManager interface. To delete/invalidate this interface instance, the counterpart property PutDestructGeneralInvoiceRequestManager must be explicitly called, since the pIGeneralInvoicetRequestManager address has a global scope and is not automatically destructed. |  |  |
space
Restful webservice calling syntax |  |  |
[GET] | /baseURL/ IGeneralInvoiceRequestManager/GetCreateGeneralInvoiceRequestManager?param
[param] | pIGeneralInvoiceRequestManager= | longValue
[JSON result data] | pIGeneralInvoiceRequestManager: | longValue //interface address
[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
Remarks |  |  |
This property has a Restful Webservice representation only! |  |  |
space |


  • IGeneralInvoiceRequestManager
  • DestructGeneralInvoiceRequest

IGeneralInvoiceRequestManager::DestructGeneralInvoiceRequest property |  |  | space
This property has a Restful Webservice representation only! Destructs/invalidates this IGeneralInvoiceRequest interface instance. The counterpart property to generate an IGeneralInvoiceRequest interface instance is IGeneralInvoiceRequestManager::GetGeneralInvoiceRequest. |  |  |
space
Restful webservice calling syntax |  |  |
[PUT] | /baseURL/ IGeneralInvoiceRequestManager/PutDestructGeneralInvoiceRequest
[JSON input data] | pIGeneralInvoiceRequestManager: pIGeneralInvoiceRequest: | longValue, //interface address longValue, //interface address
[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
Remarks |  |  |
This property has a Restful Webservice representation only! |  |  |
space |


  • IGeneralInvoiceRequestManager
  • DestructGeneralInvoiceRequestManager

IGeneralInvoiceRequestManager::DestructGeneralInvoiceRequestManager property |  |  | space
This property has a Restful Webservice representation only! Destructs/invalidates a main instance of the IGeneralInvoiceRequestManager interface. Please note, that all dependent, active interface instances generated with IGeneralInvoiceRequestManager::GetGeneralInvoiceRequest, all dependent, active interface instances generated with IGeneralInvoiceRequest::GetCreateAddress and all IGeneralInvoiceResult interface instances under this main instance, are automatically destructed as well. The counterpart property to generate a main interface instance is IGeneralInvoiceRequestManager::GetCreateGeneralInvoiceRequestManager. |  |  |
space
Restful webservice calling syntax |  |  |
[PUT] | /baseURL/ IGeneralInvoiceRequestManager/PutDestructGeneralInvoiceRequestManager
[JSON input data] | pIGeneralInvoiceRequestManager: | longValue, //interface address
[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
Remarks |  |  |
This property has a Restful Webservice representation only! |  |  |
space |


  • IGeneralInvoiceRequestManager
  • DestructGeneralInvoiceResult

IGeneralInvoiceRequestManager::DestructGeneralInvoiceResult property |  |  | space
This property has a Restful Webservice representation only! Destructs/invalidates this IGeneralInvoiceResult interface instance. |  |  |
space
Restful webservice calling syntax |  |  |
[PUT] | /baseURL/ IGeneralInvoiceRequestManager/PutDestructGeneralInvoiceResult
[JSON input data] | pIGeneralInvoiceRequestManager: pIGeneralInvoiceResult: | longValue, //interface address longValue, //interface address
[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
Remarks |  |  |
This property has a Restful Webservice representation only! |  |  |
space |


  • IGeneralInvoiceRequestManager
  • GeneralInvoiceRequest

IGeneralInvoiceRequestManager::GeneralInvoiceRequest property | space
Gets the IGeneralInvoiceRequest interface instance.

This property is called if the data are defined from scratch. The same interface instance is returned when the >A HREF='LoadXML_method.html'>IGeneralInvoiceRequestManager::LoadXML method is called.
space
Restful webservice calling syntax
[GET] | /baseURL/ IGeneralInvoiceRequestManager/GetGeneralInvoiceRequest?param
[param] pIGeneralInvoiceRequestManager= longValue
[JSON result data] pIGeneralInvoiceRequest: longValue //interface address
[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
C/C++ calling syntax
[get] HRESULT | GeneralInvoiceRequest( IGeneralInvoiceRequest **peGeneralInvoiceRequest );
[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
Calling argument description
[out,retval] IGeneralInvoiceRequest | **peGeneralInvoiceRequest | The created instance of the IGeneralInvoiceRequest interface
space
Remarks
If SmartPointers are used than the function names and calls are rewritten by Microsoft into the form
  • IGeneralInvoiceRequest **GetGeneralInvoiceRequest(void);
space


  • IGeneralInvoiceRequestManager
  • ModuleLanguage

IGeneralInvoiceRequestManager::ModuleLanguage property | space
Get/Set the language for the module i.e. the language in which the error strings are coded.

Note, that the module language and the data language (given by IGeneralInvoiceRequest::Initialize) are independent and can be different!
space
Restful webservice calling syntax
[GET] | /baseURL/ IGeneralInvoiceRequestManager/GetModuleLanguage?param
[param] pIGeneralInvoiceRequestManager= longValue
[JSON result data] peModuleLanguage: longValue
[PUT] | /baseURL/ IGeneralInvoiceRequestManager/PutModuleLanguage
[JSON input data] pIGeneralInvoiceRequestManager:
eModuleLanguage: 		longValue, //interface address
longValue
[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
C/C++ calling syntax
[get] HRESULT | ModuleLanguage( LanguageType *peModuleLanguage );
[put] HRESULT | ModuleLanguage( LanguageType eModuleLanguage );
[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
Calling argument description
[out,retval] LanguageType | *peModuleLanguage
[in] LanguageType | eModuleLanguage
space
Remarks
If SmartPointers are used than the function names and calls are rewritten by Microsoft into the form
  • LanguageType *GetModuleLanguage(void);
  • void PutModuleLanguage( LanguageType lModuleLanguage);
space


  • IGeneralInvoiceRequestManager
  • ModuleVersion

IGeneralInvoiceRequestManager::ModuleVersion property | space
Get the version of the GeneralInvoiceRequestManager module.
space
Restful webservice calling syntax
[GET] | /baseURL/ IGeneralInvoiceRequestManager/GetModuleVersion?param
[param] pIGeneralInvoiceRequestManager= longValue
[JSON result data] pbstrModuleVersion: "utf8StringValue"
[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
C/C++ calling syntax
[get] HRESULT | ModuleVersion( BSTR *pbstrModuleVersion );
[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
Calling argument description
[out,retval] BSTR | *pbstrModuleVersion
space
Remarks
If SmartPointers are used than the function names and calls are rewritten by Microsoft into the form
  • BSTR *GetModuleVersion(void);
space


  • IGeneralInvoiceRequestManager
  • ModuleVersionText

IGeneralInvoiceRequestManager::ModuleVersionText property | space
Get the version of the GeneralInvoiceRequestManager module in textual form.
space
Restful webservice calling syntax
[GET] | /baseURL/ IGeneralInvoiceRequestManager/GetModuleVersionText?param
[param] pIGeneralInvoiceRequestManager= longValue
[JSON result data] pbstrModuleVersionText: "utf8StringValue"
[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
C/C++ calling syntax
[get] HRESULT | ModuleVersionText( BSTR *pbstrModuleVersionText );
[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
Calling argument description
[out,retval] BSTR | *pbstrModuleVersionText
space
Remarks
If SmartPointers are used than the function names and calls are rewritten by Microsoft into the form
  • BSTR *GetModuleVersionText(void);
space


  • IGeneralInvoiceRequestManager
  • Modus

IGeneralInvoiceRequestManager::Modus property | space
Gets/Sets the operation modus of the module.

The default modus is enProduction whereas for developing/debugging purposes enTest can be set.
space
Restful webservice calling syntax
[GET] | /baseURL/ IGeneralInvoiceRequestManager/GetModus?param
[param] pIGeneralInvoiceRequestManager= longValue
[JSON result data] peModus: longValue
[PUT] | /baseURL/ IGeneralInvoiceRequestManager/PutModus
[JSON input data] pIGeneralInvoiceRequestManager:
eModus: 		longValue, //interface address
longValue
[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
C/C++ calling syntax
[get] HRESULT | Modus( ModusType *peModus );
[put] HRESULT | Modus( ModusType eModus );
[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
Calling argument description
[out,retval] ModusType | *peModus
[in] ModusType | eModus
space
Remarks
If SmartPointers are used than the function names and calls are rewritten by Microsoft into the form
  • ModusType *GetModus(void);
  • void PutModus( ModusType lModus);
space


  • IGeneralInvoiceResult

IGeneralInvoiceResult interface |  | V5.00/27 Nov 2024
The IGeneralInvoiceResult interface allows to read back all data that have been set by the IGeneralInvoiceRequest interface or by loading a previously generated XML infoset with the IGeneralInvoiceRequestManager::LoadXML method. |  | space
space
Methods |  | 54 methods
GetAbortInfo | Get the abort information string with the error coded in the module language |
GetBalance | Retrieves the balance information. |
GetBillerGLN | Gets the biller's structured address as well as its mandatory GLN |
GetBillerZSR | Gets the biller's structured address as well as its mandatory ZSR |
GetCaseDetails | Method for collecting all case detail records covered by the IGeneralInvoiceResult interface and returned as JSON array |
GetCredit | Retrieves the optional credit object reference parameters |
GetDebitor | Gets the debitor's GLN identifier as well as the structured address |
GetDiagnoses | Method for collecting all diagnoses records covered by the IGeneralInvoiceResult interface and returned as JSON array |
GetDocuments | Method for collecting all document data covered by the IGeneralInvoiceResult interface and returned as JSON array |
GetEsrQR | Retrieves the ESR information of type enEsrQR or enEsrQRplus |
GetEsrRedQR | Retrieves the ESR information of type enRedPayinSlipQR (red payin slip with QR code) |
GetEsrType | Retrieves the type of ESR. |
GetFirstCaseDetail | Retrieves the first case detail record from the list of case details - case detail are possibly defined for stationary DRG cases only! |
GetFirstDiagnosis | Retrieves the first diagnosis from the list of diagnoses |
GetFirstDocument | Retrieves the first document from the list of documents |
GetFirstInstruction | Retrieves the first instruction from the list of instructions |
GetFirstPartner | Retrieves the first partner address from the list of partner addresses |
GetFirstService | Retrieves the first "simple/normal" service from the list of services |
GetFirstServiceEx | Retrieves the first "extended" service from the list of services |
GetFirstVat | Retrieves the first VAT information |
GetFirstXtraService | Gets the first token=value pair from the list of token=value pairs for a supplied service ID |
GetGuarantor | Retrieves the guarantor's structured address and the assigned GLN |
GetInstructions | Method for collecting all instruction records covered by the IGeneralInvoiceResult interface and returned as JSON array |
GetInsurance | Gets the insurance's GLN as well as the structured address |
GetInsured | Retrieves the insured's primary parameters as well as the structured address |
GetInvoice | Retrieves the invoice object reference parameters |
GetLaw | Retrieves the data about the applied law and its dependent information |
GetNextCaseDetail | Retrieves the next case detail record from the list of case details - case details are possibly defined for stationary DRG cases only! |
GetNextDiagnosis | Retrieves the next diagnosis from the list of diagnoses |
GetNextDocument | Retrieves the next document from the list of documents |
GetNextInstruction | Retrieves the next instruction from the list of instructions |
GetNextPartner | Retrieves the next partner address from the list of partner addresses |
GetNextService | Gets the next "simple/normal" service from the list of services |
GetNextServiceEx | Gets the next "extended" service from the list of services |
GetNextVat | Gets the next vat information |
GetNextXtraService | Gets the next token=value pair from the list of token=value pairs for a supplied service ID |
GetPackage | Retrieves the identification parameters of the main software |
GetPartners | Method for collecting all partner addresses covered by the IGeneralInvoiceResult interface and returned as JSON array |
GetPatient | Retrieves the patient's primary parameters (sex, birthdate, SSN) as well as the structured address |
GetProcessing | Retrieves the defined processing information that are in effect at the site of the last intermediate. |
GetProviderGLN | Gets the provider's structured address as well as ist mandatory GLN |
GetProviderZSR | Sets the provider's structured address as well as its mandatory ZSR |
GetReminder | Retrieves the reminder object reference parameters |
GetRequest | Returns the primary parameters of the request, namely the language the data is supplied, the "storno" and "copy" status besides an optional remark. |
GetServices | Method for collecting all simple service records covered by the IGeneralInvoiceResult interface and returned as JSON array |
GetServicesEx | Method for collecting all extended service records covered by the IGeneralInvoiceResult interface and returned as JSON array |
GetTiers | Gets the tiers mode and some additional data like the VAT number. |
GetTransport | Returns the transport information that is the routing information going from a sender (from) over at least one intermediate (via) to the receiver (to) |
GetTreatment | Retrieves the basic treatment parameters. |
GetVats | Method for collecting all used vat records covered by the IGeneralInvoiceResult interface and returned as JSON array |
GetXtraDRG | Gets the splitting ratio between the two remaining parties if a 3-party splitting situation must be described! |
GetXtraDrug | Gets additional drug input data for the defined service record if eRoleType=enRolePharmacist |
GetXtraHospital | Gets the additional treatment parameters requested if eRoleType=enRoleHospital and/or ePlaceType=enPlaceHospital |
GetXtraServices | Method for collecting all extra service data for a given service ID covered by the IGeneralInvoiceResult interface and returned as JSON array |
space
Properties |  | 1 properties
[put] DestructGeneralInvoiceResult | Destructs/invalidates this IGeneralInvoiceResult interface instance. |
space |


  • IGeneralInvoiceResult
  • GetAbortInfo

IGeneralInvoiceResult::GetAbortInfo method |  |  | space
Get the abort information string with the error coded in the module language. Call this method whenever the returned pbStatus variable of the primarily called method is VARIANT_FALSE and the primarily called method is not an iterator (GetFirst/GetNext). In the later case VARIANT_FALSE signals the end of data. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceResult/GetAbortInfo
[JSON input data] | pIGeneralInvoiceResult: | longValue, //interface address
[JSON result data] | pbstrAbort: pbStatus: | "utf8StringValue", 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
C/C++ calling syntax |  |  |
HRESULT GetAbortInfo( | BSTR VARIANT_BOOL | *pbstrAbort, *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
Calling argument description |  |  |
[out] BSTR | *pbstrAbort | Abort information string coded in the module language. |
[out,retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE then an error-in-error situation occurred. |
space |


  • IGeneralInvoiceResult
  • GetBalance

IGeneralInvoiceResult::GetBalance method |  |  | space
Retrieves the balance information. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceResult/GetBalance
[JSON input data] | pIGeneralInvoiceResult: | longValue, //interface address
[JSON result data] | pdAmount: pdAmountPrepaid: pdAmountReminder: pdAmountDue: pdAmountVat: pbStatus: | doubleValue, doubleValue, doubleValue, doubleValue, doubleValue, 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
C/C++ calling syntax |  |  |
HRESULT GetBalance( | double double double double double VARIANT_BOOL | *pdAmount, *pdAmountPrepaid, *pdAmountReminder, *pdAmountDue, *pdAmountVat, *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
Calling argument description |  |  |
[out] double | *pdAmount | The total amount in CHF of the invoice/reminder accumulated over all 2-digit precision service amounts. Therefore, the amount implicitly has a 2-digit precision as well. Note that amount is negative if a credit advice or a storno request is produced. |
[out] double | *pdAmountPrepaid | The prepaid amount in CHF of the invoice/reminder rounded to 2-digit precision that is subtracted from the total amount to calculate the amount due. This amount can only be set in the IGeneralInvoiceRequest::SetTiers method. Furthermore this amount changes the sign if a credit advice or a storno request is produced. |
[out] double | *pdAmountReminder | The optional reminder charge in CHF of the reminder rounded to 2-digit precision that is added to the total amount to calculate the amount due. This amount can only be set in the /IGeneralInvoiceRequest::SetReminder method. Furthermore this amount changes the sign if a credit advice or a storno request is produced. |
[out] double | *pdAmountDue | The due amount in CHF of the invoice/reminder (and coded into the ESR payment transaction) calculated as «amount + amount_reminder - amount_prepaid» where the used summands are 2-digit precision amounts and the result is finally rounded half up ("Kaufmännisches Runden") Note that amount is negative if a credit advice or a storno request is produced. |
[out] double | *pdAmountVat | The total VAT amount in CHF accumulated over all 2-digit precision service VAT amounts. Therefore, the total VAT amount implicitly has a 2-digit precision as well. |
[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 |


  • IGeneralInvoiceResult
  • GetBillerGLN

IGeneralInvoiceResult::GetBillerGLN method |  |  | space
Gets the biller's structured address as well as its mandatory GLN. Please note that the biller's GLN address does not include a ZSR. Furthermore, the structured address is defined via a IAddress interface instance and the address data must be defined prior to call this method. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceResult/GetBillerGLN
[JSON input data] | pIGeneralInvoiceResult: | longValue, //interface address
[JSON result data] | pbstrGLN: ppIAddress: pbStatus: | "utf8StringValue", { pbIsPrivateAddress: true, pbstrCompanyName: "utf8StringValue", pbstrDepartment: "utf8StringValue", pbstrSalutation: "utf8StringValue", pbstrTitle: "utf8StringValue", pbstrFamilyname: "utf8StringValue", pbstrGivenname: "utf8StringValue", pbstrSubaddressing: "utf8StringValue", pbstrStreet: "utf8StringValue", pbstrPoBox: "utf8StringValue", pbstrZip: "utf8StringValue", pbstrCity: "utf8StringValue", pbstrStateCode: "utf8StringValue", pbstrCountryCode: "utf8StringValue", pbstrPhone1: "utf8StringValue", pbstrPhone2: "utf8StringValue", pbstrPhone3: "utf8StringValue", pbstrFax: "utf8StringValue", pbstrEMail: "utf8StringValue", pbstrUrl: "utf8StringValue" }, 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
C/C++ calling syntax |  |  |
HRESULT GetBillerGLN( | BSTR IAddress VARIANT_BOOL | *pbstrGLN, **ppIAddress, *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
Calling argument description |  |  |
[out] BSTR | *pbstrGLN | The GLN of the biller as supplied by Stiftung Refdata |
[out] IAddress | **ppIAddress | The instance of a IAddress interface that holds the structured address parts. A NULL pointer is supplied if no address should be set. |
[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 |


  • IGeneralInvoiceResult
  • GetBillerZSR

IGeneralInvoiceResult::GetBillerZSR method |  |  | space
Gets the biller's structured address as well as its mandatory ZSR. Please note that the biller's ZSR address does not include a GLN. Furthermore, the structured address is defined via a Iaddress interface instance and the address data must be defined prior to call this method. Note that the billers's ZSR address is optional in terms of the XSD schema definition. However, it may be the case that the underlying tariff contracts, applied law and/or special contracts between service providers and insurances change the optionality into a mandatory data specification. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceResult/GetBillerZSR
[JSON input data] | pIGeneralInvoiceResult: | longValue, //interface address
[JSON result data] | pbstrZSR: ppIAddress: pbStatus: | "utf8StringValue", { pbIsPrivateAddress: true, pbstrCompanyName: "utf8StringValue", pbstrDepartment: "utf8StringValue", pbstrSalutation: "utf8StringValue", pbstrTitle: "utf8StringValue", pbstrFamilyname: "utf8StringValue", pbstrGivenname: "utf8StringValue", pbstrSubaddressing: "utf8StringValue", pbstrStreet: "utf8StringValue", pbstrPoBox: "utf8StringValue", pbstrZip: "utf8StringValue", pbstrCity: "utf8StringValue", pbstrStateCode: "utf8StringValue", pbstrCountryCode: "utf8StringValue", pbstrPhone1: "utf8StringValue", pbstrPhone2: "utf8StringValue", pbstrPhone3: "utf8StringValue", pbstrFax: "utf8StringValue", pbstrEMail: "utf8StringValue", pbstrUrl: "utf8StringValue" }, 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
C/C++ calling syntax |  |  |
HRESULT GetBillerZSR( | BSTR IAddress VARIANT_BOOL | *pbstrZSR, **ppIAddress, *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
Calling argument description |  |  |
[out] BSTR | *pbstrZSR | The mandatory ZSR number of the biller as supplied by Santesuisse |
[out] IAddress | **ppIAddress | The instance of a IAddress interface that holds the structured address parts. A NULL pointer is supplied if no address should be set. |
[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 |


  • IGeneralInvoiceResult
  • GetCaseDetails

IGeneralInvoiceResult::GetCaseDetails method |  |  | space
This method has a Restful Webservice representation only! Method for collecting all case detail records covered by the IGeneralInvoiceResult interface and returned as JSON array. Please note that IGeneralInvoiceResult::GetCaseDetails takes over the functionality of the iterator pair IGeneralInvoiceResult::GetFirstCaseDetail / IGeneralInvoiceResult::GetNextCaseDetail with a single call, making the latter superfluous. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceResult/GetCaseDetails
[JSON input data] | pIGeneralInvoiceResult: | longValue, //interface address
[JSON result array] | { pbstrTariffType: pbstrCode: pdDateBegin: pdDateEnd: pbstrACID: peResidenceAfterDischarge: pbStatus: | "utf8StringValue", "utf8StringValue", "stringISODateValue", "stringISODateValue", "utf8StringValue", 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
Calling argument description |  |  |
[out] BSTR | *pbstrTariffType | The official tariff type as defined by Forum Datenaustausch This should be DRG tariff type "010". |
[out] BSTR | *pbstrCode | The DRG service code |
[out] DATE | *pdDateBegin | The starting date and time of the current case detail. Note, that this date must be equal or greater then the dDateBegin of the treatment period set in IGeneralInvoiceRequest::SetTreatment method. |
[out] DATE | *pdDateEnd | The ending date and time of the current case detail. Note, that this date must be less or equal the dDateEnd of the treatment period set in IGeneralInvoiceRequest::SetTreatment method. |
[out] BSTR | *pbstrACID | The Administrative Case IDentification for the current DRG case detail. |
[out] ResidenceAfterDischarge | *peResidenceAfterDischarge | The Residence After Discharge variable supplies information about the discharge location where the patient is going to encoded by a terminal set of tokens |
[out,retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE the end of data is reached |
space |


  • IGeneralInvoiceResult
  • GetCredit

IGeneralInvoiceResult::GetCredit method |  |  | space
Retrieves the optional credit object reference parameters. This object reference is only defined if such a credit request was generated and accepted prior to the invoice generation. The credit, invoice and reminder object references (if supplied in the request) form a object reference chain (credit -" invoice -" reminder) with the reminder as topmost object reference if supplied in the request otherwise the invoice is the topmost object reference (the invoice object is mandatory in all cases!). The page "object reference" provides an in-depth description of the concepts of "object reference", "object reference chain", and "topmost object reference". |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceResult/GetCredit
[JSON input data] | pIGeneralInvoiceResult: | longValue, //interface address
[JSON result data] | pbstrRequestCreditID: pdRequestCreditDate: plRequestCreditTimestamp: pbStatus: | "utf8StringValue", "stringISODateValue", 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
C/C++ calling syntax |  |  |
HRESULT GetCredit( | BSTR DATE long VARIANT_BOOL | *pbstrRequestCreditID, *pdRequestCreditDate, *plRequestCreditTimestamp, *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
Calling argument description |  |  |
[out] BSTR | *pbstrRequestCreditID | The request ID is the main software's identification of the credit ("Kostengutsprachenummer"). This is one of 3 identifiers that form the credit object reference. |
[out] DATE | *pdRequestCreditDate | The request date is the main software's date of the credit request ("Kostengutsprachedatum"). This is one of 3 identifiers that form the credit object reference. |
[out] long | *plRequestCreditTimestamp | This is a UNIX timestamp defined at the moment of the credit's infoset generation. This is one of 3 identifiers that form the credit object reference. |
[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 |


  • IGeneralInvoiceResult
  • GetDebitor

IGeneralInvoiceResult::GetDebitor method |  |  | space
Gets the debitor's GLN identifier as well as the structured address. The structured address data is read via the methods of the returned IAddress interface instance. Please note, that dependent on the tiers mode a clone of the guarantor's address (TG) or the insurance's address (TP) is automatically assigned as debitor address in the IGeneralInvoiceRequest::Finalize method should the IGeneralInvoiceRequest::SetDebitor method not be called. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceResult/GetDebitor
[JSON input data] | pIGeneralInvoiceResult: | longValue, //interface address
[JSON result data] | pbstrGLN: ppIAddress: pbStatus: | "utf8StringValue", { pbIsPrivateAddress: true, pbstrCompanyName: "utf8StringValue", pbstrDepartment: "utf8StringValue", pbstrSalutation: "utf8StringValue", pbstrTitle: "utf8StringValue", pbstrFamilyname: "utf8StringValue", pbstrGivenname: "utf8StringValue", pbstrSubaddressing: "utf8StringValue", pbstrStreet: "utf8StringValue", pbstrPoBox: "utf8StringValue", pbstrZip: "utf8StringValue", pbstrCity: "utf8StringValue", pbstrStateCode: "utf8StringValue", pbstrCountryCode: "utf8StringValue", pbstrPhone1: "utf8StringValue", pbstrPhone2: "utf8StringValue", pbstrPhone3: "utf8StringValue", pbstrFax: "utf8StringValue", pbstrEMail: "utf8StringValue", pbstrUrl: "utf8StringValue" }, 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
C/C++ calling syntax |  |  |
HRESULT GetDebitor( | BSTR IAddress VARIANT_BOOL | *pbstrGLN, **ppIAddress, *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
Calling argument description |  |  |
[out] BSTR | *pbstrGLN | The GLN of the debitor as supplied by Stiftung Refdata. If the debitor's GLN is undefined than GLN from the private segment should be used (e.g. 2000000000008). |
[out] IAddress | **ppIAddress | The instance of a IAddress interface that allows to read back the structured address data. If no address is defined then the handle is NULL. |
[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 |


  • IGeneralInvoiceResult
  • GetDiagnoses

IGeneralInvoiceResult::GetDiagnoses method |  |  | space
This method has a Restful Webservice representation only! Method for collecting all diagnoses records covered by the IGeneralInvoiceResult interface and returned as JSON array. Please note that IGeneralInvoiceResult::GetDiagnoses takes over the functionality of the iterator pair IGeneralInvoiceResult::GetFirstDiagnosis / IGeneralInvoiceResult::GetNextDiagnosis with a single call, making the latter superfluous. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceResult/GetDiagnoses
[JSON input data] | pIGeneralInvoiceResult: | longValue, //interface address
[JSON result array] | { peDiagnosisType: pbstrCode: pbstrText: pbStatus: | longValue, "utf8StringValue", "utf8StringValue", 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
Calling argument description |  |  |
[out] DiagnosisType | *peDiagnosisType | The type of the diagnosis as given by the enumeration. |
[out] BSTR | *pbstrCode | The code of the diagnosis as given in the corresponding diagnosis catalog. |
[out] BSTR | *pbstrText | Textual description of the code as given in the corresponding diagnosis catalog. |
[out,retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE the end of data is reached |
space |


  • IGeneralInvoiceResult
  • GetDocuments

IGeneralInvoiceResult::GetDocuments method |  |  | space
This method has a Restful Webservice representation only! Method for collecting all document data covered by the IGeneralInvoiceResult interface and returned as JSON array. Please note that IGeneralInvoiceResult::GetDocuments takes over the functionality of the iterator pair IGeneralInvoiceResult::GetFirstDocument / IGeneralInvoiceResult::GetNextDocument with a single call, making the latter superfluous. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceResult/GetDocuments
[JSON input data] | pIGeneralInvoiceResult: | longValue, //interface address
[JSON result array] | { pbstrFile: peDocumentType: pbstrMimeType: pbStatus: | "utf8StringValue", longValue, "utf8StringValue", 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
Calling argument description |  |  |
[out] BSTR | *pbstrFile | In Restful Webservice output: pbstrFile is a relative URL that subsequently must be downloaded by a GET process. |
[out] DocumentType | *peDocumentType | eDocumentType describes the document in terms of ist semantic content encoded by a terminal set of tokens |
[out] BSTR | *pbstrMimeType | The MIME type of the document. |
[out,retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE the end of data is reached |
space |


  • IGeneralInvoiceResult
  • GetEsrQR

IGeneralInvoiceResult::GetEsrQR method |  |  | space
Retrieves the ESR information of type enEsrQR or enEsrQRplus. Call this method only if GetEsrType returns enEsrQR or enEsrQRplus otherwise this ESR information is undefined. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceResult/GetEsrQR
[JSON input data] | pIGeneralInvoiceResult: | longValue, //interface address
[JSON result data] | peEsrType: pbstrIBAN: pbstrReferenceNumber: bstrCustomerNote: pICreditorAddress: plPaymentPeriod: pbStatus: | longValue, "utf8StringValue", "utf8StringValue", "utf8StringValue", longValue, 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
C/C++ calling syntax |  |  |
HRESULT GetEsrQR( | EsrType BSTR BSTR BSTR IAddress long VARIANT_BOOL | *peEsrType, *pbstrIBAN, *pbstrReferenceNumber, *bstrCustomerNote, **pICreditorAddress, *plPaymentPeriod, *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
Calling argument description |  |  |
[out] EsrType | *peEsrType | The type of ESR, either 'enEsrQR' or 'enEsrQRplus' |
[out] BSTR | *pbstrIBAN | The account number in form of an QR-IBAN |
[out] BSTR | *pbstrReferenceNumber | The ESR reference number in the usual 27-digit form. |
[out] BSTR | *bstrCustomerNote | The optional customer note that is part of the QR code. |
[out] IAddress | **pICreditorAddress | The instance of an IAddress interface that allows to read back the ESR creditor address. If no address is defined then the handle is NULL. |
[out] long | *plPaymentPeriod | The defined payment period |
[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 |


  • IGeneralInvoiceResult
  • GetEsrRedQR

IGeneralInvoiceResult::GetEsrRedQR method |  |  | space
Retrieves the ESR information of type enRedPayinSlipQR (red payin slip with QR code). Call this method only if GetEsrType returns enRedPayinSlipQR otherwise this ESR information is undefined. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceResult/GetEsrRedQR
[JSON input data] | pIGeneralInvoiceResult: | longValue, //interface address
[JSON result data] | pbstrIBAN: pbstrRemarks: bstrCustomerNote: pICreditorAddress: plPaymentPeriod: pbStatus: | "utf8StringValue", "utf8StringValue", "utf8StringValue", longValue, 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
C/C++ calling syntax |  |  |
HRESULT GetEsrRedQR( | BSTR BSTR BSTR IAddress long VARIANT_BOOL | *pbstrIBAN, *pbstrRemarks, *bstrCustomerNote, **pICreditorAddress, *plPaymentPeriod, *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
Calling argument description |  |  |
[out] BSTR | *pbstrIBAN | The account number in form of a regular IBAN |
[out] BSTR | *pbstrRemarks | The optional remark that should be printed on the payin slip |
[out] BSTR | *bstrCustomerNote | The optional customer note that is part of the QR code. |
[out] IAddress | **pICreditorAddress | The instance of an IAddress interface that allows to read back the ESR creditor address. If no address is defined then the handle is NULL. |
[out] long | *plPaymentPeriod | The defined payment period |
[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 |


  • IGeneralInvoiceResult
  • GetEsrType

IGeneralInvoiceResult::GetEsrType method |  |  | space
Retrieves the type of ESR. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceResult/GetEsrType
[JSON input data] | pIGeneralInvoiceResult: | longValue, //interface address
[JSON result data] | peEsrType: 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
C/C++ calling syntax |  |  |
HRESULT GetEsrType( | EsrType VARIANT_BOOL | *peEsrType, *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
Calling argument description |  |  |
[out] EsrType | *peEsrType | Defines the type of ESR as given by the enumeration. |
[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 |


  • IGeneralInvoiceResult
  • GetFirstCaseDetail

IGeneralInvoiceResult::GetFirstCaseDetail method |  |  | space
Retrieves the first case detail record from the list of case details - case detail are possibly defined for stationary DRG cases only! VARIANT_FALSE is returned if the end of the case detail list is reached. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceResult/GetFirstCaseDetail
[JSON input data] | pIGeneralInvoiceResult: | longValue, //interface address
[JSON result data] | pbstrTariffType: pbstrCode: pdDateBegin: pdDateEnd: pbstrACID: peResidenceAfterDischarge: pbStatus: | "utf8StringValue", "utf8StringValue", "stringISODateValue", "stringISODateValue", "utf8StringValue", 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
C/C++ calling syntax |  |  |
HRESULT GetFirstCaseDetail( | BSTR BSTR DATE DATE BSTR ResidenceAfterDischarge VARIANT_BOOL | *pbstrTariffType, *pbstrCode, *pdDateBegin, *pdDateEnd, *pbstrACID, *peResidenceAfterDischarge, *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
Calling argument description |  |  |
[out] BSTR | *pbstrTariffType | The official tariff type as defined by Forum Datenaustausch This should be DRG tariff type "010". |
[out] BSTR | *pbstrCode | The optional bstrCode is the code of the service as given by the used tariff catalog. |
[out] DATE | *pdDateBegin | The starting date and time of the current case detail. Note, that this date must be equal or greater then the dDateBegin of the treatment period set in IGeneralInvoiceRequest::SetTreatment method. |
[out] DATE | *pdDateEnd | The ending date and time of the current case detail. Note, that this date must be less or equal the dDateEnd of the treatment period set in IGeneralInvoiceRequest::SetTreatment method. |
[out] BSTR | *pbstrACID | The Administrative Case IDentification for the current DRG case detail. |
[out] ResidenceAfterDischarge | *peResidenceAfterDischarge | The Residence After Discharge variable supplies information about the discharge location where the patient is going to encoded by a terminal set of tokens |
[out,retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE the end of data is reached |
space |


  • IGeneralInvoiceResult
  • GetFirstDiagnosis

IGeneralInvoiceResult::GetFirstDiagnosis method |  |  | space
Retrieves the first diagnosis from the list of diagnoses. VARIANT_FALSE is returned if the end of the diagnosis list is reached. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceResult/GetFirstDiagnosis
[JSON input data] | pIGeneralInvoiceResult: | longValue, //interface address
[JSON result data] | peDiagnosisType: pbstrCode: pbstrText: pbStatus: | longValue, "utf8StringValue", "utf8StringValue", 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
C/C++ calling syntax |  |  |
HRESULT GetFirstDiagnosis( | DiagnosisType BSTR BSTR VARIANT_BOOL | *peDiagnosisType, *pbstrCode, *pbstrText, *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
Calling argument description |  |  |
[out] DiagnosisType | *peDiagnosisType | The type of the diagnosis as given by the enumeration. |
[out] BSTR | *pbstrCode | The code of the diagnosis as given in the corresponding diagnosis catalog. |
[out] BSTR | *pbstrText | Textual description of the code as given in the corresponding diagnosis catalog. |
[out,retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE the end of data is reached |
space |


  • IGeneralInvoiceResult
  • GetFirstDocument

IGeneralInvoiceResult::GetFirstDocument method |  |  | space
Retrieves the first document from the list of documents. VARIANT_FALSE is returned if the end of the document list is reached. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceResult/GetFirstDocument
[JSON input data] | pIGeneralInvoiceResult: | longValue, //interface address
[JSON result data] | pbstrFile: peDocumentType: pbstrMimeType: pbStatus: | "utf8StringValue", longValue, "utf8StringValue", 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
C/C++ calling syntax |  |  |
HRESULT GetFirstDocument( | BSTR DocumentType BSTR VARIANT_BOOL | *pbstrFile, *peDocumentType, *pbstrMimeType, *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
Calling argument description |  |  |
[out] BSTR | *pbstrFile | bstrFile supplies the full file name (path + name) of the document in a temporary working directory. Be sure to copy away the file to a different location as all files in the working directory are deleted before the COM module shuts down! In Restful Webservice output: pbstrSource is a relative URL that subsequently must be downloaded by a GET process. |
[out] DocumentType | *peDocumentType | eDocumentType describes the document in terms of ist semantic content encoded by a terminal set of tokens |
[out] BSTR | *pbstrMimeType | The MIME type of the document. |
[out,retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE the end of data is reached |
space |


  • IGeneralInvoiceResult
  • GetFirstInstruction

IGeneralInvoiceResult::GetFirstInstruction method |  |  | space
Retrieves the first instruction from the list of instructions. VARIANT_FALSE is returned if the end of the instruction list is reached. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceResult/GetFirstInstruction
[JSON input data] | pIGeneralInvoiceResult: | longValue, //interface address
[JSON result data] | pbstrToken: pbstrValue: pbStatus: | "utf8StringValue", "utf8StringValue", 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
C/C++ calling syntax |  |  |
HRESULT GetFirstInstruction( | BSTR BSTR VARIANT_BOOL | *pbstrToken, *pbstrValue, *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
Calling argument description |  |  |
[out] BSTR | *pbstrToken | The name of the token/value instruction pair |
[out] BSTR | *pbstrValue | The data of the token/value instruction pair |
[out,retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE the end of data is reached |
space |


  • IGeneralInvoiceResult
  • GetFirstPartner

IGeneralInvoiceResult::GetFirstPartner method |  |  | space
Retrieves the first partner address from the list of partner addresses. Please note that only partners with a defined address are returned. Notably, partners induced by the AddService/AddServiceEx mechanism existing basically only by a GLN are not returned. VARIANT_FALSE is returned if the end of the case detail list is reached. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceResult/GetFirstPartner
[JSON input data] | pIGeneralInvoiceResult: | longValue, //interface address
[JSON result data] | pePartnerType: pbstrOtherPartnerType: pbstrGLN: pbstrZSR: ppIAddress: pbStatus: | longValue, "utf8StringValue", "utf8StringValue", "utf8StringValue", { pbIsPrivateAddress: true, pbstrCompanyName: "utf8StringValue", pbstrDepartment: "utf8StringValue", pbstrSalutation: "utf8StringValue", pbstrTitle: "utf8StringValue", pbstrFamilyname: "utf8StringValue", pbstrGivenname: "utf8StringValue", pbstrSubaddressing: "utf8StringValue", pbstrStreet: "utf8StringValue", pbstrPoBox: "utf8StringValue", pbstrZip: "utf8StringValue", pbstrCity: "utf8StringValue", pbstrStateCode: "utf8StringValue", pbstrCountryCode: "utf8StringValue", pbstrPhone1: "utf8StringValue", pbstrPhone2: "utf8StringValue", pbstrPhone3: "utf8StringValue", pbstrFax: "utf8StringValue", pbstrEMail: "utf8StringValue", pbstrUrl: "utf8StringValue" }, 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
C/C++ calling syntax |  |  |
HRESULT GetFirstPartner( | PartnerType BSTR BSTR BSTR IAddress VARIANT_BOOL | *pePartnerType, *pbstrOtherPartnerType, *pbstrGLN, *pbstrZSR, **ppIAddress, *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
Calling argument description |  |  |
[out] PartnerType | *pePartnerType | ePartnerType is the type/flavor of a partner encoded by a terminal set of tokens. The partner specification was primarily demanded by the "FinMa - Swiss Financial Market Supervisory Authority" to enhance the billing transparency in VVG cases. |
[out] BSTR | *pbstrOtherPartnerType | The optional type description of the partner if ePartnerType=enOther is set. |
[out] BSTR | *pbstrGLN | The GLN of the partner as supplied by Stiftung Refdata |
[out] BSTR | *pbstrZSR | The optional ZSR number of the partner as supplied by Santesuisse |
[out] IAddress | **ppIAddress | The instance of a IAddress interface that holds the structured address parts. A NULL pointer is supplied if no address should be set. |
[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 |


  • IGeneralInvoiceResult
  • GetFirstService

IGeneralInvoiceResult::GetFirstService method | space
Retrieves the first "simple/normal" service from the list of services.

Please note, that "simple/normal" qualifies as being added by the IGeneralInvoiceRequest::AddService method

VARIANT_FALSE is returned if the end of the service list is reached.
space
Restful webservice calling syntax
[POST] | /baseURL/ IGeneralInvoiceResult/GetFirstService
[JSON input data] pIGeneralInvoiceResult: longValue, //interface address
[JSON result data] pbstrTariffType:
pbstrCode:
pbstrReferenceCode:
pdQuantity:
plSessionNumber:
plGroupSize:
pdDateBegin:
pdDateEnd:
pbstrProviderGLN:
pbstrResponsibleGLN:
peSide:
pbstrServiceName:
pdUnit:
pdUnitFactor:
pdExternalFactor:
pdAmount:
pdVatRate:
pbstrRemark:
pbstrSectionCode:
plServiceAttributes:
plID:
pbStatus: 		"utf8StringValue",
"utf8StringValue",
"utf8StringValue",
doubleValue,
longValue,
longValue,
"stringISODateValue",
"stringISODateValue",
"utf8StringValue",
"utf8StringValue",
longValue,
"utf8StringValue",
doubleValue,
doubleValue,
doubleValue,
doubleValue,
doubleValue,
"utf8StringValue",
"utf8StringValue",
longValue,
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
C/C++ calling syntax
HRESULT GetFirstService( BSTR
BSTR
BSTR
double
long
long
DATE
DATE
BSTR
BSTR
SideType
BSTR
double
double
double
double
double
BSTR
BSTR
long
long
VARIANT_BOOL 		*pbstrTariffType,
*pbstrCode,
*pbstrReferenceCode,
*pdQuantity,
*plSessionNumber,
*plGroupSize,
*pdDateBegin,
*pdDateEnd,
*pbstrProviderGLN,
*pbstrResponsibleGLN,
*peSide,
*pbstrServiceName,
*pdUnit,
*pdUnitFactor,
*pdExternalFactor,
*pdAmount,
*pdVatRate,
*pbstrRemark,
*pbstrSectionCode,
*plServiceAttributes,
*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
Calling argument description
[out] BSTR | *pbstrTariffType | The official tariff type as defined by Forum Datenaustausch
[out] BSTR | *pbstrCode | The service code.
[out] BSTR *pbstrReferenceCode The reference code.

The reference code might be empty since not all services request one.
[out] double *pdQuantity The floating point quantity.

Note that quantity changes the sign if a storno request is produced.
[out] long *plSessionNumber 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.
[out] long *plGroupSize lGroupSize defines the size of a participating group of a service whose quantity is calculated by the "Divisor Method".
It should be noted that the group size is declarative only with a default value equals to 1 implicitly meaning that it is NO service defined via the "Divisor Method" as the group size for such a service is always larger than 1.

Please note that in the "Divisor Method" the quantity is coded by definition as follows: quantity = effective_quantity / group_size.
[out] DATE | *pdDateBegin | The date of the service's prescription
[out] DATE *pdDateEnd The date of the last prescription of the service if and only if the service was applied over a period of time.

dDateEnd=0.0 is returned for all cases where no end date of the prescription was defined.
[out] BSTR *pbstrProviderGLN The GLN of the service provider as supplied by Stiftung Refdata

Note if bstrProviderGLN is undefined and bstrResponsibleGLN is defined then bstrResponsibleGLN is copied into the bstrProviderGLN variable. If both variables are undefined the pseudo GLN "2099999999998" is set.
[out] BSTR *pbstrResponsibleGLN The GLN of the responsible for the service as supplied by Stiftung Refdata

Note if bstrResponsibleGLN is undefined and bstrProviderGLN is defined then bstrProviderGLN is copied into the bstrResponsibleGLN variable. If both variables are undefined the pseudo EAN "2099999999998" is set.
[out] SideType | *peSide | The body side dependency of the service
[out] BSTR | *pbstrServiceName | The name of the service as defined by the used tariff
[out] double | *pdUnit | Tax points (TP) of the service.
[out] double | *pdUnitFactor | Tax point value (TPV) of the service.
[out] double *pdExternalFactor dExternalFactor is an external scaling factor in the provider's responsibility that modulates the corresponding service outside the official tariff structure.
The dExternalFactor is used for discounting or surcharging and can even take a zero value to supply a charge free service.

For tariff «005 - AmbulatoryCaseFlatrate» the tariff owner "OAAT-OTMA" will use the
dExternalFactor 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.

For tariff «010 - DRG» the external factor is used for defining the splitting situation between insurance and canton.
[out] double *pdAmount The amount in CHF of the service supplied in 2-digit precision.

Note that amount changes the sign if a storno request is produced due to the sign change of dQuantity.
[out] double | *pdVatRate | The VAT rate as real number that should be applied to this service e.g. 0.081 for a VAT rate of 8.1%.
[out] BSTR | *pbstrRemark | An optional remark for the given service
[out] BSTR *pbstrSectionCode The optional bstrSectionCode stems from a variable set defined by "OAAT-OTMA - Reglement Fachbereiche", that designates the service-providing department within a hospital or medical practice, e.g. 'M100.06' for the gastroenterology department.

The list of all departments is documented elsewhere on the "OAAT-OTMA" website, whereby the tariffs used, the law applied or special contracts stipulates the application/usage of the section code (primarily for body@role=hospital, body@role=rehab_clinic, body@role=psychiatric_clinic).
[out] long *plServiceAttributes lServiceAttributes is a 32-bit integer where each bit position defines a special information.

Defined bit positions as of November 2024
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. In a printed invoice/reminder, bit 1 is written as SA='Code207' in the comment line, case insensitive. If more than one service attribute is set, all defined mnemonics are combined as SA='BitX+BitY+BitZ'.
Bit 2: (0x000002) | franchiseFree: Franchise exemption of given service If this bit ("franchiseFree") is set, the service provider declares that the service was provided as franchise free. In a printed invoice/reminder, bit 2 is written as SA='franchiseFree' in the comment line, case insensitive. If more than one service attribute is set, all defined mnemonics are combined as SA='BitX+BitY+BitZ'.
Bit 3: (0x000004) | drugOffLabelUse: off label use of a drug in accordance with Art. 71a-c KVV If this bit ("drugOffLabelUse") is set, the service provider declares that the off-label prescription of the drug has been approved by the healthcare insurance by means of a prior accepted credit request. In a printed invoice/reminder, bit 3 is written as SA='drugOffLabelUse' in the comment line, case insensitive. If more than one service attribute is set, all defined mnemonics are combined as SA='BitX+BitY+BitZ'.
Bit 4: (0x000008) | withoutDoctorsOrder: Services without a doctor's order (Art. 59 KVV, Abs. 3bis) If this bit ("withoutDoctorsOrder") is set, the service provider declares that the service was provided without a doctor's order. In a printed invoice/reminder, bit 4 is written as SA='withoutDoctorsOrder' in the comment line, case insensitive. If more than one service attribute is set, all defined mnemonics are combined as SA='BitX+BitY+BitZ'.
Bit 5: (0x000010) | noObligation: the applied service is not an obligatory insurance benefit under the given Law (or Contract) If this bit ("noObligation") is set, the service provider declares that the service provided is not an obligatory insurance benefit under the given law (or contract). In a printed invoice/reminder, bit 5 is written as SA='noObligation' in the comment line, case insensitive. If more than one service attribute is set, all defined mnemonics are combined as SA='BitX+BitY+BitZ'.
[out] long *plID This is the returned internal ID of the service record.

This internal ID is used to append extraService, extraDrug and/or xtraDRG information for the focused service with the SetXtraService, SetXtraDrug or SetXtraDRG methods, respectively.
[out,retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE the end of data is reached
space


  • IGeneralInvoiceResult
  • GetFirstServiceEx

IGeneralInvoiceResult::GetFirstServiceEx method | space
Retrieves the first "extended" service from the list of services.

Please note, that "extended" qualifies as being added by the IGeneralInvoiceRequest::AddServiceEx method.

VARIANT_FALSE is returned if the end of the service list is reached.
space
Restful webservice calling syntax
[POST] | /baseURL/ IGeneralInvoiceResult/GetFirstServiceEx
[JSON input data] pIGeneralInvoiceResult: longValue, //interface address
[JSON result data] pbstrTariffType:
pbstrCode:
pbstrReferenceCode:
pdQuantity:
plSessionNumber:
plGroupSize:
pdDateBegin:
pdDateEnd:
pbstrProviderGLN:
pbstrResponsibleGLN:
peSide:
pbstrServiceName:
pdUnitMT:
pdUnitFactorMT:
pdUnitInternalScalingFactorMT:
pdUnitExternalScalingFactorMT:
pdAmountMT:
pdUnitTT:
pdUnitFactorTT:
pdUnitInternalScalingFactorTT:
pdUnitExternalScalingFactorTT:
pdAmountTT:
pdAmount:
pdVatRate:
pbstrRemark:
pbstrSectionCode:
plServiceAttributes:
peTreatmentType:
peBillingRole:
peMedicalRole:
plID:
pbStatus: 		"utf8StringValue",
"utf8StringValue",
"utf8StringValue",
doubleValue,
longValue,
longValue,
"stringISODateValue",
"stringISODateValue",
"utf8StringValue",
"utf8StringValue",
longValue,
"utf8StringValue",
doubleValue,
doubleValue,
doubleValue,
doubleValue,
doubleValue,
doubleValue,
doubleValue,
doubleValue,
doubleValue,
doubleValue,
doubleValue,
doubleValue,
"utf8StringValue",
"utf8StringValue",
longValue,
longValue,
longValue,
longValue,
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
C/C++ calling syntax
HRESULT GetFirstServiceEx( BSTR
BSTR
BSTR
double
long
long
DATE
DATE
BSTR
BSTR
SideType
BSTR
double
double
double
double
double
double
double
double
double
double
double
double
BSTR
BSTR
long
TreatmentType
BillingRoleType
MedicalRoleType
long
VARIANT_BOOL 		*pbstrTariffType,
*pbstrCode,
*pbstrReferenceCode,
*pdQuantity,
*plSessionNumber,
*plGroupSize,
*pdDateBegin,
*pdDateEnd,
*pbstrProviderGLN,
*pbstrResponsibleGLN,
*peSide,
*pbstrServiceName,
*pdUnitMT,
*pdUnitFactorMT,
*pdUnitInternalScalingFactorMT,
*pdUnitExternalScalingFactorMT,
*pdAmountMT,
*pdUnitTT,
*pdUnitFactorTT,
*pdUnitInternalScalingFactorTT,
*pdUnitExternalScalingFactorTT,
*pdAmountTT,
*pdAmount,
*pdVatRate,
*pbstrRemark,
*pbstrSectionCode,
*plServiceAttributes,
*peTreatmentType,
*peBillingRole,
*peMedicalRole,
*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
Calling argument description
[out] BSTR | *pbstrTariffType | The official tariff type as defined by Forum Datenaustausch
[out] BSTR | *pbstrCode | The service code.
[out] BSTR *pbstrReferenceCode The reference code.

The reference code might be empty since not all services request one.
[out] double *pdQuantity The floating point quantity.

Note that quantity changes the sign if a storno request is produced.
[out] long *plSessionNumber 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.
[out] long | *plGroupSize | 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!
[out] DATE | *pdDateBegin | The date of the service's prescription
[out] DATE *pdDateEnd The date of the last prescription of the service if and only if the service was applied over a period of time.

dDateEnd=0.0 is returned for all cases where no end date of the prescription was defined.
[out] BSTR *pbstrProviderGLN The GLN of the service provider as supplied by Stiftung Refdata

Note if bstrProviderGLN is undefined and bstrResponsibleGLN is defined then bstrResponsibleGLN is copied into the bstrProviderGLN variable. If both variables are undefined the pseudo GLN "2099999999998" is set.
[out] BSTR *pbstrResponsibleGLN The GLN of the responsible for the service as supplied by Stiftung Refdata

Note if bstrResponsibleGLN is undefined and bstrProviderGLN is defined then bstrProviderGLN is copied into the bstrResponsibleGLN variable. If both variables are undefined the pseudo EAN "2099999999998" is set.
[out] SideType | *peSide | The body side dependency of the service
[out] BSTR | *pbstrServiceName | The name of the service as defined by the used tariff
[out] double | *pdUnitMT | Tax points of the medical part (TP_MT) of the service.
[out] double | *pdUnitFactorMT | Tax point value of the medical part (TPV_MT) of the service.
[out] double *pdUnitInternalScalingFactorMT The internal scaling factor of the medical part of the service.

This is a modulation factor to represent percent services and is mostly 1.
[out] double *pdUnitExternalScalingFactorMT 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.
[out] double *pdAmountMT 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.
[out] double | *pdUnitTT | Tax points of the technical part (TP_TT) of the service.
[out] double | *pdUnitFactorTT | Tax point value of the technical part (TPV_TT) of the service.
[out] double *pdUnitInternalScalingFactorTT The internal scaling factor of the technical part of the service.

This is a modulation factor to represent percent services and is mostly 1.
[out] double *pdUnitExternalScalingFactorTT 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.
[out] double *pdAmountTT 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.
[out] double *pdAmount The amount in CHF of 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.
[out] double | *pdVatRate | The VAT rate as real number that was applied to this service.
[out] BSTR | *pbstrRemark | An optional remark for the given service
[out] BSTR *pbstrSectionCode The optional bstrSectionCode stems from a variable set defined by "OAAT-OTMA - Reglement Fachbereiche", that designates the service-providing department within a hospital or medical practice, e.g. 'M100.06' for the gastroenterology department.

The list of all departments is documented elsewhere on the "OAAT-OTMA" website, whereby the tariffs used, the law applied or special contracts stipulates the application/usage of the section code (primarily for body@role=hospital, body@role=rehab_clinic, body@role=psychiatric_clinic).
[out] long *plServiceAttributes 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] TreatmentType | *peTreatmentType | The type of treatment (ambulatory or stationary) defined by the IServiceExInput::SetTreatment method.
[out] BillingRoleType | *peBillingRole | The ServiceExInput-relevant billing role applied for this service defined by the IServiceExInput::SetPhysician method.
[out] MedicalRoleType | *peMedicalRole | The ServiceExInput-relevant medical role applied for this service defined by the IServiceExInput::SetPhysician method.
[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 the end of data is reached
space


  • IGeneralInvoiceResult
  • GetFirstVat

IGeneralInvoiceResult::GetFirstVat method |  |  | space
Retrieves the first VAT information. VARIANT_FALSE is returned if the end of the VAT list is reached. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceResult/GetFirstVat
[JSON input data] | pIGeneralInvoiceResult: | longValue, //interface address
[JSON result data] | pdVat: pdVatRate: pbStatus: | doubleValue, doubleValue, 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
C/C++ calling syntax |  |  |
HRESULT GetFirstVat( | double double VARIANT_BOOL | *pdVat, *pdVatRate, *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
Calling argument description |  |  |
[out] double | *pdVat | The total VAT amount for the given VAT rate supplied in 2-digit precision. |
[out] double | *pdVatRate | The VAT rate given as a real number. |
[out,retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE the end of data is reached |
space |


  • IGeneralInvoiceResult
  • GetFirstXtraService

IGeneralInvoiceResult::GetFirstXtraService method | space
Gets the first token=value pair from the list of token=value pairs for a supplied service ID.

VARIANT_FALSE is returned if the end of the section/location list is reached.
space
Restful webservice calling syntax
[POST] | /baseURL/ IGeneralInvoiceResult/GetFirstXtraService
[JSON input data] pIGeneralInvoiceResult:
lID: 		longValue, //interface address
longValue
[JSON result data] pbstrToken:
pbstrValue:
pbStatus: 		"utf8StringValue",
"utf8StringValue",
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
C/C++ calling syntax
HRESULT GetFirstXtraService( long
BSTR
BSTR
VARIANT_BOOL 		lID,
*pbstrToken,
*pbstrValue,
*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
Calling argument description
[in] long | lID | The unique ID of the prior defined service for which the xtra service data should be retrieved.
[out] BSTR *pbstrToken The well defined token of the token=value pair.

Forum Datenaustausch has defined the following tokens as of November 2024
Token | Meaning
ICD10 | The expression ICD10='icd10_diagnosis_code' (e.g. ICD10='A32.1') allows to define/set an ICD10 diagnosis code applicable to a specific service record for instance for an Ambulatory Case Flaterate (ACF) service record.
TI | The expression TI='ticino_diagnosis_code' (e.g. TI='E7') allows to define/set an Ticino diagnosis code applicable to a specific service record for instance for an Ambulatory Case Flaterate (ACF) service record.
Capitulum | The expression Capitulum='capitulum_chapter' (e.g. Capitulum='Cap01') allows to define/set a specific capitulum of an Ambulatory Case Flaterate (ACF) service record.
SLIndication | The expression SLIndication='sl_indication_code' (e.g. SLIndication='21316.01') allows to define/set a specific SL indication code for a drug record of tariff type 402.
[out] BSTR | *pbstrValue | The value of the token=value pair
[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


  • IGeneralInvoiceResult
  • GetGuarantor

IGeneralInvoiceResult::GetGuarantor method |  |  | space
Retrieves the guarantor's structured address and the assigned GLN The structured address data is read via the methods of the returned Iaddress interface instance. Please note, that a clone of the patient"s address is automatically assigned as guarantor address in the IGeneralInvoiceRequest::Finalize method should the IGeneralInvoiceRequest::SetGuarantor method not be called. Furthermore, dependent on the tiers mode a clone of the guarantor's address (TG) or the insurance's address (TP) is automatically assigned as debitor address in the IGeneralInvoiceRequest::Finalize method should the IGeneralInvoiceRequest::SetDebitor method not be called. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceResult/GetGuarantor
[JSON input data] | pIGeneralInvoiceResult: | longValue, //interface address
[JSON result data] | pbstrGLN: pbstrUID: ppIAddress: pbStatus: | "utf8StringValue", "utf8StringValue", { pbIsPrivateAddress: true, pbstrCompanyName: "utf8StringValue", pbstrDepartment: "utf8StringValue", pbstrSalutation: "utf8StringValue", pbstrTitle: "utf8StringValue", pbstrFamilyname: "utf8StringValue", pbstrGivenname: "utf8StringValue", pbstrSubaddressing: "utf8StringValue", pbstrStreet: "utf8StringValue", pbstrPoBox: "utf8StringValue", pbstrZip: "utf8StringValue", pbstrCity: "utf8StringValue", pbstrStateCode: "utf8StringValue", pbstrCountryCode: "utf8StringValue", pbstrPhone1: "utf8StringValue", pbstrPhone2: "utf8StringValue", pbstrPhone3: "utf8StringValue", pbstrFax: "utf8StringValue", pbstrEMail: "utf8StringValue", pbstrUrl: "utf8StringValue" }, 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
C/C++ calling syntax |  |  |
HRESULT GetGuarantor( | BSTR BSTR IAddress VARIANT_BOOL | *pbstrGLN, *pbstrUID, **ppIAddress, *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
Calling argument description |  |  |
[out] BSTR | *pbstrGLN | The GLN of the guarantor as supplied by Stiftung Refdata Note, that the guarantor's GLN is a required parameter. However, guarantors might not possess such a GLN. Therefore do supply a GLN from the private GLN sector (e.g. 2000000000008) in such a case. |
[out] BSTR | *pbstrUID | The optional bstrUID is the UID of the guarantor in the electronic layout as defined by the "Swiss Federal Tax Administration". In the electronic layout all punctuation characters ('-' and '.') are striped. |
[out] IAddress | **ppIAddress | The instance of an IAddress interface that allows to read back the structured address data. If no address is defined then the handle is NULL. |
[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 |


  • IGeneralInvoiceResult
  • GetInstructions

IGeneralInvoiceResult::GetInstructions method |  |  | space
This method has a Restful Webservice representation only! Method for collecting all instruction records covered by the IGeneralInvoiceResult interface and returned as JSON array. Please note that IGeneralInvoiceResult::GetInstructions takes over the functionality of the iterator pair IGeneralInvoiceResult::GetFirstInstruction / IGeneralInvoiceResult::GetNextInstruction with a single call, making the latter superfluous. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceResult/GetInstructions
[JSON input data] | pIGeneralInvoiceResult: | longValue, //interface address
[JSON result array] | { pbstrToken: pbstrValue: pbStatus: | "utf8StringValue", "utf8StringValue", 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
Calling argument description |  |  |
[out] BSTR | *pbstrToken | The name of the token/value instruction pair |
[out] BSTR | *pbstrValue | The data of the token/value instruction pair |
[out,retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE the end of data is reached |
space |


  • IGeneralInvoiceResult
  • GetInsurance

IGeneralInvoiceResult::GetInsurance method |  |  | space
Gets the insurance's GLN as well as the structured address. Please note, that dependent on the tiers mode a clone of the guarantor's address (TG) or the insurance's address (TP) is automatically assigned as debitor address in the IGeneralInvoiceRequest::Finalize method should the IGeneralInvoiceRequest::SetDebitor method not be called. The structured address data is read via the methods of the returned Iaddress interface instance. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceResult/GetInsurance
[JSON input data] | pIGeneralInvoiceResult: | longValue, //interface address
[JSON result data] | pbstrGLN: ppIAddress: pbStatus: | "utf8StringValue", { pbIsPrivateAddress: true, pbstrCompanyName: "utf8StringValue", pbstrDepartment: "utf8StringValue", pbstrSalutation: "utf8StringValue", pbstrTitle: "utf8StringValue", pbstrFamilyname: "utf8StringValue", pbstrGivenname: "utf8StringValue", pbstrSubaddressing: "utf8StringValue", pbstrStreet: "utf8StringValue", pbstrPoBox: "utf8StringValue", pbstrZip: "utf8StringValue", pbstrCity: "utf8StringValue", pbstrStateCode: "utf8StringValue", pbstrCountryCode: "utf8StringValue", pbstrPhone1: "utf8StringValue", pbstrPhone2: "utf8StringValue", pbstrPhone3: "utf8StringValue", pbstrFax: "utf8StringValue", pbstrEMail: "utf8StringValue", pbstrUrl: "utf8StringValue" }, 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
C/C++ calling syntax |  |  |
HRESULT GetInsurance( | BSTR IAddress VARIANT_BOOL | *pbstrGLN, **ppIAddress, *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
Calling argument description |  |  |
[out] BSTR | *pbstrGLN | The GLN of the insurance as supplied by Stiftung Refdata |
[out] IAddress | **ppIAddress | The instance of an IAddress interface that allows to read back the structured address data of the insurance. If no address is defined then the handle is NULL. |
[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 |


  • IGeneralInvoiceResult
  • GetInsured

IGeneralInvoiceResult::GetInsured method | space
Retrieves the insured's primary parameters as well as the structured address.

The structured address data is read via the methods of the returned IAddress interface instance.
space
Restful webservice calling syntax
[POST] | /baseURL/ IGeneralInvoiceResult/GetInsured
[JSON input data] pIGeneralInvoiceResult: longValue, //interface address
[JSON result data] peSexType:
peGenderType:
pdBirthdate:
pbstrSSN:
pbstrInsuredID:
ppIAddress:

pbStatus: 		longValue,
longValue,
"stringISODateValue",
"utf8StringValue",
"utf8StringValue",
{
pbIsPrivateAddress: true,
pbstrCompanyName: "utf8StringValue",
pbstrDepartment: "utf8StringValue",
pbstrSalutation: "utf8StringValue",
pbstrTitle: "utf8StringValue",
pbstrFamilyname: "utf8StringValue",
pbstrGivenname: "utf8StringValue",
pbstrSubaddressing: "utf8StringValue",
pbstrStreet: "utf8StringValue",
pbstrPoBox: "utf8StringValue",
pbstrZip: "utf8StringValue",
pbstrCity: "utf8StringValue",
pbstrStateCode: "utf8StringValue",
pbstrCountryCode: "utf8StringValue",
pbstrPhone1: "utf8StringValue",
pbstrPhone2: "utf8StringValue",
pbstrPhone3: "utf8StringValue",
pbstrFax: "utf8StringValue",
pbstrEMail: "utf8StringValue",
pbstrUrl: "utf8StringValue"
},
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
C/C++ calling syntax
HRESULT GetInsured( SexType
GenderType
DATE
BSTR
BSTR
IAddress
VARIANT_BOOL 		*peSexType,
*peGenderType,
*pdBirthdate,
*pbstrSSN,
*pbstrInsuredID,
**ppIAddress,
*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
Calling argument description
[out] SexType | *peSexType | The insured's medical sex (pre-dominantly induced by the actual hormonal balance of the body) encoded by a terminal set of tokens.
[out] GenderType | *peGenderType | The insured's social gender encoded by a terminal set of tokens
[out] DATE | *pdBirthdate | The insured's birthdate.
[out] BSTR *pbstrSSN The insured's social security number (SSN) in its printed form whereupon 3 distinguished types are possible:
  • the new 13 digit Swiss SSN ("SV-Nummer") beginning with 756 as defined by Federal Social Insurance Office
  • the new 4-10 digit SSN of Liechtenstein ("AHV-Nummer") as defined by Liechtensteinische AHV-IV-FAK
  • the 13 digit IDNR number of Liechtenstein ("IDNR-Nummer") beginning with 438
[out] BSTR | *pbstrInsuredID | The insured's insurance, whereas in most cases it is the 20-digits official card ID or if this one is unknown/unavailable then the old proprietary 7-digits insurance ID is given
[out] IAddress **ppIAddress The instance of an IAddress interface that allows to read back the structured address data.
If no address is defined then the handle is NULL.
[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


  • IGeneralInvoiceResult
  • GetInvoice

IGeneralInvoiceResult::GetInvoice method |  |  | space
Retrieves the invoice object reference parameters. The credit, invoice and reminder object references (if supplied in the request) form a object reference chain (credit -> invoice -> reminder) with the reminder as topmost object reference if supplied in the request otherwise the invoice is the topmost object reference (the invoice object is mandatory in all cases!). The page "object reference" provides an in-depth description of the concepts of "object reference", "object reference chain", and "topmost object reference". |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceResult/GetInvoice
[JSON input data] | pIGeneralInvoiceResult: | longValue, //interface address
[JSON result data] | pbstrRequestInvoiceID: pdRequestInvoiceDate: plRequestInvoiceTimestamp: pbStatus: | "utf8StringValue", "stringISODateValue", 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
C/C++ calling syntax |  |  |
HRESULT GetInvoice( | BSTR DATE long VARIANT_BOOL | *pbstrRequestInvoiceID, *pdRequestInvoiceDate, *plRequestInvoiceTimestamp, *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
Calling argument description |  |  |
[out] BSTR | *pbstrRequestInvoiceID | The request ID is the main software's identification of the invoice ("Rechnungsnummer"). This is one of 3 identifiers that form the invoice object reference. |
[out] DATE | *pdRequestInvoiceDate | The request date is the main software's date of the invoice request ("Rechnungsdatum"). This is one of 3 identifiers that form the invoice object reference. |
[out] long | *plRequestInvoiceTimestamp | This is a UNIX timestamp defined at the moment of the invoice's infoset generation. This is one of 3 identifiers that form the invoice object reference. |
[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 |


  • IGeneralInvoiceResult
  • GetLaw

IGeneralInvoiceResult::GetLaw method |  |  | space
Retrieves the data about the applied law and its dependent information |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceResult/GetLaw
[JSON input data] | pIGeneralInvoiceResult: | longValue, //interface address
[JSON result data] | peLawType: pdCaseDate: pbstrCaseID: pbstrInsuredID: pbStatus: | longValue, "stringISODateValue", "utf8StringValue", "utf8StringValue", 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
C/C++ calling syntax |  |  |
HRESULT GetLaw( | LawType DATE BSTR BSTR VARIANT_BOOL | *peLawType, *pdCaseDate, *pbstrCaseID, *pbstrInsuredID, *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
Calling argument description |  |  |
[out] LawType | *peLawType | Defines the type of law as given by the enumeration list |
[out] DATE | *pdCaseDate | The case date of the insurance (e.g. date of accident in UVG) This date might be undefined for certain laws and is than left empty |
[out] BSTR | *pbstrCaseID | The case ID of the insurance (e.g. accident number in UVG) This caseID might be undefined for certain laws and is than left empty |
[out] BSTR | *pbstrInsuredID | The patient's insurance ID, where in most cases this is the 20-digits official card ID or if this one is unknown/unavailable then the old proprietary 7-digits insurance ID is given |
[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 |


  • IGeneralInvoiceResult
  • GetNextCaseDetail

IGeneralInvoiceResult::GetNextCaseDetail method |  |  | space
Retrieves the next case detail record from the list of case details - case details are possibly defined for stationary DRG cases only! VARIANT_FALSE is returned if the end of the case detail list is reached. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceResult/GetNextCaseDetail
[JSON input data] | pIGeneralInvoiceResult: | longValue, //interface address
[JSON result data] | pbstrTariffType: pbstrCode: pdDateBegin: pdDateEnd: pbstrACID: peResidenceAfterDischarge: pbStatus: | "utf8StringValue", "utf8StringValue", "stringISODateValue", "stringISODateValue", "utf8StringValue", 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
C/C++ calling syntax |  |  |
HRESULT GetNextCaseDetail( | BSTR BSTR DATE DATE BSTR ResidenceAfterDischarge VARIANT_BOOL | *pbstrTariffType, *pbstrCode, *pdDateBegin, *pdDateEnd, *pbstrACID, *peResidenceAfterDischarge, *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
Calling argument description |  |  |
[out] BSTR | *pbstrTariffType | The official tariff type as defined by Forum Datenaustausch This should be DRG tariff type "010". |
[out] BSTR | *pbstrCode | The DRG service code |
[out] DATE | *pdDateBegin | The starting date and time of the current case detail. Note, that this date must be equal or greater then the dDateBegin of the treatment period set in IGeneralInvoiceRequest::SetTreatment method. |
[out] DATE | *pdDateEnd | The ending date and time of the current case detail. Note, that this date must be less or equal the dDateEnd of the treatment period set in IGeneralInvoiceRequest::SetTreatment method. |
[out] BSTR | *pbstrACID | The Administrative Case IDentification for the current DRG case detail. |
[out] ResidenceAfterDischarge | *peResidenceAfterDischarge | The Residence After Discharge variable supplies information about the discharge location where the patient is going to encoded by a terminal set of tokens |
[out,retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE the end of data is reached |
space |


  • IGeneralInvoiceResult
  • GetNextDiagnosis

IGeneralInvoiceResult::GetNextDiagnosis method |  |  | space
Retrieves the next diagnosis from the list of diagnoses. VARIANT_FALSE is returned if the end of the diagnosis list is reached. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceResult/GetNextDiagnosis
[JSON input data] | pIGeneralInvoiceResult: | longValue, //interface address
[JSON result data] | peDiagnosisType: pbstrCode: pbstrText: pbStatus: | longValue, "utf8StringValue", "utf8StringValue", 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
C/C++ calling syntax |  |  |
HRESULT GetNextDiagnosis( | DiagnosisType BSTR BSTR VARIANT_BOOL | *peDiagnosisType, *pbstrCode, *pbstrText, *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
Calling argument description |  |  |
[out] DiagnosisType | *peDiagnosisType | The type of the diagnosis as given by the enumeration. |
[out] BSTR | *pbstrCode | The code of the diagnosis as given in the corresponding diagnosis catalog. |
[out] BSTR | *pbstrText | Textual description of the code as given in the corresponding diagnosis catalog. |
[out,retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE the end of data is reached |
space |


  • IGeneralInvoiceResult
  • GetNextDocument

IGeneralInvoiceResult::GetNextDocument method |  |  | space
Retrieves the next document from the list of documents. VARIANT_FALSE is returned if the end of the document list is reached. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceResult/GetNextDocument
[JSON input data] | pIGeneralInvoiceResult: | longValue, //interface address
[JSON result data] | pbstrFile: peDocumentType: pbstrMimeType: pbStatus: | "utf8StringValue", longValue, "utf8StringValue", 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
C/C++ calling syntax |  |  |
HRESULT GetNextDocument( | BSTR DocumentType BSTR VARIANT_BOOL | *pbstrFile, *peDocumentType, *pbstrMimeType, *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
Calling argument description |  |  |
[out] BSTR | *pbstrFile | bstrFile supplies the full file name (path + name) of the document in a temporary working directory. Be sure to copy away the file to a different location as all files in the working directory are deleted before the COM module shuts down! In Restful Webservice output: pbstrSource is a relative URL that subsequently must be downloaded by a GET process. |
[out] DocumentType | *peDocumentType | eDocumentType describes the document in terms of ist semantic content encoded by a terminal set of tokens |
[out] BSTR | *pbstrMimeType | The MIME type of the document. |
[out,retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE the end of data is reached |
space |


  • IGeneralInvoiceResult
  • GetNextInstruction

IGeneralInvoiceResult::GetNextInstruction method |  |  | space
Retrieves the next instruction from the list of instructions. VARIANT_FALSE is returned if the end of the instruction list is reached. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceResult/GetNextInstruction
[JSON input data] | pIGeneralInvoiceResult: | longValue, //interface address
[JSON result data] | pbstrToken: pbstrValue: pbStatus: | "utf8StringValue", "utf8StringValue", 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
C/C++ calling syntax |  |  |
HRESULT GetNextInstruction( | BSTR BSTR VARIANT_BOOL | *pbstrToken, *pbstrValue, *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
Calling argument description |  |  |
[out] BSTR | *pbstrToken | The name of the token/value instruction pair |
[out] BSTR | *pbstrValue | The data of the token/value instruction pair |
[out,retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE the end of data is reached |
space |


  • IGeneralInvoiceResult
  • GetNextPartner

IGeneralInvoiceResult::GetNextPartner method |  |  | space
Retrieves the next partner address from the list of partner addresses. Please note that only partners with a defined address are returned. Notably, partners induced by the AddService/AddServiceEx mechanism existing basically only by a GLN are not returned. VARIANT_FALSE is returned if the end of the case detail list is reached. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceResult/GetNextPartner
[JSON input data] | pIGeneralInvoiceResult: | longValue, //interface address
[JSON result data] | pePartnerType: pbstrOtherPartnerType: pbstrGLN: pbstrZSR: ppIAddress: pbStatus: | longValue, "utf8StringValue", "utf8StringValue", "utf8StringValue", { pbIsPrivateAddress: true, pbstrCompanyName: "utf8StringValue", pbstrDepartment: "utf8StringValue", pbstrSalutation: "utf8StringValue", pbstrTitle: "utf8StringValue", pbstrFamilyname: "utf8StringValue", pbstrGivenname: "utf8StringValue", pbstrSubaddressing: "utf8StringValue", pbstrStreet: "utf8StringValue", pbstrPoBox: "utf8StringValue", pbstrZip: "utf8StringValue", pbstrCity: "utf8StringValue", pbstrStateCode: "utf8StringValue", pbstrCountryCode: "utf8StringValue", pbstrPhone1: "utf8StringValue", pbstrPhone2: "utf8StringValue", pbstrPhone3: "utf8StringValue", pbstrFax: "utf8StringValue", pbstrEMail: "utf8StringValue", pbstrUrl: "utf8StringValue" }, 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
C/C++ calling syntax |  |  |
HRESULT GetNextPartner( | PartnerType BSTR BSTR BSTR IAddress VARIANT_BOOL | *pePartnerType, *pbstrOtherPartnerType, *pbstrGLN, *pbstrZSR, **ppIAddress, *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
Calling argument description |  |  |
[out] PartnerType | *pePartnerType | ePartnerType is the type/flavor of a partner encoded by a terminal set of tokens. The partner specification was primarily demanded by the "FinMa - Swiss Financial Market Supervisory Authority" to enhance the billing transparency in VVG cases. |
[out] BSTR | *pbstrOtherPartnerType | The optional type description of the partner if ePartnerType=enOther is set. |
[out] BSTR | *pbstrGLN | The GLN of the partner as supplied by Stiftung Refdata |
[out] BSTR | *pbstrZSR | The optional ZSR number of the partner as supplied by Santesuisse |
[out] IAddress | **ppIAddress | The instance of a IAddress interface that holds the structured address parts. A NULL pointer is supplied if no address should be set. |
[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 |


  • IGeneralInvoiceResult
  • GetNextService

IGeneralInvoiceResult::GetNextService method | space
Gets the next "simple/normal" service from the list of services.

Please note, that "simple/normal" qualifies as being added by the IGeneralInvoiceRequest::AddService method

VARIANT_FALSE is returned if the end of the service list is reached.
space
Restful webservice calling syntax
[POST] | /baseURL/ IGeneralInvoiceResult/GetNextService
[JSON input data] pIGeneralInvoiceResult: longValue, //interface address
[JSON result data] pbstrTariffType:
pbstrCode:
pbstrReferenceCode:
pdQuantity:
plSessionNumber:
plGroupSize:
pdDateBegin:
pdDateEnd:
pbstrProviderGLN:
pbstrResponsibleGLN:
peSide:
pbstrServiceName:
pdUnit:
pdUnitFactor:
pdExternalFactor:
pdAmount:
pdVatRate:
pbstrRemark:
pbstrSectionCode:
plServiceAttributes:
plID:
pbStatus: 		"utf8StringValue",
"utf8StringValue",
"utf8StringValue",
doubleValue,
longValue,
longValue,
"stringISODateValue",
"stringISODateValue",
"utf8StringValue",
"utf8StringValue",
longValue,
"utf8StringValue",
doubleValue,
doubleValue,
doubleValue,
doubleValue,
doubleValue,
"utf8StringValue",
"utf8StringValue",
longValue,
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
C/C++ calling syntax
HRESULT GetNextService( BSTR
BSTR
BSTR
double
long
long
DATE
DATE
BSTR
BSTR
SideType
BSTR
double
double
double
double
double
BSTR
BSTR
long
long
VARIANT_BOOL 		*pbstrTariffType,
*pbstrCode,
*pbstrReferenceCode,
*pdQuantity,
*plSessionNumber,
*plGroupSize,
*pdDateBegin,
*pdDateEnd,
*pbstrProviderGLN,
*pbstrResponsibleGLN,
*peSide,
*pbstrServiceName,
*pdUnit,
*pdUnitFactor,
*pdExternalFactor,
*pdAmount,
*pdVatRate,
*pbstrRemark,
*pbstrSectionCode,
*plServiceAttributes,
*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
Calling argument description
[out] BSTR | *pbstrTariffType | The official tariff type as defined by Forum Datenaustausch
[out] BSTR | *pbstrCode | The service code.
[out] BSTR *pbstrReferenceCode The reference code.

The reference code might be empty since not all services request one.
[out] double *pdQuantity The floating point quantity.

Note that quantity changes the sign if a storno request is produced.
[out] long *plSessionNumber 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.
[out] long *plGroupSize lGroupSize defines the size of a participating group of a service whose quantity is calculated by the "Divisor Method".
It should be noted that the group size is declarative only with a default value equals to 1 implicitly meaning that it is NO service defined via the "Divisor Method" as the group size for such a service is always larger than 1.

Please note that in the "Divisor Method" the quantity is coded by definition as follows: quantity = effective_quantity / group_size.
[out] DATE | *pdDateBegin | The date of the service's prescription
[out] DATE *pdDateEnd The date of the last prescription of the service if and only if the service was applied over a period of time.

dDateEnd=0.0 is returned for all cases where no end date of the prescription was defined.
[out] BSTR *pbstrProviderGLN The GLN of the service provider as supplied by Stiftung Refdata

Note if bstrProviderGLN is undefined and bstrResponsibleGLN is defined then bstrResponsibleGLN is copied into the bstrProviderGLN variable. If both variables are undefined the pseudo GLN "2099999999998" is set.
[out] BSTR *pbstrResponsibleGLN The GLN of the responsible for the service as supplied by Stiftung Refdata

Note if bstrResponsibleGLN is undefined and bstrProviderGLN is defined then bstrProviderGLN is copied into the bstrResponsibleGLN variable. If both variables are undefined the pseudo EAN "2099999999998" is set.
[out] SideType | *peSide | The body side dependency of the service
[out] BSTR | *pbstrServiceName | The name of the service as defined by the used tariff
[out] double | *pdUnit | Tax points (TP) of the service.
[out] double | *pdUnitFactor | Tax point value (TPV) of the service.
[out] double *pdExternalFactor dExternalFactor is an external scaling factor in the provider's responsibility that modulates the corresponding service outside the official tariff structure.
The dExternalFactor is used for discounting or surcharging and can even take a zero value to supply a charge free service.

For tariff «005 - AmbulatoryCaseFlatrate» the tariff owner "OAAT-OTMA" will use the
dExternalFactor 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.

For tariff «010 - DRG» the external factor is used for defining the splitting situation between insurance and canton.
[out] double *pdAmount The amount in CHF of the service supplied in 2-digit precision.

Note that amount changes the sign if a storno request is produced due to the sign change of dQuantity.
[out] double | *pdVatRate | The VAT rate as real number that should be applied to this service e.g. 0.081 for a VAT rate of 8.1%.
[out] BSTR | *pbstrRemark | An optional remark for the given service
[out] BSTR *pbstrSectionCode The optional bstrSectionCode stems from a variable set defined by "OAAT-OTMA - Reglement Fachbereiche", that designates the service-providing department within a hospital or medical practice, e.g. 'M100.06' for the gastroenterology department.

The list of all departments is documented elsewhere on the "OAAT-OTMA" website, whereby the tariffs used, the law applied or special contracts stipulates the application/usage of the section code (primarily for body@role=hospital, body@role=rehab_clinic, body@role=psychiatric_clinic).
[out] long *plServiceAttributes lServiceAttributes is a 32-bit integer where each bit position defines a special information.

Defined bit positions as of November 2024
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. In a printed invoice/reminder, bit 1 is written as SA='Code207' in the comment line, case insensitive. If more than one service attribute is set, all defined mnemonics are combined as SA='BitX+BitY+BitZ'.
Bit 2: (0x000002) | franchiseFree: Franchise exemption of given service If this bit ("franchiseFree") is set, the service provider declares that the service was provided as franchise free. In a printed invoice/reminder, bit 2 is written as SA='franchiseFree' in the comment line, case insensitive. If more than one service attribute is set, all defined mnemonics are combined as SA='BitX+BitY+BitZ'.
Bit 3: (0x000004) | drugOffLabelUse: off label use of a drug in accordance with Art. 71a-c KVV If this bit ("drugOffLabelUse") is set, the service provider declares that the off-label prescription of the drug has been approved by the healthcare insurance by means of a prior accepted credit request. In a printed invoice/reminder, bit 3 is written as SA='drugOffLabelUse' in the comment line, case insensitive. If more than one service attribute is set, all defined mnemonics are combined as SA='BitX+BitY+BitZ'.
Bit 4: (0x000008) | withoutDoctorsOrder: Services without a doctor's order (Art. 59 KVV, Abs. 3bis) If this bit ("withoutDoctorsOrder") is set, the service provider declares that the service was provided without a doctor's order. In a printed invoice/reminder, bit 4 is written as SA='withoutDoctorsOrder' in the comment line, case insensitive. If more than one service attribute is set, all defined mnemonics are combined as SA='BitX+BitY+BitZ'.
Bit 5: (0x000010) | noObligation: the applied service is not an obligatory insurance benefit under the given Law (or Contract) If this bit ("noObligation") is set, the service provider declares that the service provided is not an obligatory insurance benefit under the given law (or contract). In a printed invoice/reminder, bit 5 is written as SA='noObligation' in the comment line, case insensitive. If more than one service attribute is set, all defined mnemonics are combined as SA='BitX+BitY+BitZ'.
[out] long *plID This is the returned internal ID of the service record.

This internal ID is used to append extraService, extraDrug and/or xtraDRG information for the focused service with the SetXtraService, SetXtraDrug or SetXtraDRG methods, respectively.
[out,retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE the end of data is reached
space


  • IGeneralInvoiceResult
  • GetNextServiceEx

IGeneralInvoiceResult::GetNextServiceEx method | space
Gets the next "extended" service from the list of services.

Please note, that "extended" qualifies as being added by the IGeneralInvoiceRequest::AddServiceEx method.

VARIANT_FALSE is returned if the end of the service list is reached.
space
Restful webservice calling syntax
[POST] | /baseURL/ IGeneralInvoiceResult/GetNextServiceEx
[JSON input data] pIGeneralInvoiceResult: longValue, //interface address
[JSON result data] pbstrTariffType:
pbstrCode:
pbstrReferenceCode:
pdQuantity:
plSessionNumber:
plGroupSize:
pdDateBegin:
pdDateEnd:
pbstrProviderGLN:
pbstrResponsibleGLN:
peSide:
pbstrServiceName:
pdUnitMT:
pdUnitFactorMT:
pdUnitInternalScalingFactorMT:
pdUnitExternalScalingFactorMT:
pdAmountMT:
pdUnitTT:
pdUnitFactorTT:
pdUnitInternalScalingFactorTT:
pdUnitExternalScalingFactorTT:
pdAmountTT:
pdAmount:
pdVatRate:
pbstrRemark:
pbstrSectionCode:
plServiceAttributes:
peTreatmentType:
peBillingRole:
peMedicalRole:
plID:
pbStatus: 		"utf8StringValue",
"utf8StringValue",
"utf8StringValue",
doubleValue,
longValue,
longValue,
"stringISODateValue",
"stringISODateValue",
"utf8StringValue",
"utf8StringValue",
longValue,
"utf8StringValue",
doubleValue,
doubleValue,
doubleValue,
doubleValue,
doubleValue,
doubleValue,
doubleValue,
doubleValue,
doubleValue,
doubleValue,
doubleValue,
doubleValue,
"utf8StringValue",
"utf8StringValue",
longValue,
longValue,
longValue,
longValue,
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
C/C++ calling syntax
HRESULT GetNextServiceEx( BSTR
BSTR
BSTR
double
long
long
DATE
DATE
BSTR
BSTR
SideType
BSTR
double
double
double
double
double
double
double
double
double
double
double
double
BSTR
BSTR
long
TreatmentType
BillingRoleType
MedicalRoleType
long
VARIANT_BOOL 		*pbstrTariffType,
*pbstrCode,
*pbstrReferenceCode,
*pdQuantity,
*plSessionNumber,
*plGroupSize,
*pdDateBegin,
*pdDateEnd,
*pbstrProviderGLN,
*pbstrResponsibleGLN,
*peSide,
*pbstrServiceName,
*pdUnitMT,
*pdUnitFactorMT,
*pdUnitInternalScalingFactorMT,
*pdUnitExternalScalingFactorMT,
*pdAmountMT,
*pdUnitTT,
*pdUnitFactorTT,
*pdUnitInternalScalingFactorTT,
*pdUnitExternalScalingFactorTT,
*pdAmountTT,
*pdAmount,
*pdVatRate,
*pbstrRemark,
*pbstrSectionCode,
*plServiceAttributes,
*peTreatmentType,
*peBillingRole,
*peMedicalRole,
*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
Calling argument description
[out] BSTR | *pbstrTariffType | The official tariff type as defined by Forum Datenaustausch
[out] BSTR | *pbstrCode | The service code.
[out] BSTR *pbstrReferenceCode The reference code.

The reference code might be empty since not all services request one.
[out] double *pdQuantity The floating point quantity.

Note that quantity changes the sign if a storno request is produced.
[out] long *plSessionNumber 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.
[out] long | *plGroupSize | 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!
[out] DATE | *pdDateBegin | The date of the service's prescription
[out] DATE *pdDateEnd The date of the last prescription of the service if and only if the service was applied over a period of time.

dDateEnd=0.0 is returned for all cases where no end date of the prescription was defined.
[out] BSTR *pbstrProviderGLN The GLN of the service provider as supplied by Stiftung Refdata

Note if bstrProviderGLN is undefined and bstrResponsibleGLN is defined then bstrResponsibleGLN is copied into the bstrProviderGLN variable. If both variables are undefined the pseudo GLN "2099999999998" is set.
[out] BSTR *pbstrResponsibleGLN The GLN of the responsible for the service as supplied by Stiftung Refdata

Note if bstrResponsibleGLN is undefined and bstrProviderGLN is defined then bstrProviderGLN is copied into the bstrResponsibleGLN variable. If both variables are undefined the pseudo EAN "2099999999998" is set.
[out] SideType | *peSide | The body side dependency of the service
[out] BSTR | *pbstrServiceName | The name of the service as defined by the used tariff
[out] double | *pdUnitMT | Tax points of the medical part (TP_MT) of the service.
[out] double | *pdUnitFactorMT | Tax point value of the medical part (TPV_MT) of the service.
[out] double *pdUnitInternalScalingFactorMT The internal scaling factor of the medical part of the service.

This is a modulation factor to represent percent services and is mostly 1.
[out] double *pdUnitExternalScalingFactorMT 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.
[out] double *pdAmountMT 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.
[out] double | *pdUnitTT | Tax points of the technical part (TP_TT) of the service.
[out] double | *pdUnitFactorTT | Tax point value of the technical part (TPV_TT) of the service.
[out] double *pdUnitInternalScalingFactorTT The internal scaling factor of the technical part of the service.

This is a modulation factor to represent percent services and is mostly 1.
[out] double *pdUnitExternalScalingFactorTT 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.
[out] double *pdAmountTT 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.
[out] double *pdAmount The amount in CHF of 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.
[out] double | *pdVatRate | The VAT rate as real number that was applied to this service.
[out] BSTR | *pbstrRemark | An optional remark for the given service
[out] BSTR *pbstrSectionCode The optional bstrSectionCode stems from a variable set defined by "OAAT-OTMA - Reglement Fachbereiche", that designates the service-providing department within a hospital or medical practice, e.g. 'M100.06' for the gastroenterology department.

The list of all departments is documented elsewhere on the "OAAT-OTMA" website, whereby the tariffs used, the law applied or special contracts stipulates the application/usage of the section code (primarily for body@role=hospital, body@role=rehab_clinic, body@role=psychiatric_clinic).
[out] long *plServiceAttributes 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] TreatmentType | *peTreatmentType | The type of treatment (ambulatory or stationary) defined by the IServiceExInput::SetTreatment method.
[out] BillingRoleType | *peBillingRole | The ServiceExInput-relevant billing role applied for this service defined by the IServiceExInput::SetPhysician method.
[out] MedicalRoleType | *peMedicalRole | The ServiceExInput-relevant medical role applied for this service defined by the IServiceExInput::SetPhysician method.
[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 the end of data is reached
space


  • IGeneralInvoiceResult
  • GetNextVat

IGeneralInvoiceResult::GetNextVat method |  |  | space
Gets the next vat information. VARIANT_FALSE is returned if the end of the VAT list is reached. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceResult/GetNextVat
[JSON input data] | pIGeneralInvoiceResult: | longValue, //interface address
[JSON result data] | pdVat: pdVatRate: pbStatus: | doubleValue, doubleValue, 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
C/C++ calling syntax |  |  |
HRESULT GetNextVat( | double double VARIANT_BOOL | *pdVat, *pdVatRate, *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
Calling argument description |  |  |
[out] double | *pdVat | The total VAT amount for the given VAT rate supplied in 2-digit precision. |
[out] double | *pdVatRate | The VAT rate given as a real number. |
[out,retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE the end of data is reached |
space |


  • IGeneralInvoiceResult
  • GetNextXtraService

IGeneralInvoiceResult::GetNextXtraService method | space
Gets the next token=value pair from the list of token=value pairs for a supplied service ID.

VARIANT_FALSE is returned if the end of the section/location list is reached.
space
Restful webservice calling syntax
[POST] | /baseURL/ IGeneralInvoiceResult/GetNextXtraService
[JSON input data] pIGeneralInvoiceResult: longValue, //interface address
[JSON result data] pbstrToken:
pbstrValue:
pbStatus: 		"utf8StringValue",
"utf8StringValue",
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
C/C++ calling syntax
HRESULT GetNextXtraService( BSTR
BSTR
VARIANT_BOOL 		*pbstrToken,
*pbstrValue,
*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
Calling argument description
[out] BSTR *pbstrToken The well defined token of the token=value pair.

Forum Datenaustausch has defined the following tokens as of November 2024
Token | Meaning
ICD10 | The expression ICD10='icd10_diagnosis_code' (e.g. ICD10='A32.1') allows to define/set an ICD10 diagnosis code applicable to a specific service record for instance for an Ambulatory Case Flaterate (ACF) service record.
TI | The expression TI='ticino_diagnosis_code' (e.g. TI='E7') allows to define/set an Ticino diagnosis code applicable to a specific service record for instance for an Ambulatory Case Flaterate (ACF) service record.
Capitulum | The expression Capitulum='capitulum_chapter' (e.g. Capitulum='Cap01') allows to define/set a specific capitulum of an Ambulatory Case Flaterate (ACF) service record.
SLIndication | The expression SLIndication='sl_indication_code' (e.g. SLIndication='21316.01') allows to define/set a specific SL indication code for a drug record of tariff type 402.
[out] BSTR | *pbstrValue | The value of the token=value pair
[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


  • IGeneralInvoiceResult
  • GetPackage

IGeneralInvoiceResult::GetPackage method |  |  | space
Retrieves the identification parameters of the main software. Since the package information is optionally VARIANT_FALSE is returned if the sender's main software is undefined. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceResult/GetPackage
[JSON input data] | pIGeneralInvoiceResult: | longValue, //interface address
[JSON result data] | pbstrSoftwarePackage: plSoftwareVersion: plSoftwareID: pbstrSoftwareCopyright: pbStatus: | "utf8StringValue", longValue, longValue, "utf8StringValue", 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
C/C++ calling syntax |  |  |
HRESULT GetPackage( | BSTR long long BSTR VARIANT_BOOL | *pbstrSoftwarePackage, *plSoftwareVersion, *plSoftwareID, *pbstrSoftwareCopyright, *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
Calling argument description |  |  |
[out] BSTR | *pbstrSoftwarePackage | Name of the main software. |
[out] long | *plSoftwareVersion | Version of the main software coded as 32-bit value where lSoftwareVersion = 100*Major version + Minor version. |
[out] long | *plSoftwareID | Optional ID of the main software |
[out] BSTR | *pbstrSoftwareCopyright | The copyright notice of the main software. |
[out,retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE then no package data is available |
space |


  • IGeneralInvoiceResult
  • GetPartners

IGeneralInvoiceResult::GetPartners method |  |  | space
This method has a Restful Webservice representation only! Method for collecting all partner addresses covered by the IGeneralInvoiceResult interface and returned as JSON array. Please note that IGeneralInvoiceResult::GetPartners takes over the functionality of the iterator pair IGeneralInvoiceResult::GetFirstPartner / IGeneralInvoiceResult::GetNextPartner with a single call, making the latter superfluous. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceResult/GetPartners
[JSON input data] | pIGeneralInvoiceResult: | longValue, //interface address
[JSON result array] | { pePartnerType: pbstrOtherPartnerType: pbstrGLN: pbstrZSR: ppIAddress: pbStatus: | longValue, "utf8StringValue", "utf8StringValue", "utf8StringValue", { pbIsPrivateAddress: true, pbstrCompanyName: "utf8StringValue", pbstrDepartment: "utf8StringValue", pbstrSalutation: "utf8StringValue", pbstrTitle: "utf8StringValue", pbstrFamilyname: "utf8StringValue", pbstrGivenname: "utf8StringValue", pbstrSubaddressing: "utf8StringValue", pbstrStreet: "utf8StringValue", pbstrPoBox: "utf8StringValue", pbstrZip: "utf8StringValue", pbstrCity: "utf8StringValue", pbstrStateCode: "utf8StringValue", pbstrCountryCode: "utf8StringValue", pbstrPhone1: "utf8StringValue", pbstrPhone2: "utf8StringValue", pbstrPhone3: "utf8StringValue", pbstrFax: "utf8StringValue", pbstrEMail: "utf8StringValue", pbstrUrl: "utf8StringValue" }, 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
Calling argument description |  |  |
[out] PartnerType | *pePartnerType | The type of BfS record for which the number=name pair is supplied. |
[out] BSTR | *pbstrOtherPartnerType | The optional type description of the partner if ePartnerType=enOther is set. |
[out] BSTR | *pbstrGLN | The GLN of the partner as supplied by Stiftung Refdata |
[out] BSTR | *pbstrZSR | The optional ZSR number of the partner as supplied by Santesuisse |
[out] IAddress | **ppIAddress | The instance of a IAddress interface that holds the structured address parts. A NULL pointer is supplied if no address should be set. |
[out,retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE the end of data is reached |
space |


  • IGeneralInvoiceResult
  • GetPatient

IGeneralInvoiceResult::GetPatient method | space
Retrieves the patient's primary parameters (sex, birthdate, SSN) as well as the structured address.

The structured address data is read via the methods of the returned IAddress interface instance.
space
Restful webservice calling syntax
[POST] | /baseURL/ IGeneralInvoiceResult/GetPatient
[JSON input data] pIGeneralInvoiceResult: longValue, //interface address
[JSON result data] peSexType:
peGenderType:
pdBirthdate:
pbstrSSN:
ppIAddress:

pbStatus: 		longValue,
longValue,
"stringISODateValue",
"utf8StringValue",
{
pbIsPrivateAddress: true,
pbstrCompanyName: "utf8StringValue",
pbstrDepartment: "utf8StringValue",
pbstrSalutation: "utf8StringValue",
pbstrTitle: "utf8StringValue",
pbstrFamilyname: "utf8StringValue",
pbstrGivenname: "utf8StringValue",
pbstrSubaddressing: "utf8StringValue",
pbstrStreet: "utf8StringValue",
pbstrPoBox: "utf8StringValue",
pbstrZip: "utf8StringValue",
pbstrCity: "utf8StringValue",
pbstrStateCode: "utf8StringValue",
pbstrCountryCode: "utf8StringValue",
pbstrPhone1: "utf8StringValue",
pbstrPhone2: "utf8StringValue",
pbstrPhone3: "utf8StringValue",
pbstrFax: "utf8StringValue",
pbstrEMail: "utf8StringValue",
pbstrUrl: "utf8StringValue"
},
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
C/C++ calling syntax
HRESULT GetPatient( SexType
GenderType
DATE
BSTR
IAddress
VARIANT_BOOL 		*peSexType,
*peGenderType,
*pdBirthdate,
*pbstrSSN,
**ppIAddress,
*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
Calling argument description
[out] SexType | *peSexType | The patient's medical sex (pre-dominantly induced by the actual hormonal balance of the body) encoded by a terminal set of tokens.
[out] GenderType | *peGenderType | The patient's social gender encoded by a terminal set of tokens
[out] DATE | *pdBirthdate | The patient's birthdate.
[out] BSTR *pbstrSSN The patient's social security number (SSN) in its printed form whereupon 3 distinguished types are possible:
  • the new 13 digit Swiss SSN ("SV-Nummer") beginning with 756 as defined by Federal Social Insurance Office
  • the new 4-10 digit SSN of Liechtenstein ("AHV-Nummer") as defined by Liechtensteinische AHV-IV-FAK
  • the 13 digit IDNR number of Liechtenstein ("IDNR-Nummer") beginning with 438
[out] IAddress **ppIAddress The IAddress interface handle that allows to get the structured address data back.
If no address is defined then the handle is NULL.
[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


  • IGeneralInvoiceResult
  • GetProcessing

IGeneralInvoiceResult::GetProcessing method | space
Retrieves the defined processing information that are in effect at the site of the last intermediate.
space
Restful webservice calling syntax
[POST] | /baseURL/ IGeneralInvoiceResult/GetProcessing
[JSON input data] pIGeneralInvoiceResult: longValue, //interface address
[JSON result data] pePrintPatientInvoiceOnly:
pePrintCopyToGuarantor:
pbstrTrustCenterGLN:
pbStatus: 		longValue,
longValue,
"utf8StringValue",
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
C/C++ calling syntax
HRESULT GetProcessing( YesNoType
YesNoType
BSTR
VARIANT_BOOL 		*pePrintPatientInvoiceOnly,
*pePrintCopyToGuarantor,
*pbstrTrustCenterGLN,
*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
Calling argument description
[out] YesNoType *pePrintPatientInvoiceOnly The Boolean ePrintPatientInvoiceOnly is an instruction for the last intermediate wheter to print out the patient summary form only without any additional accompanying "Rückerstattungsbeleg" or "TP-Rechnung" or "Barcode Annex form".

The Boolean is primarily relevant in a genuine invoicing process of a Tiers Garant case in which the remaining amount (Tiers Soldant deductible or modified/unpaid Tiers Payant services) is claimed directly from the patient/guarantor. Since the insurance company already has the original TS or TP document, no further document addressed to the insurance company needs to be printed out and sent to the patient!
[out] YesNoType | *pePrintCopyToGuarantor | The Boolean ePrintCopyToGuarantor is an instruction for the last intermediate in a Tiers Payant case wheter a printed copy of the invoiceshould be sent to the guarantor's address, basically to fulfill the legal requirement of a "patient copy".
[out] BSTR *pbstrTrustCenterGLN bstrTrustCenterGLN instructs the last intermediate to send a copy of the XML infoset to the defined trust center defined by the GLN.

It should be noted that
  • this process is to be considered as 2nd process. Therefore, it is carried out with the best effort and without the possibility of error propagation to the sender. Under all circumstances, the processing of the 1st process (the delivery to transport@from) must not be affected by a potentially occurring error in the 2nd process!
[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


  • IGeneralInvoiceResult
  • GetProviderGLN

IGeneralInvoiceResult::GetProviderGLN method |  |  | space
Gets the provider's structured address as well as ist mandatory GLN. Please note that the provider's GLN address does not include a ZSR. Furthermore, the structured address is defined via a IAddress interface instance and the address data must be defined prior to call this method. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceResult/GetProviderGLN
[JSON input data] | pIGeneralInvoiceResult: | longValue, //interface address
[JSON result data] | pbstrGLN: pbstrGLNLocation: ppIAddress: pbStatus: | "utf8StringValue", "utf8StringValue", { pbIsPrivateAddress: true, pbstrCompanyName: "utf8StringValue", pbstrDepartment: "utf8StringValue", pbstrSalutation: "utf8StringValue", pbstrTitle: "utf8StringValue", pbstrFamilyname: "utf8StringValue", pbstrGivenname: "utf8StringValue", pbstrSubaddressing: "utf8StringValue", pbstrStreet: "utf8StringValue", pbstrPoBox: "utf8StringValue", pbstrZip: "utf8StringValue", pbstrCity: "utf8StringValue", pbstrStateCode: "utf8StringValue", pbstrCountryCode: "utf8StringValue", pbstrPhone1: "utf8StringValue", pbstrPhone2: "utf8StringValue", pbstrPhone3: "utf8StringValue", pbstrFax: "utf8StringValue", pbstrEMail: "utf8StringValue", pbstrUrl: "utf8StringValue" }, 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
C/C++ calling syntax |  |  |
HRESULT GetProviderGLN( | BSTR BSTR IAddress VARIANT_BOOL | *pbstrGLN, *pbstrGLNLocation, **ppIAddress, *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
Calling argument description |  |  |
[out] BSTR | *pbstrGLN | The GLN of the provider as supplied by Stiftung Refdata |
[out] BSTR | *pbstrGLNLocation | The bstrGLNLocation codes the provider's workplace by a required GLN as defined by RefData If there is no such specific workplace defined then the bstrGLN is used as ist GLN location, basically defining the default workplace/location. |
[out] IAddress | **ppIAddress | The instance of a IAddress interface that allows to read back the structured address data. If no address is defined then the handle is NULL. |
[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 |


  • IGeneralInvoiceResult
  • GetProviderZSR

IGeneralInvoiceResult::GetProviderZSR method |  |  | space
Sets the provider's structured address as well as its mandatory ZSR. Please note that the provider's ZSR address does not include a GLN. Furthermore, the structured address is defined via a IAddress interface instance and the address data must be defined prior to call this method. Note that the providers's ZSR address is optional in terms of the XSD schema definition. However, it may be the case that the underlying tariff contracts, applied law and/or special contracts between service providers and insurances change the optionality into a mandatory data specification. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceResult/GetProviderZSR
[JSON input data] | pIGeneralInvoiceResult: | longValue, //interface address
[JSON result data] | pbstrZSR: ppIAddress: pbStatus: | "utf8StringValue", { pbIsPrivateAddress: true, pbstrCompanyName: "utf8StringValue", pbstrDepartment: "utf8StringValue", pbstrSalutation: "utf8StringValue", pbstrTitle: "utf8StringValue", pbstrFamilyname: "utf8StringValue", pbstrGivenname: "utf8StringValue", pbstrSubaddressing: "utf8StringValue", pbstrStreet: "utf8StringValue", pbstrPoBox: "utf8StringValue", pbstrZip: "utf8StringValue", pbstrCity: "utf8StringValue", pbstrStateCode: "utf8StringValue", pbstrCountryCode: "utf8StringValue", pbstrPhone1: "utf8StringValue", pbstrPhone2: "utf8StringValue", pbstrPhone3: "utf8StringValue", pbstrFax: "utf8StringValue", pbstrEMail: "utf8StringValue", pbstrUrl: "utf8StringValue" }, 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
C/C++ calling syntax |  |  |
HRESULT GetProviderZSR( | BSTR IAddress VARIANT_BOOL | *pbstrZSR, **ppIAddress, *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
Calling argument description |  |  |
[out] BSTR | *pbstrZSR | The mandatory ZSR number of the provider as supplied by Santesuisse |
[out] IAddress | **ppIAddress | The instance of a IAddress interface that allows to read back the structured address data. If no address is defined then the handle is NULL. |
[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 |


  • IGeneralInvoiceResult
  • GetReminder

IGeneralInvoiceResult::GetReminder method |  |  | space
Retrieves the reminder object reference parameters. The credit, invoice and reminder object references (if supplied in the request) form a object reference chain (credit -> invoice -> reminder) with the reminder as topmost object reference if supplied in the request otherwise the invoice is the topmost object reference (the invoice object is mandatory in all cases!). The page "object reference" provides an in-depth description of the concepts of "object reference", "object reference chain", and "topmost object reference". |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceResult/GetReminder
[JSON input data] | pIGeneralInvoiceResult: | longValue, //interface address
[JSON result data] | pbstrRequestReminderID: pdRequestReminderDate: plRequestReminderTimestamp: plReminderLevel: pbstrReminderText: pdAmountReminder: pbStatus: | "utf8StringValue", "stringISODateValue", longValue, longValue, "utf8StringValue", doubleValue, 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
C/C++ calling syntax |  |  |
HRESULT GetReminder( | BSTR DATE long long BSTR double VARIANT_BOOL | *pbstrRequestReminderID, *pdRequestReminderDate, *plRequestReminderTimestamp, *plReminderLevel, *pbstrReminderText, *pdAmountReminder, *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
Calling argument description |  |  |
[out] BSTR | *pbstrRequestReminderID | The request ID is the main software's identification of the reminder ("Mahnnummer"). This is one of 3 identifiers that form the reminder object reference. |
[out] DATE | *pdRequestReminderDate | The request date is the main software's date of the reminder request ("Mahndatum"). This is one of 3 identifiers that form the reminder object reference. |
[out] long | *plRequestReminderTimestamp | This is a UNIX timestamp defined at the moment of the reminder's infoset generation. This is one of 3 identifiers that form the reminder object reference. |
[out] long | *plReminderLevel | The lReminderLevel is the main software's reminder level ("Mahnstufe") which must be between 1 and 3. |
[out] BSTR | *pbstrReminderText | A reminder text that is either in plain text format or RTF format. Note that the reminder text is printed instead of the remark if bstrReminderText is set in the IGeneralInvoiceRequest::SetReminder method. |
[out] double | *pdAmountReminder | The optional reminder charge. |
[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 |


  • IGeneralInvoiceResult
  • GetRequest

IGeneralInvoiceResult::GetRequest method |  |  | space
Returns the primary parameters of the request, namely the language the data is supplied, the "storno" and "copy" status besides an optional remark. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceResult/GetRequest
[JSON input data] | pIGeneralInvoiceResult: | longValue, //interface address
[JSON result data] | peDataLanguage: peRoleType: pePlaceType: pbstrRoleTitle: peRequestType: peRequestSubtype: pbstrRemark: pbstrGUID: pbStatus: | longValue, longValue, longValue, "utf8StringValue", longValue, longValue, "utf8StringValue", "utf8StringValue", 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
C/C++ calling syntax |  |  |
HRESULT GetRequest( | LanguageType RoleType PlaceType BSTR RequestType RequestSubtype BSTR BSTR VARIANT_BOOL | *peDataLanguage, *peRoleType, *pePlaceType, *pbstrRoleTitle, *peRequestType, *peRequestSubtype, *pbstrRemark, *pbstrGUID, *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
Calling argument description |  |  |
[out] LanguageType | *peDataLanguage | Gets the language in which the data part is coded. It is exactly the language in which the request is formulated. Note, that the data language and the module language (given by IGeneralInvoiceRequestManager::SetModuleLanguage) are independent and can be different! |
[out] RoleType | *peRoleType | Defines the role categories that the main provider is best categorized. If the main provider has an other role than defined then use enRoleOther and additionally supply a role title with a description of the role |
[out] PlaceType | *pePlaceType | Defines the principle place where the main provider is applying the treatment |
[out] BSTR | *pbstrRoleTitle | Optional role title/description of the main provider. If a suitable predefined role can not be set then bstrRoleTitle is mandatory (use enRoleOther as role in that case) |
[out] RequestType | *peRequestType | Gets the principle type of request encoded by a terminal set of tokens. |
[out] RequestSubtype | *peRequestSubtype | Gets the allowed subtype of request encoded by a terminal set of tokens. |
[out] BSTR | *pbstrRemark | An overall optional remark for the invoice/reminder Note that the reminder text is printed instead of the remark if bstrReminderText is set in the IGeneralInvoiceRequest::SetReminder method. |
[out] BSTR | *pbstrGUID | Gets the unique GUID (Globally Unique IDentifier) allocated to the current XML infoset defined as a 32 hex-digit string covered by the pattern [A-Fa-f0-9]{32}. |
[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 |


  • IGeneralInvoiceResult
  • GetServices

IGeneralInvoiceResult::GetServices method | space
This method has a Restful Webservice representation only!
Method for collecting all simple service records covered by the IGeneralInvoiceResult interface and returned as JSON array.

Please note that IGeneralInvoiceResult::GetServices takes over the functionality of the iterator pair IGeneralInvoiceResult::GetFirstService / IGeneralInvoiceResult::GetNextService with a single call, making the latter superfluous.
space
Restful webservice calling syntax
[POST] | /baseURL/ IGeneralInvoiceResult/GetServices
[JSON input data] pIGeneralInvoiceResult: longValue, //interface address
[JSON result array] { pbstrTariffType:
pbstrCode:
pbstrReferenceCode:
pdQuantity:
plSessionNumber:
plGroupSize:
pdDateBegin:
pdDateEnd:
pbstrProviderGLN:
pbstrResponsibleGLN:
peSide:
pbstrServiceName:
pdUnit:
pdUnitFactor:
pdExternalFactor:
pdAmount:
pdVatRate:
pbstrRemark:
pbstrSectionCode:
plServiceAttributes:
plID:
pbStatus: 		"utf8StringValue",
"utf8StringValue",
"utf8StringValue",
doubleValue,
longValue,
longValue,
"stringISODateValue",
"stringISODateValue",
"utf8StringValue",
"utf8StringValue",
longValue,
"utf8StringValue",
doubleValue,
doubleValue,
doubleValue,
doubleValue,
doubleValue,
"utf8StringValue",
"utf8StringValue",
longValue,
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
Calling argument description
[out] BSTR | *pbstrTariffType | The official tariff type as defined by Forum Datenaustausch
[out] BSTR | *pbstrCode | The service code.
[out] BSTR *pbstrReferenceCode The reference code.

The reference code might be empty since not all services request one.
[out] double *pdQuantity The floating point quantity.

Note that quantity changes the sign if a storno request is produced.
[out] long *plSessionNumber 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.
[out] long *plGroupSize lGroupSize defines the size of a participating group of a service whose quantity is calculated by the "Divisor Method".
It should be noted that the group size is declarative only with a default value equals to 1 implicitly meaning that it is NO service defined via the "Divisor Method" as the group size for such a service is always larger than 1.

Please note that in the "Divisor Method" the quantity is coded by definition as follows: quantity = effective_quantity / group_size.
[out] DATE | *pdDateBegin | The date of the service's prescription
[out] DATE *pdDateEnd The date of the last prescription of the service if and only if the service was applied over a period of time.

dDateEnd=0.0 is returned for all cases where no end date of the prescription was defined.
[out] BSTR *pbstrProviderGLN The GLN of the service provider as supplied by Stiftung Refdata

Note if bstrProviderGLN is undefined and bstrResponsibleGLN is defined then bstrResponsibleGLN is copied into the bstrProviderGLN variable. If both variables are undefined the pseudo GLN "2099999999998" is set.
[out] BSTR *pbstrResponsibleGLN The GLN of the responsible for the service as supplied by Stiftung Refdata

Note if bstrResponsibleGLN is undefined and bstrProviderGLN is defined then bstrProviderGLN is copied into the bstrResponsibleGLN variable. If both variables are undefined the pseudo EAN "2099999999998" is set.
[out] SideType | *peSide | The body side dependency of the service
[out] BSTR | *pbstrServiceName | The name of the service as defined by the used tariff
[out] double | *pdUnit | Tax points (TP) of the service.
[out] double | *pdUnitFactor | Tax point value (TPV) of the service.
[out] double *pdExternalFactor dExternalFactor is an external scaling factor in the provider's responsibility that modulates the corresponding service outside the official tariff structure.
The dExternalFactor is used for discounting or surcharging and can even take a zero value to supply a charge free service.

For tariff «005 - AmbulatoryCaseFlatrate» the tariff owner "OAAT-OTMA" will use the
dExternalFactor 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.

For tariff «010 - DRG» the external factor is used for defining the splitting situation between insurance and canton.
[out] double *pdAmount The amount in CHF of the service supplied in 2-digit precision.

Note that amount changes the sign if a storno request is produced due to the sign change of dQuantity.
[out] double | *pdVatRate | The VAT rate as real number that was applied to this service.
[out] BSTR | *pbstrRemark | An optional remark for the given service
[out] BSTR *pbstrSectionCode The optional bstrSectionCode stems from a variable set defined by "OAAT-OTMA - Reglement Fachbereiche", that designates the service-providing department within a hospital or medical practice, e.g. 'M100.06' for the gastroenterology department.

The list of all departments is documented elsewhere on the "OAAT-OTMA" website, whereby the tariffs used, the law applied or special contracts stipulates the application/usage of the section code (primarily for body@role=hospital, body@role=rehab_clinic, body@role=psychiatric_clinic).
[out] long *plServiceAttributes lServiceAttributes is a 32-bit integer where each bit position defines a special information.

Defined bit positions as of November 2024
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. In a printed invoice/reminder, bit 1 is written as SA='Code207' in the comment line, case insensitive. If more than one service attribute is set, all defined mnemonics are combined as SA='BitX+BitY+BitZ'.
Bit 2: (0x000002) | franchiseFree: Franchise exemption of given service If this bit ("franchiseFree") is set, the service provider declares that the service was provided as franchise free. In a printed invoice/reminder, bit 2 is written as SA='franchiseFree' in the comment line, case insensitive. If more than one service attribute is set, all defined mnemonics are combined as SA='BitX+BitY+BitZ'.
Bit 3: (0x000004) | drugOffLabelUse: off label use of a drug in accordance with Art. 71a-c KVV If this bit ("drugOffLabelUse") is set, the service provider declares that the off-label prescription of the drug has been approved by the healthcare insurance by means of a prior accepted credit request. In a printed invoice/reminder, bit 3 is written as SA='drugOffLabelUse' in the comment line, case insensitive. If more than one service attribute is set, all defined mnemonics are combined as SA='BitX+BitY+BitZ'.
Bit 4: (0x000008) | withoutDoctorsOrder: Services without a doctor's order (Art. 59 KVV, Abs. 3bis) If this bit ("withoutDoctorsOrder") is set, the service provider declares that the service was provided without a doctor's order. In a printed invoice/reminder, bit 4 is written as SA='withoutDoctorsOrder' in the comment line, case insensitive. If more than one service attribute is set, all defined mnemonics are combined as SA='BitX+BitY+BitZ'.
Bit 5: (0x000010) | noObligation: the applied service is not an obligatory insurance benefit under the given Law (or Contract) If this bit ("noObligation") is set, the service provider declares that the service provided is not an obligatory insurance benefit under the given law (or contract). In a printed invoice/reminder, bit 5 is written as SA='noObligation' in the comment line, case insensitive. If more than one service attribute is set, all defined mnemonics are combined as SA='BitX+BitY+BitZ'.
[out] long *plID This is the returned internal ID of the service record.

This internal ID is used to append extraService, extraDrug and/or xtraDRG information for the focused service with the SetXtraService, SetXtraDrug or SetXtraDRG methods, respectively.
[out,retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE the end of data is reached
space


  • IGeneralInvoiceResult
  • GetServicesEx

IGeneralInvoiceResult::GetServicesEx method | space
This method has a Restful Webservice representation only!
Method for collecting all extended service records covered by the IGeneralInvoiceResult interface and returned as JSON array.

Please note that IGeneralInvoiceResult::GetServicesEx takes over the functionality of the iterator pair IGeneralInvoiceResult::GetFirstServiceEx / IGeneralInvoiceResult::GetNextServiceEx with a single call, making the latter superfluous.
space
Restful webservice calling syntax
[POST] | /baseURL/ IGeneralInvoiceResult/GetServicesEx
[JSON input data] pIGeneralInvoiceResult: longValue, //interface address
[JSON result array] { pbstrTariffType:
pbstrCode:
pbstrReferenceCode:
pdQuantity:
plSessionNumber:
plGroupSize:
pdDateBegin:
pdDateEnd:
pbstrProviderGLN:
pbstrResponsibleGLN:
peSide:
pbstrServiceName:
pdUnitMT:
pdUnitFactorMT:
pdUnitInternalScalingFactorMT:
pdExternalFactorMT:
pdAmountMT:
pdUnitTT:
pdUnitFactorTT:
pdUnitInternalScalingFactorTT:
pdExternalFactorTT:
pdAmountTT:
pdAmount:
pdVatRate:
pbstrRemark:
pbstrSectionCode:
plServiceAttributes:
peTreatmentType:
peBillingRole:
peMedicalRole:
plID:
pbStatus: 		"utf8StringValue",
"utf8StringValue",
"utf8StringValue",
doubleValue,
longValue,
longValue,
"stringISODateValue",
"stringISODateValue",
"utf8StringValue",
"utf8StringValue",
longValue,
"utf8StringValue",
doubleValue,
doubleValue,
doubleValue,
doubleValue,
doubleValue,
doubleValue,
doubleValue,
doubleValue,
doubleValue,
doubleValue,
doubleValue,
doubleValue,
"utf8StringValue",
"utf8StringValue",
longValue,
longValue,
longValue,
longValue,
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
Calling argument description
[out] BSTR | *pbstrTariffType | The official tariff type as defined by Forum Datenaustausch
[out] BSTR | *pbstrCode | The service code.
[out] BSTR *pbstrReferenceCode The reference code.

The reference code might be empty since not all services request one.
[out] double *pdQuantity The floating point quantity.

Note that quantity changes the sign if a storno request is produced.
[out] long *plSessionNumber 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.
[out] long | *plGroupSize | 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!
[out] DATE | *pdDateBegin | The date of the service's prescription
[out] DATE *pdDateEnd The date of the last prescription of the service if and only if the service was applied over a period of time.

dDateEnd=0.0 is returned for all cases where no end date of the prescription was defined.
[out] BSTR *pbstrProviderGLN The GLN of the service provider as supplied by Stiftung Refdata

Note if bstrProviderGLN is undefined and bstrResponsibleGLN is defined then bstrResponsibleGLN is copied into the bstrProviderGLN variable. If both variables are undefined the pseudo GLN "2099999999998" is set.
[out] BSTR *pbstrResponsibleGLN The GLN of the responsible for the service as supplied by Stiftung Refdata

Note if bstrResponsibleGLN is undefined and bstrProviderGLN is defined then bstrProviderGLN is copied into the bstrResponsibleGLN variable. If both variables are undefined the pseudo EAN "2099999999998" is set.
[out] SideType | *peSide | The body side dependency of the service
[out] BSTR | *pbstrServiceName | The name of the service as defined by the used tariff
[out] double | *pdUnitMT | Tax points of the medical part (TP_MT) of the service.
[out] double | *pdUnitFactorMT | Tax point value of the medical part (TPV_MT) of the service.
[out] double *pdUnitInternalScalingFactorMT The internal scaling factor of the medical part of the service.

This is a modulation factor to represent percent services and is mostly 1.
[out] double *pdExternalFactorMT 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.
[out] double *pdAmountMT 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.
[out] double | *pdUnitTT | Tax points of the technical part (TP_TT) of the service.
[out] double | *pdUnitFactorTT | Tax point value of the technical part (TPV_TT) of the service.
[out] double *pdUnitInternalScalingFactorTT The internal scaling factor of the technical part of the service.

This is a modulation factor to represent percent services and is mostly 1.
[out] double *pdExternalFactorTT 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.
[out] double *pdAmountTT 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.
[out] double *pdAmount The amount in CHF of 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.
[out] double | *pdVatRate | The VAT rate as real number that was applied to this service.
[out] BSTR | *pbstrRemark | An optional remark for the given service
[out] BSTR *pbstrSectionCode The optional bstrSectionCode stems from a variable set defined by "OAAT-OTMA - Reglement Fachbereiche", that designates the service-providing department within a hospital or medical practice, e.g. 'M100.06' for the gastroenterology department.

The list of all departments is documented elsewhere on the "OAAT-OTMA" website, whereby the tariffs used, the law applied or special contracts stipulates the application/usage of the section code (primarily for body@role=hospital, body@role=rehab_clinic, body@role=psychiatric_clinic).
[out] long *plServiceAttributes 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] TreatmentType | *peTreatmentType | The type of treatment (ambulatory or stationary) defined by the IServiceExInput::SetTreatment method.
[out] BillingRoleType | *peBillingRole | The ServiceExInput-relevant billing role applied for this service defined by the IServiceExInput::SetPhysician method.
[out] MedicalRoleType | *peMedicalRole | The ServiceExInput-relevant medical role applied for this service defined by the IServiceExInput::SetPhysician method.
[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 the end of data is reached
space


  • IGeneralInvoiceResult
  • GetTiers

IGeneralInvoiceResult::GetTiers method |  |  | space
Gets the tiers mode and some additional data like the VAT number. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceResult/GetTiers
[JSON input data] | pIGeneralInvoiceResult: | longValue, //interface address
[JSON result data] | peTiersMode: pePatientAllowTS: peAllowTPModification: pbstrVatNumber: pdAmountPrepaid: pbStatus: | longValue, longValue, longValue, "utf8StringValue", doubleValue, 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
C/C++ calling syntax |  |  |
HRESULT GetTiers( | TiersModeType YesNoType YesNoType BSTR double VARIANT_BOOL | *peTiersMode, *pePatientAllowTS, *peAllowTPModification, *pbstrVatNumber, *pdAmountPrepaid, *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
Calling argument description |  |  |
[out] TiersModeType | *peTiersMode | The tiers mode ("Tiers Garant" or "Tiers Soldant" or "Tiers Payant") as defined in the TiersMode enumeration. |
[out] YesNoType | *pePatientAllowTS | This Boolean confirms that the patient allows the usage of Tiers Soldant (TS). Furthermore, it implies the existence of a salary cession document signed by the patient and included as PDF attachment. Please note, that if ePatientAllowTS=enNo then the request should not be processed at the insurance's site but rejected due to the missing approval. |
[out] YesNoType | *peAllowTPModification | The Boolean eAllowTPModification gives or denies the placet for the health care insurance to correct quantities of supplied services. The service quantity can be changed in the range R0+ (positive real numbers including zero), which changes the amounts of individual services as well as the total invoice amount and the vat accounting. Please note that if eAllowTPModification=enNo, the entire request should be rejected if the insurance company questions one or more services. |
[out] BSTR | *pbstrVatNumber | The VAT number of the biller as given by the "Swiss Federal Tax Administration" The VAT number might be empty in the case non was defined by the federal authorities due special agreements. If given/defined than the VAT number is returned is its printed form as requested by the federal authorities. |
[out] double | *pdAmountPrepaid | The supplied prepaid amount. The due amount is calculated as «amount + reminder amount - prepaid amount» |
[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 |


  • IGeneralInvoiceResult
  • GetTransport

IGeneralInvoiceResult::GetTransport method |  |  | space
Returns the transport information that is the routing information going from a sender (from) over at least one intermediate (via) to the receiver (to). All the involved parties are defined by GLN as defined by Stiftung Refdata. If the parameters for the signature and encryption were set then these data are returned as well otherwise the corresponding variables are empty. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceResult/GetTransport
[JSON input data] | pIGeneralInvoiceResult: | longValue, //interface address
[JSON result data] | pbstrFromGLN: pbstrFromPFXFile: pbstrFromPFXPassword: pbstrViaGLN: pbstrToGLN: pbstrToBinDERFile: pbStatus: | "utf8StringValue", "utf8StringValue", "utf8StringValue", "utf8StringValue", "utf8StringValue", "utf8StringValue", 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
C/C++ calling syntax |  |  |
HRESULT GetTransport( | BSTR BSTR BSTR BSTR BSTR BSTR VARIANT_BOOL | *pbstrFromGLN, *pbstrFromPFXFile, *pbstrFromPFXPassword, *pbstrViaGLN, *pbstrToGLN, *pbstrToBinDERFile, *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
Calling argument description |  |  |
[out] BSTR | *pbstrFromGLN | The GLN of the sender as supplied by Stiftung Refdata |
[out] BSTR | *pbstrFromPFXFile | The file name of the PFX certificate used for signing that is the private certificate of the "from" entity. If the request is not signed than this parameter is empty |
[out] BSTR | *pbstrFromPFXPassword | The password to open the PFX certificate. If the request is not signed than this parameter is empty |
[out] BSTR | *pbstrViaGLN | The GLN of the first intermediate as supplied by Stiftung Refdata |
[out] BSTR | *pbstrToGLN | The GLN of the receiver as supplied by Stiftung Refdata |
[out] BSTR | *pbstrToBinDERFile | The file name of the binary DER certificate used for encryption that is the public certificate of the "to" entity |
[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 |


  • IGeneralInvoiceResult
  • GetTreatment

IGeneralInvoiceResult::GetTreatment method |  |  | space
Retrieves the basic treatment parameters. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceResult/GetTreatment
[JSON input data] | pIGeneralInvoiceResult: | longValue, //interface address
[JSON result data] | pbstrAPID: pbstrACID: pdDateBegin: pdDateEnd: peTreatmentCanton: peTreatmentType: peTreatmentReason: pdGestationWeek13: pdEndOfBirth: pbStatus: | "utf8StringValue", "utf8StringValue", "stringISODateValue", "stringISODateValue", longValue, longValue, longValue, "stringISODateValue", "stringISODateValue", 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
C/C++ calling syntax |  |  |
HRESULT GetTreatment( | BSTR BSTR DATE DATE CantonType TreatmentType TreatmentReasonType DATE DATE VARIANT_BOOL | *pbstrAPID, *pbstrACID, *pdDateBegin, *pdDateEnd, *peTreatmentCanton, *peTreatmentType, *peTreatmentReason, *pdGestationWeek13, *pdEndOfBirth, *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
Calling argument description |  |  |
[out] BSTR | *pbstrAPID | The optional Administrative Patient IDentification. |
[out] BSTR | *pbstrACID | The optional Administrative Case IDentification. |
[out] DATE | *pdDateBegin | dDateBegin is the start of the treatment Note, that the date of every service must be greater or equal dDateBegin otherwise it is a content error |
[out] DATE | *pdDateEnd | dDateEnd is the end of the treatment Note, that the date of every service must be less or equal dDateEnd otherwise it is a content error |
[out] CantonType | *peTreatmentCanton | The treatment canton given by the CantonType enumeration |
[out] TreatmentType | *peTreatmentType | The treatment type (ambulatory or stationary) given by the TreatmentType enumeration |
[out] TreatmentReasonType | *peTreatmentReason | The treatment reason given by the TreatmentReasonType enumeration |
[out] DATE | *pdGestationWeek13 | Any day of the 13th gestation week as requested by Article 105 of the Swiss Federal Act on Health Insurance (KVV). A value of 0 means that the variable should be ignored, basically unladed of any semantic meaning. This date is set at least once in the first invoice but only if (peTreatmentReason=enMaternity AND law=enKVG ). In all other cases set 0 as value. |
[out] DATE | *pdEndOfBirth | The dEndOfBirth date is defined when the placenta has been completely expelled from the body. A value of 0 means that the variable should be ignored, basically unladed of any semantic meaning. This date should be given if (peTreatmentReason=enMaternity AND law=enKVG ), in all other cases set 0 as value. |
[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 |


  • IGeneralInvoiceResult
  • GetVats

IGeneralInvoiceResult::GetVats method |  |  | space
This method has a Restful Webservice representation only! Method for collecting all used vat records covered by the IGeneralInvoiceResult interface and returned as JSON array. Please note that IGeneralInvoiceResult::GetVats takes over the functionality of the iterator pair IGeneralInvoiceResult::GetFirstVat / IGeneralInvoiceResult::GetNextVat with a single call, making the latter superfluous. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceResult/GetVats
[JSON input data] | pIGeneralInvoiceResult: | longValue, //interface address
[JSON result array] | { pdVat: pdVatRate: pbStatus: | doubleValue, doubleValue, 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
Calling argument description |  |  |
[out] double | *pdVat | The total VAT amount for the given VAT rate supplied in 2-digit precision. |
[out] double | *pdVatRate | The VAT rate given as a real number. |
[out,retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE the end of data is reached |
space |


  • IGeneralInvoiceResult
  • GetXtraDRG

IGeneralInvoiceResult::GetXtraDRG method |  |  | space
Gets the splitting ratio between the two remaining parties if a 3-party splitting situation must be described! VARIANT_FALSE is returned if the additional data is not defined. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceResult/GetXtraDRG
[JSON input data] | pIGeneralInvoiceResult: lID: | longValue, //interface address longValue
[JSON result data] | pdCostFraction: pbStatus: | doubleValue, 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
C/C++ calling syntax |  |  |
HRESULT GetXtraDRG( | long double VARIANT_BOOL | lID, *pdCostFraction, *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
Calling argument description |  |  |
[in] long | lID | The internal ID of the DRG service record returned in the IGeneralInvoiceRequest::AddService method for which the extra DRG information is defined. |
[out] double | *pdCostFraction | Defines the splitting ratio between the two remaining parties of a 3-party splitting situation, whereas the service@externalFactor defines the splitting between the debitor and the other two parties. The cost_fraction is provided solely for informational purposes of the debitor. For example, if the debitor has to pay 40%, meaning service@externalFactor=0.4, then a cost fraction=0.5 would define a cost split of 50% each for the remaining two parties. |
[out,retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE the additional data set is undefined. |
space |


  • IGeneralInvoiceResult
  • GetXtraDrug

IGeneralInvoiceResult::GetXtraDrug method | space
Gets additional drug input data for the defined service record if eRoleType=enRolePharmacist. VARIANT_FALSE is returned if the additional data is not defined.

The defined bit positions for lRegulationAttributes as of March 2018 are:
Bit |  | Code | Meaning
Bit 1 | (0x000001) | code 100 | "Nicht-SL Produkt ist vom Vertrauensarzt bewilligt worden" "Produit non LS a été autorisé par le médecin-conseil"
Bit 2 | (0x000002) | code 101 | "Notfall: Abgabe eines anderen Produktes als auf dem Rezept" "Cas d'urgence: remise d'un autre produit que celui figurant sur l'ordonnance"
Bit 3 | (0x000004) | code 102 | "Abgabe eines anderen Produktes als auf dem Rezept in Rücksprache mit dem Arzt" "Remise d'un autre produit, après consultation du médecin, que celui figurant sur l'ordonnance"
Bit 4 | (0x000008) | code 103 | "Abgabe einer grösseren Packung (nicht-SL) anstelle von mehreren kleineren Packungen (SL)" "Remise d'un emballage plus grand (non LS) en lieu et place de plusieurs emballages plus petits (LS)"
Bit 5 | (0x000010) | code 104 | "Abgabe einer kleineren Anzahl Packungen als verschrieben" "Remise d'un nombre moins élevé d'emballages que le nombre prescrit"
Bit 6 | (0x000020) | code 105 | "Abgabe einer kleineren Packung als verschrieben" "Remise d'un plus petit emballage que la grandeur prescrite"
Bit 7 | (0x000040) | code 106 | "SL-Limitation vom Vertrauensarzt aufgehoben" "Limitation LS supprimée par le médecin-conseil"
Bit 8 | (0x000080) | code 107 | "Lehnt der Arzt oder die Ärztin beziehungsweise der Chiropraktor oder die Chiropraktorin aus medizinischen Gründen eine Substitution des Originalpräparats ab, so kommt der Selbstbehalt von 20% nicht zur Anwendung." "Refus de substitution du médicament original par le médecin ou le chiropraticien pour raisons médicales - 20% de participation ne s'applique pas."
Bit 9 | (0x000100) | code 108 | "Lehnt der Apotheker oder die Apothekerin aus medizinischen Gründen eine Substitution des Originalpräparats ab, so kommt der Selbstbehalt von 20% nicht zur Anwendung." "Refus de substitution du médicament original par le pharmacien ou la pharmacienne pour raisons médicales - 20% de participation ne s'applique pas."
space
Restful webservice calling syntax
[POST] | /baseURL/ IGeneralInvoiceResult/GetXtraDrug
[JSON input data] pIGeneralInvoiceResult:
lID: 		longValue, //interface address
longValue
[JSON result data] plRegulationAttributes:
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
C/C++ calling syntax
HRESULT GetXtraDrug( long
long
VARIANT_BOOL 		lID,
*plRegulationAttributes,
*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
Calling argument description
[in] long | lID | The internal ID of the drug service record returned in the IGeneralInvoiceRequest::AddService method to which the extra drug information are appended.
[out] long *plRegulationAttributes lRegulationAttributes is a 32 bit integer where each bit defines one specific regulation code as contracted between pharmacists and insurances. The individual regulation codes can be ORed together to form to overall regulation.

The defined bit positions for lRegulationAttributes are of November 2024
Bit |  | Code | Meaning
Bit 1 | (0x000001) | code 100 | "Nicht-SL Produkt ist vom Vertrauensarzt bewilligt worden" "Produit non LS a été autorisé par le médecin-conseil"
Bit 2 | (0x000002) | code 101 | "Notfall: Abgabe eines anderen Produktes als auf dem Rezept" "Cas d'urgence: remise d'un autre produit que celui figurant sur l'ordonnance"
Bit 3 | (0x000004) | code 102 | "Abgabe eines anderen Produktes als auf dem Rezept in Rücksprache mit dem Arzt" "Remise d'un autre produit, après consultation du médecin, que celui figurant sur l'ordonnance"
Bit 4 | (0x000008) | code 103 | "Abgabe einer grösseren Packung (nicht-SL) anstelle von mehreren kleineren Packungen (SL)" "Remise d'un emballage plus grand (non LS) en lieu et place de plusieurs emballages plus petits (LS)"
Bit 5 | (0x000010) | code 104 | "Abgabe einer kleineren Anzahl Packungen als verschrieben" "Remise d'un nombre moins élevé d'emballages que le nombre prescrit"
Bit 6 | (0x000020) | code 105 | "Abgabe einer kleineren Packung als verschrieben" "Remise d'un plus petit emballage que la grandeur prescrite"
Bit 7 | (0x000040) | code 106 | "SL-Limitation vom Vertrauensarzt aufgehoben" "Limitation LS supprimée par le médecin-conseil"
Bit 8 | (0x000080) | code 107 | "Lehnt der Arzt oder die Ärztin beziehungsweise der Chiropraktor oder die Chiropraktorin aus medizinischen Gründen eine Substitution des Originalpräparats ab, so kommt der Selbstbehalt von 40% nicht zur Anwendung." "Refus de substitution du médicament original par le médecin ou le chiropraticien pour raisons médicales - 40% de participation ne s'applique pas."
Bit 9 | (0x000100) | code 108 | "Lehnt der Apotheker oder die Apothekerin aus medizinischen Gründen eine Substitution des Originalpräparats ab, so kommt der Selbstbehalt von 40% nicht zur Anwendung." "Refus de substitution du médicament original par le pharmacien ou la pharmacienne pour raisons médicales - 40% de participation ne s'applique pas."
Bit 10 | (0x000200) | code 109 | "Dem Apotheker liegt eine Kostengutsprache nach Art. 71a-c KVV vor." "Le pharmacien dispose d'une garantie de prise en charge des coûts selon l'art. 71a-c OAMal."
[out,retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE the additional data set is undefined.
space


  • IGeneralInvoiceResult
  • GetXtraHospital

IGeneralInvoiceResult::GetXtraHospital method | space
Gets the additional treatment parameters requested if eRoleType=enRoleHospital and/or ePlaceType=enPlaceHospital.

VARIANT_FALSE is returned if the data are not defined.
space
Restful webservice calling syntax
[POST] | /baseURL/ IGeneralInvoiceResult/GetXtraHospital
[JSON input data] pIGeneralInvoiceResult: longValue, //interface address
[JSON result data] peTreatmentType:
pdDateHospitalization:
plTreatmentDays:
peHospitalizationType:
peHospitalizationMode:
peHospitalizationClass:
peHospitalAdmissionType:
peResidenceBeforeAdmission:
peHospitalDischargeType:
peResidenceAfterDischarge:
peHospitalProviderType:
pbstrSectionMajor:
peHasExpenseLoading:
pbstrHPSG:
pbStatus: 		longValue,
"stringISODateValue",
longValue,
longValue,
longValue,
longValue,
longValue,
longValue,
longValue,
longValue,
longValue,
"utf8StringValue",
longValue,
"utf8StringValue",
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
C/C++ calling syntax
HRESULT GetXtraHospital( TreatmentType
DATE
long
HospitalizationType
HospitalizationMode
HospitalizationClass
HospitalAdmissionType
ResidenceBeforeAdmission
HospitalDischargeType
ResidenceAfterDischarge
HospitalProviderType
BSTR
YesNoType
BSTR
VARIANT_BOOL 		*peTreatmentType,
*pdDateHospitalization,
*plTreatmentDays,
*peHospitalizationType,
*peHospitalizationMode,
*peHospitalizationClass,
*peHospitalAdmissionType,
*peResidenceBeforeAdmission,
*peHospitalDischargeType,
*peResidenceAfterDischarge,
*peHospitalProviderType,
*pbstrSectionMajor,
*peHasExpenseLoading,
*pbstrHPSG,
*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
Calling argument description
[out] TreatmentType | *peTreatmentType | The treatment type (ambulatory or stationary) given by the TreatmentType enumeration
[out] DATE *pdDateHospitalization dDateHospitalization is the date and time of the hospitalization. This information is meaningless in the ambulatory case and should be ignored!

Note, that this date must be less or equal the dDateBegin of the treatment period set in IGeneralInvoiceRequest::SetTreatment method.
[out] long *plTreatmentDays lTreatmentDays is the number of treatment days within the given treatment period. This information is meaningless in the ambulatory case and should be ignored!

The calculation of the treatment days is dependent on whether SwissDRG is used nor not!
The treatment days are calculated as
  • Non-SwissDRG: «(treatment@date_end - treatment@date_begin + 1 - vacation_days)»
  • SwissDRG: «(treatment@date_end - treatment@date_begin - vacation_days)»
where vacation_days is the number of vacation days (the leave days when the patient was not in the hospital for treatment).
[out] HospitalizationType | *peHospitalizationType | The type/reason of hospitalization given by the HospitalizationType enumeration
[out] HospitalizationMode *peHospitalizationMode The mode/indication of hospitalization given by the HospitalizationMode enumeration.

This information is meaningless in the ambulatory case and should be ignored!
[out] HospitalizationClass *peHospitalizationClass The hospitalization class given by the HospitalizationClass enumeration.

This information is meaningless in the ambulatory case and should be ignored!
[out] HospitalAdmissionType | *peHospitalAdmissionType | The hospital admission type defines the DRG grouper relevant admission reasons into the hospital encoded by the HospitalAdmissionType enumeration
[out] ResidenceBeforeAdmission | *peResidenceBeforeAdmission | The residence before admission defines the DRG grouper relevant admission location where the patient stayed before admission, encoded by the ResidenceBeforeAdmission enumeration
[out] HospitalDischargeType | *peHospitalDischargeType | The hospital discharge type defines the DRG grouper relevant discharge reasons out from hospital encoded by the HospitalDischargeType enumeration
[out] ResidenceAfterDischarge | *peResidenceAfterDischarge | The residence after discharge defines the DRG grouper relevant location where the patient is going to, encoded by the ResidenceAfterDischarge enumeration
[out] HospitalProviderType | *peHospitalProviderType | The hospital provider Type defines the DRG grouper relevant provider types, encoded by the HospitalProviderType enumeration
[out] BSTR | *pbstrSectionMajor | The major BfS section code as defined by Swiss Federal Statistical Office
[out] YesNoType *peHasExpenseLoading The Boolean eHasExpenseLoading defines if there is an expense loading by the patient ("Spitalkostenbeitrag").

This information is meaningless in the ambulatory case and should be ignored!
[out] BSTR *pbstrHPSG The HPSG is used to define a so-called "Hospital Planning Service Group" if the underlaying tariff contract stipulates the need for such an HPSG code.

This information is not used in the ambulatory case!
[out,retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE the data are undefined
space


  • IGeneralInvoiceResult
  • GetXtraServices

IGeneralInvoiceResult::GetXtraServices method |  |  | space
This method has a Restful Webservice representation only! Method for collecting all extra service data for a given service ID covered by the IGeneralInvoiceResult interface and returned as JSON array. Please note that IGeneralInvoiceResult::GetXtraServices takes over the functionality of the iterator pair IGeneralInvoiceResult::GetFirstXtraService / IGeneralInvoiceResult::GetNextXtraService with a single call, making the latter superfluous. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IGeneralInvoiceResult/GetXtraServices
[JSON input data] | pIGeneralInvoiceResult: lID: | longValue, //interface address longValue
[JSON result array] | { pbstrToken: pbstrValue: pbStatus: | "utf8StringValue", "utf8StringValue", 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
Calling argument description |  |  |
[in] long | lID | The unique ID of the prior defined service for which the xtra service data should be retrieved. |
[out] BSTR | *pbstrToken | The well defined token of the token=value pair. |
[out] BSTR | *pbstrValue | The value of the token=value pair |
[out,retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE the end of data is reached |
space |


  • IGeneralInvoiceResult
  • DestructGeneralInvoiceResult

IGeneralInvoiceResult::DestructGeneralInvoiceResult property |  |  | space
This property has a Restful Webservice representation only! Destructs/invalidates this IGeneralInvoiceResult interface instance. |  |  |
space
Restful webservice calling syntax |  |  |
[PUT] | /baseURL/ IGeneralInvoiceResult/PutDestructGeneralInvoiceResult
[JSON input data] | pIGeneralInvoiceResult: | longValue, //interface address
[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
Remarks |  |  |
This property has a Restful Webservice representation only! |  |  |
space |


  • IServiceExInput

IServiceExInput interface |  | V5.00/27 Nov 2024
The utility interface IServiceExInput provides methods for the input of data basically used in special validators like the tarmedValidator. Among these data are the dignities of the providers as well as other parameters like the Tarmed specific invoicing roles needed just to operate these validators. |  | space
space
Methods |  | 23 methods
AddDignity | Adds a Qualitative Dignity to the list of dignities for a certain provider. |
AddSection | Adds a section/location to the list of sections |
AddToken | Adds a token/value pair to the list of tokens |
GetAbortInfo | Get the abort information string with the error coded in the module language |
GetDignities | Method for collecting all dignity data covered by the IServiceEx interface and returned as JSON array |
GetFirstDignity | Retrieves the first Qualitative Dignity from the list of dignities |
GetFirstSection | Retrieves the first section/location from the list of sections |
GetFirstToken | Retrieves the first token/value from the token list |
GetNextDignity | Retrieves the next Qualitative Dignity from the list of dignities |
GetNextSection | Gets the next section/location from the list of sections |
GetNextToken | Gets the next token/value from the token list |
GetPatient | Retrieves the patient's primary parameters (sex, birthdate) supplied for the utility interface IServiceExInput. |
GetPhysician | Retrieves the provider's primary parameters (EAN, medical and billing role) supplied for the utility interface IServiceExInput. |
GetSections | Method for collecting all section data covered by the IServiceEx interface and returned as JSON array |
GetTokens | Method for collecting all token data covered by the IServiceEx interface and returned as JSON array |
GetTreatment | Gets the primary treatment parameters (GLN, medical and billing role) supplied for the utility interface IServiceExInput. |
InitDignity | Initializes and empties the Qualitative Dignity set that is filled via the AddDignity method. |
Initialize | Initializes some static data (physician, treatment, patient) that are set via the Set-methods of IServiceExInput |
InitSection | Initializes and empties the section/location set that is filled via the AddSection method. |
InitToken | Initializes and empties the token/value set that is filled via the AddToken method. |
SetPatient | Sets the patient's primary parameters (sex, birthdate) for the utility interface IServiceExInput. |
SetPhysician | Sets the provider's primary parameters (GLN, medical and billing role) for the utility interface IServiceExInput. |
SetTreatment | Sets the primary treatment parameters (GLN, medical and billing role) for the utility interface IServiceExInput. |
space
Properties |  | 2 properties
[put] DestructServiceExInput | Destructs/invalidates this IServiceExInput interface instance |
[get] Tariffnum | GetTariffnum returns the tariff number ('001' or '007') for which the interface IServiceExInput was instantiated. |
space |


  • IServiceExInput
  • AddDignity

IServiceExInput::AddDignity method |  |  | space
Adds a Qualitative Dignity to the list of dignities for a certain provider. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IServiceExInput/AddDignity
[JSON input data] | pIServiceExInput: bstrGLN: bstrQLCode: | longValue, //interface address "utf8StringValue", "utf8StringValue"
[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
C/C++ calling syntax |  |  |
HRESULT AddDignity( | BSTR BSTR VARIANT_BOOL | bstrGLN, bstrQLCode, *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
Calling argument description |  |  |
[in] BSTR | bstrGLN | The provider's GLN for which the qualitative dignity is defined as supplied by Stiftung Refdata |
[in] BSTR | bstrQLCode | The Qualitative Dignity code - consult e.g. the Tarmed for a list and description of these codes. |
[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 |


  • IServiceExInput
  • AddSection

IServiceExInput::AddSection method |  |  | space
Adds a section/location to the list of sections. Basically these are functional units ("Sparten" in the nomenclature of Tarmed or Tardoc) where services are applied |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IServiceExInput/AddSection
[JSON input data] | pIServiceExInput: bstrGLN: bstrCode: | longValue, //interface address "utf8StringValue", "utf8StringValue"
[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
C/C++ calling syntax |  |  |
HRESULT AddSection( | BSTR BSTR VARIANT_BOOL | bstrGLN, bstrCode, *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
Calling argument description |  |  |
[in] BSTR | bstrGLN | The GLN of the functional unit for which the section code is defined |
[in] BSTR | bstrCode | The section/location code - consult e.g. the Tarmed or Tardoc for a list and description of these codes. |
[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 |


  • IServiceExInput
  • AddToken

IServiceExInput::AddToken method |  |  | space
Adds a token/value pair to the list of tokens. Please note, that the AddToken mechanism is implemented to being able to input data to a yet unknown validator with extended type service structure without the necessity to change any interface of this COM module. As soon as such a validator arises, the supplemental data space is supplied with this method. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IServiceExInput/AddToken
[JSON input data] | pIServiceExInput: bstrToken: bstrValue: | longValue, //interface address "utf8StringValue", "utf8StringValue"
[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
C/C++ calling syntax |  |  |
HRESULT AddToken( | BSTR BSTR VARIANT_BOOL | bstrToken, bstrValue, *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
Calling argument description |  |  |
[in] BSTR | bstrToken | The name of the token/value pair. The semantic and token space is defined by the forthcoming validator. |
[in] BSTR | bstrValue | The data of the token/value pair |
[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 |


  • IServiceExInput
  • GetAbortInfo

IServiceExInput::GetAbortInfo method |  |  | space
Get the abort information string with the error coded in the module language. Call this method whenever the returned pbStatus variable of the primarily called method is VARIANT_FALSE and the primarily called method is not an iterator (GetFirst/GetNext). In the later case VARIANT_FALSE signals the end of data. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IServiceExInput/GetAbortInfo
[JSON input data] | pIServiceExInput: | longValue, //interface address
[JSON result data] | pbstrAbort: pbStatus: | "utf8StringValue", 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
C/C++ calling syntax |  |  |
HRESULT GetAbortInfo( | BSTR VARIANT_BOOL | *pbstrAbort, *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
Calling argument description |  |  |
[out] BSTR | *pbstrAbort | Abort information string coded in the module language. |
[out,retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE then an error-in-error situation occurred. |
space |


  • IServiceExInput
  • GetDignities

IServiceExInput::GetDignities method |  |  | space
This method has a Restful Webservice representation only! Method for collecting all dignity data covered by the IServiceEx interface and returned as JSON array. Please note that IServiceExInput::GetDignities takes over the functionality of the iterator pair IServiceExInput::GetFirstDignity / IServiceExInput::GetNextDignity with a single call, making the latter superfluous. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IServiceExInput/GetDignities
[JSON input data] | pIServiceExInput: bstrGLN: bstrQLCode: | longValue, //interface address "utf8StringValue", "utf8StringValue"
[JSON result array] | { pbstrGLN: pbstrQLCode: pbStatus: | "utf8StringValue", "utf8StringValue", 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
Calling argument description |  |  |
[in] BSTR | bstrGLN | Input search parameter criterion acting on the provider's GLN. Use the wildcard symbol (*) to include all records, supply an empty string to not use the GLN as a search criterion. |
[in] BSTR | bstrQLCode | Input search parameter criterion acting on the Qualitative Dignity. Use the wildcard symbol (*) to include all records, supply an empty string to not use the Qualitative Dignity as a search criterion. |
[out] BSTR | *pbstrGLN | The first EAN number fulfilling the search criterion. |
[out] BSTR | *pbstrQLCode | The first Qualitative Dignity fulfilling the search criterion. |
[out,retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE the end of data is reached |
space |


  • IServiceExInput
  • GetFirstDignity

IServiceExInput::GetFirstDignity method |  |  | space
Retrieves the first Qualitative Dignity from the list of dignities. VARIANT_FALSE is returned if the end of the qualitative dignity list is reached. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IServiceExInput/GetFirstDignity
[JSON input data] | pIServiceExInput: bstrGLN: bstrQLCode: | longValue, //interface address "utf8StringValue", "utf8StringValue"
[JSON result data] | pbstrGLN: pbstrQLCode: pbStatus: | "utf8StringValue", "utf8StringValue", 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
C/C++ calling syntax |  |  |
HRESULT GetFirstDignity( | BSTR BSTR BSTR BSTR VARIANT_BOOL | bstrGLN, bstrQLCode, *pbstrGLN, *pbstrQLCode, *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
Calling argument description |  |  |
[in] BSTR | bstrGLN | Input search parameter criterion acting on the provider's GLN. Use the wildcard symbol (*) to include all records, supply an empty string to not use the GLN as a search criterion. |
[in] BSTR | bstrQLCode | Input search parameter criterion acting on the Qualitative Dignity. Use the wildcard symbol (*) to include all records, supply an empty string to not use the Qualitative Dignity as a search criterion. |
[out] BSTR | *pbstrGLN | The first GLN number fulfilling the search criterion. |
[out] BSTR | *pbstrQLCode | The first Qualitative Dignity fulfilling the search criterion. |
[out,retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE the end of data is reached |
space |


  • IServiceExInput
  • GetFirstSection

IServiceExInput::GetFirstSection method |  |  | space
Retrieves the first section/location from the list of sections. Basically these are functional units ("Sparten" in the nomenclature of Tarmed) where services are applied. VARIANT_FALSE is returned if the end of the section/location list is reached. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IServiceExInput/GetFirstSection
[JSON input data] | pIServiceExInput: bstrGLN: bstrCode: | longValue, //interface address "utf8StringValue", "utf8StringValue"
[JSON result data] | pbstrGLN: pbstrCode: pbStatus: | "utf8StringValue", "utf8StringValue", 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
C/C++ calling syntax |  |  |
HRESULT GetFirstSection( | BSTR BSTR BSTR BSTR VARIANT_BOOL | bstrGLN, bstrCode, *pbstrGLN, *pbstrCode, *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
Calling argument description |  |  |
[in] BSTR | bstrGLN | Input search parameter criterion acting on the section/location GLN. Use the wildcard symbol (*) to include all records, supply an empty string to not use the GLN as a search criterion. |
[in] BSTR | bstrCode | Input search parameter criterion acting on the section/location code. Use the wildcard symbol (*) to include all records, supply an empty string to not use the Qualitative Dignity as a search criterion. |
[out] BSTR | *pbstrGLN | The first GLN fulfilling the search criterion. |
[out] BSTR | *pbstrCode | The first section/location fulfilling the search criterion. |
[out,retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE the end of data is reached |
space |


  • IServiceExInput
  • GetFirstToken

IServiceExInput::GetFirstToken method |  |  | space
Retrieves the first token/value from the token list. VARIANT_FALSE is returned if the end of the token list is reached. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IServiceExInput/GetFirstToken
[JSON input data] | pIServiceExInput: | longValue, //interface address
[JSON result data] | pbstrToken: pbstrValue: pbStatus: | "utf8StringValue", "utf8StringValue", 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
C/C++ calling syntax |  |  |
HRESULT GetFirstToken( | BSTR BSTR VARIANT_BOOL | *pbstrToken, *pbstrValue, *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
Calling argument description |  |  |
[out] BSTR | *pbstrToken | The name of the token/value pair |
[out] BSTR | *pbstrValue | The data of the token/value pair |
[out,retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE the end of data is reached |
space |


  • IServiceExInput
  • GetNextDignity

IServiceExInput::GetNextDignity method |  |  | space
Retrieves the next Qualitative Dignity from the list of dignities. VARIANT_FALSE is returned if the end of the qualitative dignity list is reached. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IServiceExInput/GetNextDignity
[JSON input data] | pIServiceExInput: | longValue, //interface address
[JSON result data] | pbstrGLN: pbstrQLCode: pbStatus: | "utf8StringValue", "utf8StringValue", 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
C/C++ calling syntax |  |  |
HRESULT GetNextDignity( | BSTR BSTR VARIANT_BOOL | *pbstrGLN, *pbstrQLCode, *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
Calling argument description |  |  |
[out] BSTR | *pbstrGLN | The provider's GLN for which the qualitative dignity is defined as supplied by Stiftung Refdata |
[out] BSTR | *pbstrQLCode | The next Qualitative Dignity fulfilling the search criterion the search criterion defined in the GetFirstDignity call. |
[out,retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE the end of data is reached |
space |


  • IServiceExInput
  • GetNextSection

IServiceExInput::GetNextSection method |  |  | space
Gets the next section/location from the list of sections. Basically these are functional units ("Sparten" in the nomenclature of Tarmed) where services are applied. VARIANT_FALSE is returned if the end of the section/location list is reached. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IServiceExInput/GetNextSection
[JSON input data] | pIServiceExInput: | longValue, //interface address
[JSON result data] | pbstrGLN: pbstrCode: pbStatus: | "utf8StringValue", "utf8StringValue", 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
C/C++ calling syntax |  |  |
HRESULT GetNextSection( | BSTR BSTR VARIANT_BOOL | *pbstrGLN, *pbstrCode, *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
Calling argument description |  |  |
[out] BSTR | *pbstrGLN | The next GLN fulfilling the search criterion defined in the GetFirstSection call. |
[out] BSTR | *pbstrCode | The next section/location fulfilling the search criterion defined in the GetFirstSection call. |
[out,retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE the end of data is reached |
space |


  • IServiceExInput
  • GetNextToken

IServiceExInput::GetNextToken method |  |  | space
Gets the next token/value from the token list. VARIANT_FALSE is returned if the end of the token list is reached. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IServiceExInput/GetNextToken
[JSON input data] | pIServiceExInput: | longValue, //interface address
[JSON result data] | pbstrToken: pbstrValue: pbStatus: | "utf8StringValue", "utf8StringValue", 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
C/C++ calling syntax |  |  |
HRESULT GetNextToken( | BSTR BSTR VARIANT_BOOL | *pbstrToken, *pbstrValue, *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
Calling argument description |  |  |
[out] BSTR | *pbstrToken | The name of the token/value pair |
[out] BSTR | *pbstrValue | The data of the token/value pair |
[out,retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE the end of data is reached |
space |


  • IServiceExInput
  • GetPatient

IServiceExInput::GetPatient method |  |  | space
Retrieves the patient's primary parameters (sex, birthdate) supplied for the utility interface IServiceExInput. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IServiceExInput/GetPatient
[JSON input data] | pIServiceExInput: | longValue, //interface address
[JSON result data] | pdBirthdate: peSex: pbStatus: | "stringISODateValue", 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
C/C++ calling syntax |  |  |
HRESULT GetPatient( | DATE SexType VARIANT_BOOL | *pdBirthdate, *peSex, *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
Calling argument description |  |  |
[out] DATE | *pdBirthdate | The patient's birthdate. |
[out] SexType | *peSex | The patient's medical sex, which is pre-dominantly induced by the actual hormonal balance of the body. |
[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 |


  • IServiceExInput
  • GetPhysician

IServiceExInput::GetPhysician method |  |  | space
Retrieves the provider's primary parameters (EAN, medical and billing role) supplied for the utility interface IServiceExInput. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IServiceExInput/GetPhysician
[JSON input data] | pIServiceExInput: | longValue, //interface address
[JSON result data] | peMedicalRole: peBillingRole: pbstrProviderGLN: pbstrResponsibleGLN: pbstrMedicalSectionCode: pbStatus: | longValue, longValue, "utf8StringValue", "utf8StringValue", "utf8StringValue", 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
C/C++ calling syntax |  |  |
HRESULT GetPhysician( | MedicalRoleType BillingRoleType BSTR BSTR BSTR VARIANT_BOOL | *peMedicalRole, *peBillingRole, *pbstrProviderGLN, *pbstrResponsibleGLN, *pbstrMedicalSectionCode, *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
Calling argument description |  |  |
[out] MedicalRoleType | *peMedicalRole | The ServiceExInput-relevant medical role given by the MedicalRoleType enumeration |
[out] BillingRoleType | *peBillingRole | The ServiceExInput-relevant billing role given by the BillingRoleType enumeration |
[out] BSTR | *pbstrProviderGLN | The GLN of the service provider as supplied by Stiftung Refdata |
[out] BSTR | *pbstrResponsibleGLN | The GLN of the responsible as supplied by Stiftung Refdata |
[out] BSTR | *pbstrMedicalSectionCode | The medical section code stemming from a variable set defined by "OAAT-OTMA - Reglement Fachbereiche", that designates the service-providing department within a hospital or medical practice, e.g. 'M100.06' for the gastroenterology department. The list of all departments is documented elsewhere on the "OAAT-OTMA" website, whereby the tariffs used, the law applied or special contracts stipulates the application/usage of the section code (primarily for body@role=hospital, body@role=rehab_clinic, body@role=psychiatric_clinic). |
[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 |


  • IServiceExInput
  • GetSections

IServiceExInput::GetSections method |  |  | space
This method has a Restful Webservice representation only! Method for collecting all section data covered by the IServiceEx interface and returned as JSON array. Please note that IServiceExInput::GetSections takes over the functionality of the iterator pair IServiceExInput::GetFirstSection / IServiceExInput::GetNextSection with a single call, making the latter superfluous. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IServiceExInput/GetSections
[JSON input data] | pIServiceExInput: bstrGLN: bstrCode: | longValue, //interface address "utf8StringValue", "utf8StringValue"
[JSON result array] | { pbstrGLN: pbstrCode: pbStatus: | "utf8StringValue", "utf8StringValue", 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
Calling argument description |  |  |
[in] BSTR | bstrGLN | Input search parameter criterion acting on the section/location GLN. Use the wildcard symbol (*) to include all records, supply an empty string to not use the GLN as a search criterion. |
[in] BSTR | bstrCode | Input search parameter criterion acting on the section/location code. Use the wildcard symbol (*) to include all records, supply an empty string to not use the Qualitative Dignity as a search criterion. |
[out] BSTR | *pbstrGLN | The first GLN fulfilling the search criterion. |
[out] BSTR | *pbstrCode | The first section/location fulfilling the search criterion. |
[out,retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE the end of data is reached |
space |


  • IServiceExInput
  • GetTokens

IServiceExInput::GetTokens method |  |  | space
This method has a Restful Webservice representation only! Method for collecting all token data covered by the IServiceEx interface and returned as JSON array. Please note that IServiceExInput::GetTokens takes over the functionality of the iterator pair IServiceExInput::GetFirstToken / IServiceExInput::GetNextToken with a single call, making the latter superfluous. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IServiceExInput/GetTokens
[JSON input data] | pIServiceExInput: | longValue, //interface address
[JSON result array] | { pbstrToken: pbstrValue: pbStatus: | "utf8StringValue", "utf8StringValue", 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
Calling argument description |  |  |
[out] BSTR | *pbstrToken | The name of the token/value pair |
[out] BSTR | *pbstrValue | The data of the token/value pair |
[out,retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE the end of data is reached |
space |


  • IServiceExInput
  • GetTreatment

IServiceExInput::GetTreatment method |  |  | space
Gets the primary treatment parameters (GLN, medical and billing role) supplied for the utility interface IServiceExInput. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IServiceExInput/GetTreatment
[JSON input data] | pIServiceExInput: | longValue, //interface address
[JSON result data] | peCanton: peLaw: peTreatmentType: pbstrGLNSection: pbStatus: | longValue, longValue, longValue, "utf8StringValue", 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
C/C++ calling syntax |  |  |
HRESULT GetTreatment( | CantonType LawType TreatmentType BSTR VARIANT_BOOL | *peCanton, *peLaw, *peTreatmentType, *pbstrGLNSection, *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
Calling argument description |  |  |
[out] CantonType | *peCanton | The treatment canton given by the CantonType enumeration |
[out] LawType | *peLaw | The type of law given by the LawType enumeration |
[out] TreatmentType | *peTreatmentType | The treatment type (ambulatory or stationary) given by the TreatmentType enumeration |
[out] BSTR | *pbstrGLNSection | The GLN of the section/location - leave empty if the section concept is unused. |
[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 |


  • IServiceExInput
  • InitDignity

IServiceExInput::InitDignity method |  |  | space
Initializes and empties the Qualitative Dignity set that is filled via the AddDignity method. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IServiceExInput/InitDignity
[JSON input data] | pIServiceExInput: | longValue, //interface address
[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
C/C++ calling syntax |  |  |
HRESULT InitDignity( | VARIANT_BOOL | *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
Calling argument description |  |  |
[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 |


  • IServiceExInput
  • Initialize

IServiceExInput::Initialize method |  |  | space
Initializes some static data (physician, treatment, patient) that are set via the Set-methods of IServiceExInput |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IServiceExInput/Initialize
[JSON input data] | pIServiceExInput: | longValue, //interface address
[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
C/C++ calling syntax |  |  |
HRESULT Initialize( | VARIANT_BOOL | *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
Calling argument description |  |  |
[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 |


  • IServiceExInput
  • InitSection

IServiceExInput::InitSection method |  |  | space
Initializes and empties the section/location set that is filled via the AddSection method. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IServiceExInput/InitSection
[JSON input data] | pIServiceExInput: | longValue, //interface address
[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
C/C++ calling syntax |  |  |
HRESULT InitSection( | VARIANT_BOOL | *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
Calling argument description |  |  |
[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 |


  • IServiceExInput
  • InitToken

IServiceExInput::InitToken method |  |  | space
Initializes and empties the token/value set that is filled via the AddToken method. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IServiceExInput/InitToken
[JSON input data] | pIServiceExInput: | longValue, //interface address
[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
C/C++ calling syntax |  |  |
HRESULT InitToken( | VARIANT_BOOL | *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
Calling argument description |  |  |
[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 |


  • IServiceExInput
  • SetPatient

IServiceExInput::SetPatient method |  |  | space
Sets the patient's primary parameters (sex, birthdate) for the utility interface IServiceExInput. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IServiceExInput/SetPatient
[JSON input data] | pIServiceExInput: dBirthdate: eSex: | longValue, //interface address variantDateValue | "stringISODateValue", longValue
[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
C/C++ calling syntax |  |  |
HRESULT SetPatient( | DATE SexType VARIANT_BOOL | dBirthdate, eSex, *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
Calling argument description |  |  |
[in] DATE | dBirthdate | The patient's birthdate. |
[in] SexType | eSex | The patient's medical sex (pre-dominantly induced by the actual hormonal balance of the body) encoded by a terminal set of tokens. |
[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 |


  • IServiceExInput
  • SetPhysician

IServiceExInput::SetPhysician method |  |  | space
Sets the provider's primary parameters (GLN, medical and billing role) for the utility interface IServiceExInput. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IServiceExInput/SetPhysician
[JSON input data] | pIServiceExInput: eMedicalRole: eBillingRole: bstrProviderGLN: bstrResponsibleGLN: bstrMedicalSectionCode: | longValue, //interface address longValue, longValue, "utf8StringValue", "utf8StringValue", "utf8StringValue"
[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
C/C++ calling syntax |  |  |
HRESULT SetPhysician( | MedicalRoleType BillingRoleType BSTR BSTR BSTR VARIANT_BOOL | eMedicalRole, eBillingRole, bstrProviderGLN, bstrResponsibleGLN, bstrMedicalSectionCode, *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
Calling argument description |  |  |
[in] MedicalRoleType | eMedicalRole | The ServiceExInput-relevant medical role given by the MedicalRoleType enumeration |
[in] BillingRoleType | eBillingRole | The ServiceExInput-relevant billing role given by the BillingRoleType enumeration |
[in] BSTR | bstrProviderGLN | The GLN of the service provider as supplied by Stiftung Refdata |
[in] BSTR | bstrResponsibleGLN | The GLN of the responsible as supplied by Stiftung Refdata |
[in] BSTR | bstrMedicalSectionCode | The medical section code stems from a variable set defined by "OAAT-OTMA - Reglement Fachbereiche", that designates the service-providing department within a hospital or medical practice, e.g. 'M100.06' for the gastroenterology department. The list of all departments is documented elsewhere on the "OAAT-OTMA" website, whereby the tariffs used, the law applied or special contracts stipulates the application/usage of the section code (primarily for body@role=hospital, body@role=rehab_clinic, body@role=psychiatric_clinic). |
[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 |


  • IServiceExInput
  • SetTreatment

IServiceExInput::SetTreatment method |  |  | space
Sets the primary treatment parameters (GLN, medical and billing role) for the utility interface IServiceExInput. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IServiceExInput/SetTreatment
[JSON input data] | pIServiceExInput: eCanton: eLaw: eTreatmentType: bstrGLNSection: | longValue, //interface address longValue, longValue, longValue, "utf8StringValue"
[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
C/C++ calling syntax |  |  |
HRESULT SetTreatment( | CantonType LawType TreatmentType BSTR VARIANT_BOOL | eCanton, eLaw, eTreatmentType, bstrGLNSection, *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
Calling argument description |  |  |
[in] CantonType | eCanton | The treatment canton given by the CantonType enumeration |
[in] LawType | eLaw | The type of law given by the LawType enumeration |
[in] TreatmentType | eTreatmentType | The treatment type (ambulatory or stationary) given by the TreatmentType enumeration |
[in] BSTR | bstrGLNSection | The GLN of the section/location - leave empty if the section concept is unused. |
[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 |


  • IServiceExInput
  • DestructServiceExInput

IServiceExInput::DestructServiceExInput property |  |  | space
This property has a Restful Webservice representation only! Destructs/invalidates this IServiceExInput interface instance. The counterpart property to generate an IServiceExInput interface instance is IGeneralInvoiceRequest::GetCreateServiceExInput. |  |  |
space
Restful webservice calling syntax |  |  |
[PUT] | /baseURL/ IServiceExInput/PutDestructServiceExInput
[JSON input data] | pIServiceExInput: | longValue, //interface address
[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
Remarks |  |  |
This property has a Restful Webservice representation only! |  |  |
space |


  • IServiceExInput
  • Tariffnum

IServiceExInput::Tariffnum property | space
GetTariffnum returns the tariff number ('001' or '007') for which the interface IServiceExInput was instantiated.
space
Restful webservice calling syntax
[GET] | /baseURL/ IServiceExInput/GetTariffnum?param
[param] pIServiceExInput= longValue
[JSON result data] pbstrTariffnum: "utf8StringValue"
[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
C/C++ calling syntax
[get] HRESULT | Tariffnum( BSTR *pbstrTariffnum );
[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
Calling argument description
[out,retval] BSTR | *pbstrTariffnum
space
Remarks
If SmartPointers are used than the function names and calls are rewritten by Microsoft into the form
  • BSTR *GetTariffnum(void);
space


  • Type definitions

Builtin, composite & enumeration types |  | V5.00/27 Nov 2024
The following list shows ans defines all used data types either basic builtin, composite or enumeration types that are used in the interface of the ATL COM module. |  | space
space
Data types |  | 41 types
[enumeration] AddressType | Enumerates the defined types of addresses. |
[enumeration] BillingRoleType | Enumerates the defined billing role types used in the auxiliary IServiceExInput interface. |
[builtin] BSTR | A BSTR, known as basic string or binary string, is a pointer to a wide character string used by Automation data manipulation functions |
[enumeration] CantonType | Enumerates the defined Swiss cantons as well as countries close to the border. |
[builtin] DATE | DATE is denoting a date and time represented by a double-precision number, where midnight, January 1st, 1900 has the value 2.0, January 2nd, 1900 is 3.0, and so on. |
[enumeration] DiagnosisType | Enumerates the defined diagnosis coding systems. |
[enumeration] DocumentType | Enumerates the defined document types describing the semantic content of a document by a terminal set of tokens |
[builtin] double | An 8-byte IEEE real value. |
[enumeration] EsrType | Enumerates the defined ESR types. |
[enumeration] GenderType | Enumerates the defined social gender types encoded by a terminal set of tokens |
[enumeration] generationAttributes | List of options with which the standard generation of the XML infoset and/or print process can be oversteered. |
[enumeration] HospitalAdmissionType | HospitalAdmissionType defines the DRG grouper relevant admission reasons into the hospital encoded by a terminal set of tokens |
[enumeration] HospitalDischargeType | HospitalDischargeType defines the DRG grouper relevant discharge reasons from the hospital encoded by a terminal set of tokens |
[enumeration] HospitalizationClass | Enumerates the defined classes/types of hospitalization |
[enumeration] HospitalizationMode | Enumerates the defined modes/indications of the hospitalization |
[enumeration] HospitalizationType | Enumerates the defined types/reasons of the hospitalization |
[enumeration] HospitalProviderType | HospitalProviderType defines the DRG grouper relevant provider types encoded by a terminal set of tokens |
[builtin] HRESULT | The HRESULT data type is a 32-bit value that is used to describe an error or warning |
[builtin] IAddress | IAddress interface object. |
[builtin] IGeneralInvoiceRequest | IGeneralInvoiceRequest interface object. |
[builtin] IGeneralInvoiceResult | IGeneralInvoiceResult interface object. |
[builtin] IServiceExInput | Auxiliary IServiceExInput interface object |
[enumeration] LanguageType | Enumerates all supported languages. |
[enumeration] LawType | Enumerates the supported legal law set. |
[builtin] long | A 4-byte integer value. |
[enumeration] MedicalRoleType | Enumerates the defined medical role types used in the auxiliary IServiceExInput interface. |
[enumeration] ModusType | Enumerates the defined operation modus types |
[enumeration] PartnerType | PartnerType is the type/flavor of a partner encoded by a terminal set of tokens |
[enumeration] PlaceType | Enumerates the defined place types where the main provider is located |
[enumeration] RequestSubtype | RequestSubtype specifies teh request with respect to its modification from the standard data space |
[enumeration] RequestType | Enumerates the defined principle types of request encoded by a terminal set of tokens |
[enumeration] ResidenceAfterDischarge | Enumerates the defined discharge locations where the patient is going to encoded by a terminal set of tokens |
[enumeration] ResidenceBeforeAdmission | Enumerates the defined admission locations where the patient is coming from encoded by a terminal set of tokens |
[enumeration] RoleType | Enumerates the defined role types that the main provider is best categorized |
[enumeration] SexType | Enumerates the defined medical sex types encoded by a terminal set of tokens |
[enumeration] SideType | Enumerates the defined body side types. |
[enumeration] TiersModeType | Enumerates the defined tiers modes. |
[enumeration] TreatmentReasonType | Enumerates the list of defined treatment reasons. |
[enumeration] TreatmentType | Enumerates the top level treatment types. |
[builtin] VARIANT_BOOL | A 16 bit Boolean (True/False) value was specified |
[enumeration] YesNoType | Boolean enumerator. |
space |


  • Type definitions
  • AddressType

AddressType enumeration type |  |
Enumerates the defined types of addresses. |  | space
space
Set of enumeration values |  | 3 elements
enAddressUndefined: 0 | Address type is undefined or unknown. |
enAddressPerson: 1 | Address of a person |
enAddressCompany: 2 | Address of a company |
space


  • Type definitions
  • BillingRoleType

BillingRoleType enumeration type |  |
Enumerates the defined billing role types used in the auxiliary IServiceExInput interface. |  | space
space
Set of enumeration values |  | 4 elements
enBillingRoleBoth: 0 | Billing of medical and technical part. |
enBillingRoleMT: 1 | Billing of medical part only. |
enBillingRoleTT: 2 | Billing of technical part only. |
enBillingRoleNone: 3 | Billing none. |
space


  • Type definitions
  • BSTR

BSTR type |
A BSTR, known as basic string or binary string, is a pointer to a wide character string used by Automation data manipulation functions. BSTRs are wide, double-byte (Unicode) strings on 32-bit Windows platforms. | space
space
space


  • Type definitions
  • CantonType

CantonType enumeration type |  |
Enumerates the defined Swiss cantons as well as countries close to the border. |  | space
space
Set of enumeration values |  | 32 elements
enCantonUndefined: 0 | Undefined or unknown canton. |
enAG: 1 | The Swiss canton is AG |
enAI: 2 | The Swiss canton is AI |
enAR: 3 | The Swiss canton is AR |
enBE: 4 | The Swiss canton is BE |
enBL: 5 | The Swiss canton is BL |
enBS: 6 | The Swiss canton is BS |
enFR: 7 | The Swiss canton is FR |
enGE: 8 | The Swiss canton is GE |
enGL: 9 | The Swiss canton is GL |
enGR: 10 | The Swiss canton is GR |
enJU: 11 | The Swiss canton is JU |
enLU: 12 | The Swiss canton is LU |
enNE: 13 | The Swiss canton is NE |
enNW: 14 | The Swiss canton is NW |
enOW: 15 | The Swiss canton is OW |
enSG: 16 | The Swiss canton is SG |
enSH: 17 | The Swiss canton is SH |
enSO: 18 | The Swiss canton is SO |
enSZ: 19 | The Swiss canton is SZ |
enTG: 20 | The Swiss canton is TG |
enTI: 21 | The Swiss canton is TI |
enUR: 22 | The Swiss canton is UR |
enVD: 23 | The Swiss canton is VD |
enVS: 24 | The Swiss canton is VS |
enZG: 25 | The Swiss canton is ZG |
enZH: 26 | The Swiss canton is ZH |
enLiechtenstein: 27 | The country is Liechtenstein |
enAustria: 28 | The country is Austria |
enGermany: 29 | The country is Germany |
enItaly: 30 | The country is Italy |
enFrance: 31 | The country is France |
space


  • Type definitions
  • DATE

DATE type |
DATE is denoting a date and time represented by a double-precision number, where midnight, January 1st, 1900 has the value 2.0, January 2nd, 1900 is 3.0, and so on. | space
space
space


  • Type definitions
  • DiagnosisType

DiagnosisType enumeration type |  |
Enumerates the defined diagnosis coding systems. |  | space
space
Set of enumeration values |  | 7 elements
enDiagnosisICD: 0 | The diagnosis is of type "ICD10" |
enDiagnosisCantonal: 1 | The diagnosis is of type "Cantonal diagnosis" |
enDiagnosisByContract: 2 | The diagnosis is of type "By contract" |
enDiagnosisFreeText: 3 | The diagnosis is of type "Free Text" |
enDiagnosisBirthdefect: 4 | The diagnosis is of type "Birth defect" |
enDiagnosisICPC: 5 | The diagnosis is of type "ICPC2" (International Classification of Primary Care) |
enDiagnosisDRG: 6 | The diagnosis is of type "DRG service" |
space


  • Type definitions
  • DocumentType

DocumentType enumeration type |  |
Enumerates the defined document types describing the semantic content of a document by a terminal set of tokens |  | space
space
Set of enumeration values |  | 9 elements
enDocumentReport: 0 | the semantic content is of type Report |
enDocumentImage: 1 | the semantic content is of type Image |
enDocumentUnemployability: 2 | the semantic content is of type Unemployability |
enDocumentQuestionnaire: 3 | the semantic content is of type Questionnaire |
enDocumentNotification: 4 | the semantic content is of type Notification |
enDocumentPlanning: 5 | the semantic content is of type Service Planning |
enDocumentPrescription: 6 | the semantic content is of type Prescription |
enDocumentSalaryCession: 7 | the semantic content is of type SalaryCession |
enDocumentUndefinedDoc: 8 | the semantic content is unknown or undefined and thus the type is Undefined Document |
space


  • Type definitions
  • double

double type |
An 8-byte IEEE real value. | space
space
space


  • Type definitions
  • EsrType

EsrType enumeration type |  |
Enumerates the defined ESR types. |  | space
space
Set of enumeration values |  | 4 elements
enEsrQR: 5 | The ESR is of type ESR with QR datacode. |
enEsrQRplus: 6 | The ESR is of type ESR with QR+ datacode, where the + denotes an ESR without an amount. |
enRedPayinSlipQR: 7 | The ESR is of type ESRRed with QR datacode. This type is the successor of ESRRed PayinSlip. |
enRedPayinSlipQRPlus: 8 | The ESR is of type ESRRed with QR+ datacode, where the + denotes an ESR without an amount. This type is the successor of ESRRed PayinSlip. |
space


  • Type definitions
  • GenderType

GenderType enumeration type |  |
Enumerates the defined social gender types encoded by a terminal set of tokens |  | space
space
Set of enumeration values |  | 3 elements
enGenderMale: 0 | the social gender is male |
enGenderFemale: 1 | the social gender is female |
enGenderDiverse: 2 | the social gender is diverse |
space


  • Type definitions
  • generationAttributes

generationAttributes enumeration type |  |
List of options with which the standard generation of the XML infoset and/or print process can be oversteered. |  | space
space
Set of enumeration values |  | 14 elements
enExcludeESRInPrint: 1 | Exclude all ESR parts from printing |
enExcludeCreditorInPrint: 2 | Exclude the creditor's address from printing |
enExcludeCreditorNameInPrint: 4 | Exclude the creditor's name and first name/department from printing |
enExcludeDebitorInPrint: 32 | Exclude the debitor's address from printing |
enExcludeDebitorNameInPrint: 64 | Exclude the debitor's name and first name/department from printing |
enExcludeAccountingInPrint: 128 | Exclude the accounting data outside the ESR coding lines from printing |
enExcludeAmountInPrint: 512 | Exclude the amount from printing. Note that this is not the same as settings an ESR+ method (ESR without amount) since the amount is still coded into the ESR coding line. |
enExcludeRemarksInPrint: 1024 | Exclude the remarks (if defined) from printing. This is only relevant for enRedPayinSlip and enRedPayinSlipQR |
enIncludeGeometryInPrint: 8192 | Include the ESR/ES geometry in the printing. This option in principle qualifies for "home invoicing". However, most debitors do no possess a color printer allowing to print the geometry bleed-off. Thus the standard compliance can not be guaranteed. |
enExcludeQRPaymentMarkingInPrint: 16384 | Exclude the A6 marking of the new ESR-QR in printing due to a pre-printed invoice sheet with a perforation of that A6 part. |
enGenerateXMLWithoutDocuments: 65536 | The XML infoset is generated without any documents even if such documents have been added in the IGeneralInvoiceRequest::AddDocument method. |
enGenerateXMLWithoutSignature: 131072 | The XML infoset is generated without applying a signature even if the signature parameters have been set in the IGeneralInvoiceRequest::SetTransport method. |
enGenerateXMLWithoutEncryption: 262144 | The XML infoset is generated without applying encryption even if the encryption parameters have been set in the IGeneralInvoiceRequest::SetTransport method. |
enGenerateDowngradeToV450: 2097152 | The XML infoset or print output of type generalInvoiceRequest_450 is generated (a downgrade is performed) instead of the standard type generalInvoiceRequest_500. This explicitly implies that any data unusable for the downgraded standard is silently discarded. |
space


  • Type definitions
  • HospitalAdmissionType

HospitalAdmissionType enumeration type |  |
HospitalAdmissionType defines the DRG grouper relevant admission reasons into the hospital encoded by a terminal set of tokens |  | space
space
Set of enumeration values |  | 5 elements
enHospitalAdmissionNormal: 0 | the admission reason is normal |
enHospitalAdmissionRelocatedMore24h: 1 | the admission reason is transferred but stayed more than 24h in the relocating hospital |
enHospitalAdmissionRelocatedLess24h: 2 | the admission reason is transferred but stayed less than 24h in the relocating hospital |
enHospitalAdmissionBirth: 3 | the admission reason is due to a birth |
enHospitalAdmissionUnknown: 4 | the admission reason is unknown |
space


  • Type definitions
  • HospitalDischargeType

HospitalDischargeType enumeration type |  |
HospitalDischargeType defines the DRG grouper relevant discharge reasons from the hospital encoded by a terminal set of tokens |  | space
space
Set of enumeration values |  | 5 elements
enHospitalDischargeNormal: 0 | the discharge reason is normal |
enHospitalDischargeTransferred: 1 | the discharge reason is transferred to another hospital |
enHospitalDischargeDeceased: 2 | the patient deceased during the stay |
enHospitalDischargeTerminated: 3 | the patient was discharged against medical advice |
enHospitalDischargeUnknown: 4 | the discharge reason is unknown |
space


  • Type definitions
  • HospitalizationClass

HospitalizationClass enumeration type |  |
Enumerates the defined classes/types of hospitalization |  | space
space
Set of enumeration values |  | 5 elements
enGeneral: 0 | The general hospitalization class is used |
enSemiPrivate: 1 | The semi-private hospitalization class is used |
enPrivate: 2 | The private hospitalization class is used |
enComfort: 3 | The comfort hospitalization class is used |
enFreeMDChoice: 4 | The hospitalization class with free choice of physician is used |
space


  • Type definitions
  • HospitalizationMode

HospitalizationMode enumeration type |  |
Enumerates the defined modes/indications of the hospitalization |  | space
space
Set of enumeration values |  | 3 elements
enCantonal: 0 | Mode of hospitalization is cantonal |
enIndicated: 1 | Mode of hospitalization is non-cantonal (person living in another canton then treated) but indicated |
enNonIndicated: 2 | Mode of hospitalization is non-cantonal (person living in another canton then treated) and not indicated |
space


  • Type definitions
  • HospitalizationType

HospitalizationType enumeration type |  |
Enumerates the defined types/reasons of the hospitalization |  | space
space
Set of enumeration values |  | 2 elements
enRegular: 0 | The reason of the hospitalization is regular |
enEmergency: 1 | The reason of the hospitalization is an emergency |
space


  • Type definitions
  • HospitalProviderType

HospitalProviderType enumeration type |  |
HospitalProviderType defines the DRG grouper relevant provider types encoded by a terminal set of tokens |  | space
space
Set of enumeration values |  | 6 elements
enHospitalProviderAcuteHospital: 0 | the provider type is Acute Hospital |
enHospitalProviderBirthhouse: 1 | the provider type is Birth House |
enHospitalProviderPsychiatricClinic: 2 | the provider type is Psychiatric Clinic |
enHospitalProviderRehabClinic: 3 | the provider type is Rehabilitation Clinic |
enHospitalProviderMedicalPractice: 4 | the provider type is Medical Practice |
enHospitalProviderOther: 5 | the provider type is Other that is none of the above |
space


  • Type definitions
  • HRESULT

HRESULT type |
The HRESULT data type is a 32-bit value that is used to describe an error or warning | space
space
space


  • Type definitions
  • IAddress

IAddress type |
IAddress interface object. | space
space
space


  • Type definitions
  • IGeneralInvoiceRequest

IGeneralInvoiceRequest type |
IGeneralInvoiceRequest interface object. | space
space
space


  • Type definitions
  • IGeneralInvoiceResult

IGeneralInvoiceResult type |
IGeneralInvoiceResult interface object. | space
space
space


  • Type definitions
  • IServiceExInput

IServiceExInput type |
Auxiliary IServiceExInput interface object | space
space
space


  • Type definitions
  • LanguageType

LanguageType enumeration type |  |
Enumerates all supported languages. |  | space
space
Set of enumeration values |  | 3 elements
enGerman: 1 | The language is German |
enFrench: 2 | The language is French |
enItalian: 3 | The language is Italian |
space


  • Type definitions
  • LawType

LawType enumeration type |  |
Enumerates the supported legal law set. |  | space
space
Set of enumeration values |  | 6 elements
enKVG: 0 | KVG - "Krankenversicherungsgesetz" |
enUVG: 1 | UVG - "Unfallversicherungsgesetz" |
enMVG: 2 | MVG - "Militäversicherungsgesetz" |
enIVG: 3 | IVG - "Invalidenversicherungsgesetz" |
enVVG: 4 | VVG - "Versicherungsvertragsgesetz" |
enORG: 5 | ORG - "Obligationenrecht" This is primarily for invoices e.g. of dentists. |
space


  • Type definitions
  • long

long type |
A 4-byte integer value. | space
space
space


  • Type definitions
  • MedicalRoleType

MedicalRoleType enumeration type |  |
Enumerates the defined medical role types used in the auxiliary IServiceExInput interface. |  | space
space
Set of enumeration values |  | 2 elements
enMedicalRoleSelfEmployed: 0 | Employer (mostly in Medical practice) |
enMedicalRoleEmployee: 1 | Employee (mostly in Hospitals or Clinics) |
space


  • Type definitions
  • ModusType

ModusType enumeration type |  |
Enumerates the defined operation modus types |  | space
space
Set of enumeration values |  | 2 elements
enProduction: 0 | Production modus. |
enTest: 1 | Test modus - the data should not be forwarded to the receiver. |
space


  • Type definitions
  • PartnerType

PartnerType enumeration type |  |
PartnerType is the type/flavor of a partner encoded by a terminal set of tokens. The partner specification was primarily demanded by the "FinMa - Swiss Financial Market Supervisory Authority" to enhance the billing transparency in VVG cases. |  | space
space
Set of enumeration values |  | 16 elements
enEmployer: 1 | the role/flavor of the partner is employer |
enReferrer: 2 | the role/flavor of the partner is referrer |
enServiceProvider: 3 | the role/flavor of the partner is service provider|service responsible that is an entity that does provide a service or is responsible for the provision of the service |
enPrimaryClinician: 4 | the role/flavor of the partner is primary clinician that is a synonym of the main treating physician |
enLeadDoctor: 5 | the role/flavor of the partner is lead doctor that is an entity that is responsible for the whole case |
enAssistantPhysician: 6 | the role/flavor of the partner is an assistant physician in the current treatment |
enSeniorPhysician: 7 | the role/flavor of the partner is a senior physician in the current treatment |
enChiefPhysician: 8 | the role/flavor of the partner is a chief physician in the current treatment |
enSurgeon: 9 | the role/flavor of the partner is a surgeon in the current treatment. |
enAnaesthetist: 10 | the role/flavor of the partner is an anaesthetist in the current treatment |
enConsultantDoctor: 11 | the role/flavor of the partner is a consultant doctor in the current treatment |
enInternist: 12 | the role/flavor of the partner is an internist in the current treatment |
enCoCare: 13 | the role/flavor of the partner is a co-carer in the current treatment |
enRadiologist: 14 | the role/flavor of the partner is radiologist in the current treatment |
enNuclearMedicine: 15 | the role/flavor of the partner is a nuclear medicine specialist in the current treatment |
enOther: 16 | the role/flavor of the partner is other that is none of the specific pre-defined roles holds true |
space


  • Type definitions
  • PlaceType

PlaceType enumeration type |  |
Enumerates the defined place types where the main provider is located |  | space
space
Set of enumeration values |  | 5 elements
enPlacePractice: 1 | The service location is a practice |
enPlaceHospital: 2 | The service location is a hospital |
enPlaceLab: 4 | The service location is a laboratory |
enPlaceAssociation: 8 | The service location is in an association (like "Spitex") |
enPlaceCompany: 16 | The service location is a company |
space


  • Type definitions
  • RequestSubtype

RequestSubtype enumeration type |  |
RequestSubtype specifies teh request with respect to its modification from the standard data space. Such a modification can be seen as a request variation, subsuming a specific data set, where the set of discrete subtypes is encoded by a terminal set of tokens. |  | space
space
Set of enumeration values |  | 4 elements
enRequestSubtypeNormal: 0 | the subtype normal defines the standard (normal) XML infoset describing an ordinary invoice/reminder (Default) |
enRequestSubtypeCopy: 1 | the subtype copy qualifies the XML infoset as the exact copy of a previously defined XML infoset except for the copy flag |
enRequestSubtypeRefund: 2 | the subtype refund acts on a prior defined normal XML infoset notably sent to and paid by a health care insurance. In other words it is an announcement to the insurance company to pay back certain services of an invoice (qualified by a negative quantity), whereas the services with zero quantity are correctly invoiced |
enRequestSubtypeStorno: 3 | the subtype storno acts on a prior defined normal XML infoset by negating all quantities in order to cancel the invoice/reminder as a whole. |
space


  • Type definitions
  • RequestType

RequestType enumeration type |  |
Enumerates the defined principle types of request encoded by a terminal set of tokens |  | space
space
Set of enumeration values |  | 2 elements
enRequestInvoice: 0 | the request is of type invoice |
enRequestReminder: 1 | the request is of type reminder |
space


  • Type definitions
  • ResidenceAfterDischarge

ResidenceAfterDischarge enumeration type |  |
Enumerates the defined discharge locations where the patient is going to encoded by a terminal set of tokens |  | space
space
Set of enumeration values |  | 14 elements
enDischargeHome: 0 | the discharge location is home |
enDischargeHomeSpitex: 1 | the discharge location is home but having a spitex care as support |
enDischargeHospitalSame: 2 | the discharge location is the same hospital as the current location |
enDischargeHospitalOther: 3 | the discharge location is a different hospital to the current location |
enDischargeRetirementHome: 4 | the discharge location is a retirement home |
enDischargeNursingHome: 5 | the discharge location is a nursing home |
enDischargePsychiatricClinicSame: 6 | the discharge location is the same psychiatric clinic as the current location |
enDischargePsychiatricClinicOther: 7 | the discharge location is a different psychiatric clinic to the current location |
enDischargeRehabClinicSame: 8 | the discharge location is the same rehabilitation clinic as the current location |
enDischargeRehabClinicOther: 9 | the discharge location is a different rehabilitation clinic to the current location |
enDischargeBirthHouse: 10 | the discharge location is a birth house |
enDischargeCorrectionalFacility: 11 | the discharge location is a correctional facility: |
enDischargeOther: 12 | the discharge location is not mentioned above |
enDischargeUnknown: 13 | the discharge location is unknown |
space


  • Type definitions
  • ResidenceBeforeAdmission

ResidenceBeforeAdmission enumeration type |  |
Enumerates the defined admission locations where the patient is coming from encoded by a terminal set of tokens |  | space
space
Set of enumeration values |  | 14 elements
enAdmissionHome: 0 | the admission location is home |
enAdmissionHomeSpitex: 1 | the admission location is home but having a spitex care as support |
enAdmissionHospitalSame: 2 | the admission location is the same hospital as the current location |
enAdmissionHospitalOther: 3 | the admission location is a different hospital to the current location |
enAdmissionRetirementHome: 4 | the admission location is a retirement home |
enAdmissionNursingHome: 5 | the admission location is a nursing home |
enAdmissionPsychiatricClinicSame: 6 | the admission location is the same psychiatric clinic as the current location |
enAdmissionPsychiatricClinicOther: 7 | the admission location is a different psychiatric clinic to the current location |
enAdmissionRehabClinicSame: 8 | the admission location is the same rehabilitation clinic as the current location |
enAdmissionRehabClinicOther: 9 | the admission location is a different rehabilitation clinic to the current location |
enAdmissionBirthHouse: 10 | the admission location is a birth house |
enAdmissionCorrectionalFacility: 11 | the admission location is a correctional facility |
enAdmissionOther: 12 | the admission location is not mentioned above |
enAdmissionUnknown: 13 | the admission location is unknown |
space


  • Type definitions
  • RoleType

RoleType enumeration type |  |
Enumerates the defined role types that the main provider is best categorized |  | space
space
Set of enumeration values |  | 23 elements
enRolePhysician: 1 | The main provider is a physician |
enRolePhysiotherapist: 2 | The main provider is a physiotherapist This role includes therapeutic masseurs as well. |
enRoleChiropractor: 4 | The main provider is a chiropractor |
enRoleErgotherapist: 8 | The main provider is an ergotherapist |
enRoleNutritionist: 16 | The main provider is a nutritionist This role includes diet advisors, diabetic dietitian and diabetic advisors as well |
enRoleMidwife: 32 | The main provider is a midwife |
enRoleLogotherapist: 64 | The main provider is a logotherapist |
enRoleHospital: 128 | The main provider's address is that of a hospital. Therefore the "virtual" role is enRoleHospital and it qualifies the invoice/reminder as one from a hospital |
enRoleRehabClinic: 160 | The main provider's address is that of a rehabilitation clinic. Therefore the "virtual" role is enRoleRehabClinic and it qualifies the invoice/reminder as one from a rehabilitation clinic |
enRolePsychiatricClinic: 192 | The main provider's address is that of a psychiatric clinic. Therefore the "virtual" role is enRolePsychiatricClinic and it qualifies the invoice/reminder as one from a psychiatric clinic |
enRolePharmacist: 256 | The main provider is a pharmacist |
enRoleDentist: 512 | The main provider is a dentist This role includes dental hygienists as well. |
enRoleLabTechnician: 1024 | The main provider is a lab technician |
enRoleDentalTechnician: 2048 | The main provider is a dental technician |
enRoleOtherTechnician: 4096 | The main provider The main provider is a technician but neither a dental nor a lab technician This role includes (orthopedic) shoemakers as well |
enRolePsychologist: 16384 | The main provider a psychologist Note that psychiatrists would count as enRolePhysician |
enRoleWholesaler: 65536 | The main provider is a wholesaler |
enRoleNursingStaff: 131072 | The main provider is belonging to the nursing staff including nursing auxiliaries |
enRoleTransport: 262144 | The main provider accomplishes transports or carrier services This role includes ambulance transport as well. |
enRoleDruggist: 524288 | The main provider is a druggist |
enRoleNaturopathicDoctor: 1048576 | The main provider is a is naturopathic doctor. As per definition this is a doctor of non-conventional Western medicine/non-biomedicine. |
enRoleNaturopathicTherapist: 2097152 | The main provider is a is naturopathic therapist. As per definition this is a therapist of non-conventional Western medicine/non-biomedicine. This role includes wellness therapists as well. |
enRoleOther: 4194304 | The main provider has another role than defined here. Supply a role title in this case with a description of the role |
space


  • Type definitions
  • SexType

SexType enumeration type |  |
Enumerates the defined medical sex types encoded by a terminal set of tokens |  | space
space
Set of enumeration values |  | 2 elements
enMale: 0 | Male. |
enFemale: 1 | Female. |
space


  • Type definitions
  • SideType

SideType enumeration type |  |
Enumerates the defined body side types. |  | space
space
Set of enumeration values |  | 4 elements
enSideNone: 0 | No body side dependency known |
enSideLeft: 1 | Left body side is affected |
enSideRight: 2 | Right body side is affected |
enSideBoth: 3 | Both body sides are affected |
space


  • Type definitions
  • TiersModeType

TiersModeType enumeration type |  |
Enumerates the defined tiers modes. |  | space
space
Set of enumeration values |  | 3 elements
enTiersGarant: 0 | Tiers garant (TG) mode is used |
enTiersPayant: 1 | Tiers Payant (TP) mode is used |
enTiersSoldant: 2 | Tiers Soldant (TS) mode is used |
space


  • Type definitions
  • TreatmentReasonType

TreatmentReasonType enumeration type |  |
Enumerates the list of defined treatment reasons. |  | space
space
Set of enumeration values |  | 6 elements
enDisease: 0 | The treatment reason is due to a disease. |
enAccident: 1 | The treatment reason is due to an accident |
enMaternity: 2 | The treatment reason is due to maternity |
enPrevention: 3 | The treatment reason is due to a prevention. |
enBirthdefect: 4 | The treatment reason is due to a birth defect |
enUnknown: 5 | The treatment reason is unknown |
space


  • Type definitions
  • TreatmentType

TreatmentType enumeration type |  |
Enumerates the top level treatment types. |  | space
space
Set of enumeration values |  | 2 elements
enAmbulatory: 0 | Ambulatory (out-patient) treatment. |
enStationary: 1 | Stationary (in-patient) treatment. |
space


  • Type definitions
  • VARIANT_BOOL

VARIANT_BOOL type |
A 16 bit Boolean (True/False) value was specified. A value of 0xFFFF (all bits 1) indicates True; a value of 0 (all bits 0) indicates False. No other values are valid. | space
space
space


  • Type definitions
  • YesNoType

YesNoType enumeration type |  |
Boolean enumerator. |  | space
space
Set of enumeration values |  | 2 elements
enNo: 0 | No. |
enYes: 1 | Yes. |
space


 Sumex1 under a 64bit architecture...

All Sumex1 COM modules are written as 32bit managed C++ dll. As a consequence, a 64bit executable cannot load a 32bit COM dll into its process space due to the addressing differences.

Since some necessary underlying sub-modules are not available in a 64bit version, this problem must be addressed differently than by a 64bit compilation. As Microsoft suggests Sumex1 uses the out-of-process proxy approach where a 32bit COM server loads the 32bit COM dll into its process space and delegates each method call to the dll. Since a 32bit COM server exists in its own process space, the main 64bit process can handle the 64/32bit boundary without problems.

As a result, each 32bit Sumex1 COM dll has a 32bit COM server counterpart with the same name and an oopProxy prefix, e.g. oopProxyGeneralInvoiceRequestManager500.exe, where the prefix signifies the out-of-process proxy nature of the executable.

Any 64bit software now creates an instance of the 32bit oopProxy server and then calls the same methods and properties as with the 32bit COM dll. However, there is one crucial difference when using the oopProxy mechanism, namely the necessity to forcefully unload to the COM server at the end e.g. by using Marshal.ReleaseComObject() since the automatic garbage collection approach is too error prone.


 Major changes from V4.50 to V5.00...

The following list shows how the transition from V4.50 to V5.00 must be made in terms of new, changed, and deleted interface methods a/o arguments - ONLY THE MAJOR CHANGES ARE SHOWN.
IGeneralInvoiceRequestManager
changed: The IGeneralInvoiceRequestManager::LoadXML(...) method can natively load XML infosets of type generalInvoiceRequest_450.xsd and generalInvoiceRequest_500.xsd.
changed: The IGeneralInvoiceRequestManager::GetXML(...) method can natively produce XML infosets of type generalInvoiceRequest_500.xsd - the final version might be able to produce downgraded XML infosets of generalInvoiceRequest_450.xsd.
changed: The IGeneralInvoiceRequestManager::Print(...) method can natively print invoices/reminders of type generalInvoiceRequest_500.xsd - Downgrade to generalInvoiceRequest450 is not planned!
IGeneralInvoiceRequest
deleted: The BSTR bstrSpecialty variable denoting a FMH title is deleted from all semantic address roles like SetBiller, SetProvider, etc.
changed: Important routing handling of the bstrToGLN variable in IGeneralInvoiceRequest::SetTransport()
Mnemonics: 'printCenterGLN' and 'noRecipientGLN'
changed: Important printout processing control by the ePrintPatientInvoiceOnly variable in IGeneralInvoiceRequest::SetProcessing()
Please note that this variable has an effect on local printing as well as only the summary form is printed!
See as well How to make a Claiming deductible/franchise
changed:
  • IGeneralInvoiceRequestManager::LoadXML the TS input file
  • Important patch for claiming deductible/franchise from a TS process: set eTiersMode=enTiersGarant and dAmountPrepaid=(-1*amount_already_paid) in IGeneralInvoiceRequest::SetTiers() changes the input space accordingly (ePrintPatientInvoiceOnly=enYes, add 1 negative service with dAmountPrepaid, sets a remark)
  • Print or GetXML
changed: The method 'SetProvider' is deleted in favor of the methods IGeneralInvoiceRequest::SetProviderGLN and IGeneralInvoiceRequest::SetProviderZSR, respectively.
changed: The method 'SetBiller' is deleted in favor of the methods IGeneralInvoiceRequest::SetBillerGLN and IGeneralInvoiceRequest::SetBillerZSR, respectively.
changed: The methods 'SetReferrer' and 'SetEmployer' are deleted in favor of the IGeneralInvoiceRequest::AddPartner method (using ePartnerType=enReferrer or ePartnerType=enEmployer)
By using the different 'ePartnerType' one can use a lot more partners.
changed: The argument layout of IGeneralInvoiceRequest::AddService and IGeneralInvoiceRequest::AddServiceEx has changed significantly
new: The method IGeneralInvoiceRequest::AddXtraService newly allows to attach specific information to a prior defined service, e.g. to set an ICD10 code for an ambulatory case flate service ("Ambulante Fallpauschale")
new: The method IGeneralInvoiceRequest::AddDocument does no longer allow to define online documents.
IGeneralInvoiceResult
changed: All methods changed in the IGeneralInvoiceRequest interface produce the correspondingly changed result (analog) in the IGeneralInvoiceResult interface.
For example, IGeneralInvoiceRequest::SetProvider() becomes IGeneralInvoiceRequest::SetProviderGLN(), and therefore IGeneralInvoiceResult::GetProvider() becomes IGeneralInvoiceResult::GetProviderGLN().
IServiceExInput
new: The get property GetTariffnum was newly included giving back the used tariff num in the interface generation. Therefore,either '001' or 007' is returned.
IAddress
deleted: The fax element was deleted
new: The country element was newly included


 Code snippets for using the generalInvoiceRequestManager

Private Sub GeneralInvoiceRequestExampleButton_Click()

On Error GoTo Err_Trap

Dim bStatus As Boolean

'### init variables
Dim strFrom As String
strFrom = "2001001302112"
Dim strVia As String
strVia = "2001000012345"
Dim strTo As String
strTo = "2034567890000"
Dim dBirthdate As Date
dBirthdate = DateValue("1964-2-28")
Dim eSex As SexType
eSex = enMale
Dim eCanton As CantonType
eCanton = enBS
Dim eLaw As LawType
eLaw = enKVG
Dim eTreatType As TreatmentType
eTreatType = enAmbulatory
Dim eRole As RoleType
eRole = enRolePhysician
Dim ePlace As PlaceType
ePlace = enPlacePractice
Dim eTitle As String
eTitle = ""
Dim dTreatmentEnd As Date
dTreatmentEnd = DateValue("2025-01-31")
Dim dTreatmentStart As Date
dTreatmentStart = DateValue("2025-01-01")
Dim strPatientInsID As String
strPatientInsID = "123.45.678-012"
Dim eTreatmentReason As TreatmentReasonType
eTreatmentReason = enDisease
Dim eTreatmentType As TreatmentType
eTreatmentType = enAmbulatory
Dim eMedicalRole As MedicalRoleType
eMedicalRole = enMedicalRoleSelfEmployed
Dim eBillingRole As BillingRoleType
eBillingRole = enBillingRoleBoth
Dim strEanProvider As String
strEanProvider = "2034567890111"
Dim strEanResponsible As String
strEanResponsible = "2034567890333"

'### create the main GeneralInvoiceRequestManager interface
Dim generalInvoiceRequestManagerEx As GENERALINVOICEREQUESTMANAGER500Lib.GeneralInvoiceRequestManager
Set generalInvoiceRequestManagerEx = New GeneralInvoiceRequestManager

'### generate the dependend GeneralInvoiceRequest interface (allows to input data)
Dim generalInvoiceRequestEx As GENERALINVOICEREQUESTMANAGER500Lib.GeneralInvoiceRequest
Set generalInvoiceRequestEx = generalInvoiceRequestManagerEx.GeneralInvoiceRequest

'### start the input of data
generalInvoiceRequestEx.Initialize(enGerman)

'### generate some routing/transport as well as some identifying data (required for XML only)
bStatus = generalInvoiceRequestEx.SetTransport(strFrom, "", "", strVia, strTo, "")
bStatus = generalInvoiceRequestEx.SetPackage("GeneralInvoiceRequestExample", 10001, 4, "sumex1")

'### set processing instruction regarding printing at the intermediate's side (required for XML only)
bStatus = generalInvoiceRequestEx.SetProcessing(enNo, enNo, "")

'###############################################################################
'### start with the invoice relevant data, followed by the various address data
'###############################################################################
'### set data triple of the invoice (required)
bStatus = generalInvoiceRequestEx.SetRequest(eRole, ePlace, "", enRequestInvoice, enRequestSubtypeNormal,  _
                      "", "some optional remark")

'### set the tiers mode (TG or TP)  (required)
bStatus = generalInvoiceRequestEx.SetTiers(enTiersGarant,enNo, enNo, "", 0.0)

'### set invoice related data  (required)
bStatus = generalInvoiceRequestEx.SetInvoice("InvoiceID20170612", dTreatmentEnd, 0)

'### set the applicable law (required)
bStatus = generalInvoiceRequestEx.SetLaw(enKVG, 0, "", strPatientInsID)

'### create an address interface that is need to add all the following addresses
'### do not forget to initialize the IAddress interface befor using it
Dim addressEx As GENERALINVOICEREQUESTMANAGER500Lib.Address
Set addressEx = generalInvoiceRequestEx.CreateAddress

'### define the creditor address and the corresponding esr information (required)
addressEx.Initialize()
bStatus = addressEx.SetCompany("CreditorenAllianz beider Basel", " GmbH & Co KG", "")
bStatus = addressEx.SetPostal("Billerweg 128", "", "4002", "Basel", "BS", "", "")

Dim lPaymentPeriod As Long
lPaymentPeriod = 25
bStatus = generalInvoiceRequestEx.SetEsrQR(enEsrQR, "CH0930769016110591261", "21000003139471430009017", _
                                         "", addressEx, lPaymentPeriod)

'### define the biller of the invoice (required)
'### note that phone, fax and online data are optional
addressEx.Initialize
bStatus = addressEx.SetCompany("Biller AG", "Abteilung Inkasso", "")
bStatus = addressEx.SetPostal("Billerweg 128", "", "4414", "Frenkendorf", "BL", "", "")
bStatus = addressEx.AddPhone("956 99 00", "061", "", "")
bStatus = addressEx.SetOnline("info@biller.ch", "")
bStatus = generalInvoiceRequestEx.SetBillerGLN("2011234567890", addressEx)

'### define the provider of the medical data (required)
'### note that only the required parts are defined here
addressEx.Initialize
bStatus = addressEx.SetPerson("Aerztin", "Patricia", "Frau", "Dr. med.", "")
bStatus = addressEx.SetPostal("Arztgasse 17b5", "", "4000", "Basel", "BS","", "")
bStatus = generalInvoiceRequestEx.SetProviderGLN(strEanProvider,strEanProvider, _
                                                 addressEx)

'### define the health insurance (required in case of tiers payant only)
addressEx.Initialize
bStatus = addressEx.SetCompany("Krankenkasse AG", "Sektion Basel", "")
bStatus = addressEx.SetPostal("Kassengraben 222", "", "4000", "Basel", "BS", "", "")
bStatus = generalInvoiceRequestEx.SetInsurance("2034567890222", addressEx)

'### define the patient (required)
'### note that more data are needed here (sex, birthdate,ssn). data from the insurance
'### card can be supplied as well
addressEx.Initialize
bStatus = addressEx.SetPerson("Muster", "Peter", "Herr", "", "c/o Mieter Karl")
bStatus = addressEx.SetPostal("Musterstrasse 5", "", "7304", "Maienfeld", "GR", "", "")
bStatus = generalInvoiceRequestEx.SetPatient(eSex, enGenderDiverse, dBirthdate, "756.1234.5678.90", addressEx)

'### define a referrer if any (optional)
addressEx.Initialize
bStatus = addressEx.SetPerson("Ueberweiser", "Herbert", "Herr", "Dr. med.", "")
bStatus = addressEx.SetPostal("Referrerstrasse 11", "", "5000", "Aarau", "AG", "", "")
bStatus = generalInvoiceRequestEx.AddPartner(enReferrer,"","2034567890333", "R-2345-67", addressEx)

'### define the employer of the patient (optional)
addressEx.Initialize
bStatus = addressEx.SetCompany("Arbeitgeber AG", "R&D", "")
bStatus = addressEx.SetPostal("Arbeitsplatz 3-5", "", "4410", "Liestal", "BL", "")
bStatus = generalInvoiceRequestEx.AddPartner(enEmployer,"","7600123456789", "", addressEx)

'###############################################################################
'### define some treatment data for an ambulatory case and supply a drug service
'### and a Tarmed consultation
'###############################################################################
'### set treatment information (required)
bStatus = generalInvoiceRequestEx.SetTreatment("","",dTreatmentStart, dTreatmentEnd, eCanton, _
                                               eTreatmentType, eTreatmentReason,0,0)

'### add a diagnosis (optional)
bStatus = generalInvoiceRequestEx.AddDiagnosis(enDiagnosisCantonal, "G1", "Einfacher Infekt")

'### add a drug service (auto expansion of TP needs an installed validator)
Dim lID as Long
bStatus = generalInvoiceRequestEx.AddService("402", "7680573380018", "", _
                            1, 1, 1, _
                            dTreatmentStart, 0, _
                            strEanProvider, strEanResponsible, enSideNone, _
                            "Co Amoxi Mepha, Disp Tabl 625 mg, 10 Stk", 27.20, _
                            1, 1, 27.20, 0, _
                            "", _
                            "M100.2", enYes, 0, _
                            lID)

'###############################################################################
'### add ServiceExInput data - the tarmed validator is required here and must be
'### installed. Furthermore to input services via the AddServiceEx method, the
'### auxiliary interface ServiceExInput must be used
'###############################################################################
Dim serviceInputEx As ServiceExInput
Set serviceInputEx = generalInvoiceRequestEx.CreateServiceExInput("001")

'### define the various data for the tarmed validation later on - cf tarmedValidator usage
serviceInputEx.ExternalFactor_MT = 1
serviceInputEx.ExternalFactor_TT = 1

bStatus = serviceInputEx.SetPhysician(eMedicalRole,eBillingRole,strEanProvider,strEanResponsible,"M100.2")
bStatus = serviceInputEx.SetPatient(dBirthdate, eSex)

Dim strEanSection As String
strEanSection = "7634567890000"
bStatus = serviceInputEx.SetTreatment(eCanton, eLaw, eTreatmentType, strEanSection)

'### add a Tarmed consultation service triple. Note that TP and service text are auto expaned
'### by the validator based on the remaining input data
Dim lSession As Long
lSession = 1
Dim lStatus As Long
bStatus = generalInvoiceRequestEx.AddServiceEx(serviceInputEx, "001", "00.0010", "", _
                                1, lSession, 1, _
                                dTreatmentStart, dTreatmentStart, _
                                enSideNone, "", _
                                0, 0.92, 1, 1, 0, _
                                0, 0.92, 1, 1, 0, _
                                0, 0, _
                                "", enNo, 0, _
                                lID)

bStatus = generalInvoiceRequestEx.AddServiceEx(serviceInputEx, "001", "00.0020", "00.0010", _
                                1, lSession, 1, _
                                dTreatmentStart, 0,_
                                enSideNone, "", _
                                0, 0.92, 1, 1, 0, _
                                0, 0.92, 1, 1, 0, _
                                0, 0, _
                                "", enNo, 0, _
                                lID)

bStatus = generalInvoiceRequestEx.AddServiceEx(serviceInputEx, "001", "00.0030", "00.0010", _
                                1, lSession, 1, _
                                dTreatmentStart, 0, _
                                enSideNone, "", _
                                0, 0.92, 1, 1, 0, _
                                0, 0.92, 1, 1, 0, _
                                0, 0, _
                                "", enNo, 0, _
                                lID)

'### finalize the input
Dim dRoundDifference As Double
bStatus = generalInvoiceRequestEx.Finalize(dRoundDifference)

'### preview the invoice out as defined by the data
Dim lTimestamp As Interger
Dim generalInvoiceResultEx As GENERALINVOICEREQUESTMANAGER500Lib.GeneralInvoiceResult
bStatus = generalInvoiceRequestManagerEx.Print("",0,enYes,enYes,  _
                                  lTimestamp,generalInvoiceResultEx)
Set generalInvoiceResultEx = Nothing

'### finally produce the XML infoset
'### note that the interface generalInvoiceResultEx is returned by the method
'### if the call was successful - it must not be created!
Dim lGenerationAttribute As Long
lGenerationAttribute = 0
Dim lValidationError As Long
Dim strXMLFile As String
Dim strUsedXSDSchema As String
bStatus = generalInvoiceRequestManagerEx.GetXML(lGenerationAttribute, strXMLFile, lValidationError, _
                                                lTimestamp, strUsedXSDSchema, generalInvoiceResultEx)

'### copy the XML infoset away
Dim strTargetFile As String
strTargetFile = "C:\\GeneralInvoiceRequestExample.xml"
FileCopy strXMLFile, strTargetFile

'### relase all resources
Set serviceInputEx = Nothing
Set addressEx = Nothing
Set generalInvoiceResultEx = Nothing
Set generalInvoiceRequestEx = Nothing
Set generalInvoiceRequestManagerEx = Nothing

Exit Sub

'### error situation
Err_Trap:
    MsgBox "Error: " & Err.Description, vbCritical, _
           "Opps! Error" & Str$(Err.Number)

'### release all resources
Set serviceInputEx = Nothing
Set addressEx = Nothing
Set generalInvoiceResultEx = Nothing
Set generalInvoiceRequestEx = Nothing
Set generalInvoiceRequestManagerEx = Nothing

End Sub

private void generalInvoiceRequestExampleButton_Click()
{
    ServiceExInput serviceInputEx;
    GENERALINVOICEREQUESTMANAGER500Lib.Address addressEx;
    GENERALINVOICEREQUESTMANAGER500Lib.GeneralInvoiceRequest generalInvoiceRequestEx;
    GENERALINVOICEREQUESTMANAGER500Lib.GeneralInvoiceRequestManager generalInvoiceRequestManagerEx;
    GENERALINVOICEREQUESTMANAGER500Lib.GeneralInvoiceResult generalInvoiceResultEx;

    try
    {
        bool bStatus;
        // ### init variables
        string strFrom = "2001001302112";
        string strVia = "2001000012345";
        string strTo = "2034567890000";
        DateTime dBirthdate = DateTime.ParseExact("1964-02-28", "yyyy-MM-dd",
                                                  System.Globalization.CultureInfo.InvariantCulture);
        SexType eSex = SexType.enMale;
        CantonType eCanton = CantonType.enBS;
        LawType eLaw = LawType.enKVG;
        TreatmentType eTreatType = TreatmentType.enAmbulatory;
        RoleType eRole = RoleType.enRolePhysician;
        PlaceType ePlace = PlaceType.enPlacePractice;
        string eTitle = "";
        DateTime dTreatmentEnd = DateTime.ParseExact("2025-01-31", "yyyy-MM-dd",
                                                     System.Globalization.CultureInfo.InvariantCulture);
        DateTime dTreatmentStart = DateTime.ParseExact("2025-01-01", "yyyy-MM-dd",
                                                       System.Globalization.CultureInfo.InvariantCulture);
        string strPatientInsID = "123.45.678-012";
        TreatmentReasonType eTreatmentReason = TreatmentReasonType.enDisease;
        TreatmentType eTreatmentType = TreatmentType.enAmbulatory;
        MedicalRoleType eMedicalRole = MedicalRoleType.enMedicalRoleSelfEmployed;
        BillingRoleType eBillingRole = BillingRoleType.enBillingRoleBoth;
        string strEanProvider = "2034567890111";
        string strEanResponsible = "2034567890333";

        // ### create the main GeneralInvoiceRequestManager interface
        generalInvoiceRequestManagerEx = new GeneralInvoiceRequestManager();

        // ### generate the dependend GeneralInvoiceRequest interface (allows to input data)
        generalInvoiceRequestEx = generalInvoiceRequestManagerEx.GeneralInvoiceRequest;

        // ### start the input of data
        generalInvoiceRequestEx.Initialize(LanguageType.enGerman);

        // ### generate some routing/transport  as well as some identifying data (required for XML only)
        bStatus = generalInvoiceRequestEx.SetTransport(strFrom, "", "", strVia, strTo, "");
        bStatus = generalInvoiceRequestEx.SetPackage("GeneralInvoiceRequestExample", 10001, 4, "sumex1");

        // ### set processing instruction regarding printing at the intermediate's side (required for XML only)
        bStatus = generalInvoiceRequestEx.SetProcessing(YesNoType.enNo, YesNoType.enNo, "");

        // ###############################################################################
        // ### start with the invoice relevant data, followed by the various address data
        // ###############################################################################
        // ### set data triple of the invoice (required)
        bStatus = generalInvoiceRequestEx.SetRequest(eRole, ePlace, "", enRequestInvoice, enRequestSubtypeNormal,
                              "", "some optional remark");

        // ### set the tiers mode (TG or TP)  (required)
        bStatus = generalInvoiceRequestEx.SetTiers(TiersModeType.enTiersGarant,enNo, enNo, "", 0.0);

        // ### set invoice related data  (required)
        bStatus = generalInvoiceRequestEx.SetInvoice("InvoiceID20170612", dTreatmentEnd, 0);

        // ### set the applicable law (required)
        bStatus = generalInvoiceRequestEx.SetLaw(LawType.enKVG, DateTime.MinValue, "", strPatientInsID);

        // ### create an address interface that is need to add all the following addresses
        // ### do not forget to initialize the IAddress interface befor using it
        addressEx = generalInvoiceRequestEx.CreateAddress;

        // ### define the creditor address and the corresponding esr information (required)
        addressEx.Initialize();
        bStatus = addressEx.SetCompany("CreditorenAllianz beider Basel", " GmbH & Co KG", "");
        bStatus = addressEx.SetPostal("Billerweg 128", "", "4002", "Basel", "BS", "", "");

        int lPaymentPeriod = 25;
        bStatus = generalInvoiceRequestEx.SetEsrQR(enEsrQR, "CH0930769016110591261", "21000003139471430009017",
                                         "", addressEx, lPaymentPeriod);

        // ### define the biller of the invoice (required)
        // ### note that phone, fax and online data are optional
        addressEx.Initialize();
        bStatus = addressEx.SetCompany("Biller AG", "Abteilung Inkasso", "");
        bStatus = addressEx.SetPostal("Billerweg 128", "", "4414", "Frenkendorf", "BL", "", "");
        bStatus = addressEx.AddPhone("956 99 00", "061", "", "");
        bStatus = addressEx.SetOnline("info@biller.ch", "");
        bStatus = generalInvoiceRequestEx.SetBillerGLN("2011234567890", addressEx);

        // ### define the provider of the medical data (required)
        // ### note that only the required parts are defined here
        addressEx.Initialize();
        bStatus = addressEx.SetPerson("Aerztin", "Patricia", "Frau", "Dr. med.", "");
        bStatus = addressEx.SetPostal("Arztgasse 17b5", "", "4000", "Basel", "BS", "", "");
        bStatus = generalInvoiceRequestEx.SetProviderGLN(strEanProvider,strEanProvider,addressEx);

        // ### define the health insurance (required in case of tiers payant only)
        addressEx.Initialize();
        bStatus = addressEx.SetCompany("Krankenkasse AG", "Sektion Basel", "");
        bStatus = addressEx.SetPostal("Kassengraben 222", "", "4000", "Basel", "BS", "", "");
        bStatus = generalInvoiceRequestEx.SetInsurance("2034567890222", addressEx);

        // ### define the patient (required)
        // ### note that more data are needed here (sex, birthdate,ssn) as well as insurance card data
        addressEx.Initialize();
        bStatus = addressEx.SetPerson("Muster", "Peter", "Herr", "", "c/o Mieter Karl");
        bStatus = addressEx.SetPostal("Musterstrasse 5", "", "7304", "Maienfeld", "", "");
        bStatus = generalInvoiceRequestEx.SetPatient(eSex, enGenderDiverse, dBirthdate, "756.1234.5678.90", addressEx);

        // ### define a referrer if any (optional)
        addressEx.Initialize();
        bStatus = addressEx.SetPerson("Ueberweiser", "Herbert", "Herr", "Dr. med.", "");
        bStatus = addressEx.SetPostal("Referrerstrasse 11", "", "5000", "Aarau", "AG", "", "");
        bStatus = generalInvoiceRequestEx.AddPartner(enReferrer,"","2034567890333", "R-2345-67", addressEx);

        // ### define the employer of the patient (optional)
        addressEx.Initialize();
        bStatus = addressEx.SetCompany("Arbeitgeber AG", "R&D", "");
        bStatus = addressEx.SetPostal("Arbeitsplatz 3-5", "", "4410", "Liestal", "BL", "", "");
        bStatus = generalInvoiceRequestEx.AddPartner(enEmployer,"","7600123456789", "", addressEx);

        // ###############################################################################
        // ### define some treatment data for an ambulatory case and supply a drug service
        // ### and a Tarmed consultation
        // ###############################################################################
        // ### set treatment information (required)
        bStatus = generalInvoiceRequestEx.SetTreatment("", "", dTreatmentStart, dTreatmentEnd,
                                                       eCanton, eTreatmentType, eTreatmentReason,
                                                       DateTime.MinValue,DateTime.MinValue);

        // ### add a diagnosis (optional)
        bStatus = generalInvoiceRequestEx.AddDiagnosis(DiagnosisType.enDiagnosisCantonal, "G1", "");

        int lID;
        // ### add a drug service (auto expansion of TP needs an installed validator)
        bStatus = generalInvoiceRequestEx.AddService("402", "7680573380018", "",
                                        1, 1,1,
                                        dTreatmentStart, DateTime.MinValue,enSideNone,
                                        strEanProvider, strEanResponsible,
                                        "Co Amoxi Mepha, Disp Tabl 625 mg, 10 Stk", 27.20,
                                        1, 1, 0, 0,
                                        "",
                                        "M100.2", YesNoType.enNo, 0,
                                        out lID);

        // ###############################################################################
        // ### add ServiceExInput data - the tarmed validator is required here and must be
        // ### installed. Furthermore to input services via the AddServiceEx method, the
        // ### auxiliary interface ServiceExInput must be used
        // ###############################################################################
        serviceInputEx = generalInvoiceRequestEx.get_CreateServiceExInput("001");

        // ### define the various data for the tarmed validation later on - cf tarmedValidator usage
        serviceInputEx.ExternalFactor_MT = 1;
        serviceInputEx.ExternalFactor_TT = 1;

        bStatus = serviceInputEx.SetPhysician(eMedicalRole,eBillingRole,strEanProvider,strEanResponsible,"M100.2");
        bStatus = serviceInputEx.SetPatient(dBirthdate, eSex);

        string strEanSection = "7634567890000";
        bStatus = serviceInputEx.SetTreatment(eCanton, eLaw, eTreatmentType, strEanSection);

        // ### add a Tarmed consultation service triple. Note that TP and service text are auto expaned
        // ### by the validator based on the remaining input data
        int lSession = 1;
        int lStatus;

        bStatus = generalInvoiceRequestEx.AddServiceEx(serviceInputEx, "001", "00.0010", "",
                                        1, lSession,1,
                                        dTreatmentStart, DateTime.MinValue,
                                        SideType.enSideNone, "",
                                        0, 0.92, 1, 1,0,
                                        0, 0.92, 1, 1,0,
                                        0, 0,
                                        "", YesNoType.enNo, 0,
                                        out lID);

        bStatus = generalInvoiceRequestEx.AddServiceEx(serviceInputEx, "001", "00.0020", "00.0010",
                                        1, lSession,1,
                                        dTreatmentStart, DateTime.MinValue,
                                        SideType.enSideNone, "",
                                        0, 0.92, 1, 1,0,
                                        0, 0.92, 1, 1,0,
                                        0, 0,
                                        "", YesNoType.enNo, 0,
                                        out lID);

        bStatus = generalInvoiceRequestEx.AddServiceEx(serviceInputEx, "001", "00.0030", "00.0010",
                                        1, lSession,1,
                                        dTreatmentStart, DateTime.MinValue,
                                        SideType.enSideNone, "",
                                        0, 0.92, 1, 1, 0,
                                        0, 0.92, 1, 1, 0,
                                        0, 0,
                                        "", YesNoType.enNo, 0,
                                        out lID);

        // ### finalize the input
        double dRoundDifference;
        bStatus = generalInvoiceRequestEx.Finalize(out dRoundDifference);

        // ### finally produce the XML infoset
        // ### note that the interface generalInvoiceResultEx is returned by the method
        // ### if the call was successful - it must not be created!
        int lGenerationAttribute = 0;
        int lValidationError;
        int lTimestamp = 0;

        string strXMLFile;
        string strUsedXSDSchema;
        bStatus = generalInvoiceRequestManagerEx.GetXML(lGenerationAttribute, out strXMLFile,
                                                        out lValidationError, ref lTimestamp,
                                                        out strUsedXSDSchema, out generalInvoiceResultEx);

        // ### copy the XML infoset away
        string strTargetFile = "GeneralInvoiceRequestExample.xml";
        System.IO.File.Copy(strXMLFile, strTargetFile);
    }
    catch (Exception ex)
    {
        MessageBox.Show("Opps! Error " + ex.ToString(), "OK");
    }

    finally
    {
        // ### relase all resources
        serviceInputEx = null;
        addressEx = null;
        generalInvoiceResultEx = null;
        generalInvoiceRequestEx = null;
        generalInvoiceRequestManagerEx = null;

    }
}


 General use of the generalInvoiceRequest ATL COM module

The IGeneralInvoiceRequestManager interface provides all the necessary tools to produce an invoice, a reminder or a credit advice for all roles and places.

Firstly, an instance of the IGeneralInvoiceRequest interface is created by the GetGeneralInvoiceRequest property. All the invoice/reminder related data and parameters can be set by the supplied interface methods as SetPatient, SetTreatment,...

Two auxiliary input interfaces IAddress and IServiceExInput are available for setting addresses and extended service related data (Tarmed is such a extended service type).

After all information is defined the invoice or reminder is printed or a XML infoset is produced which can be electronically transported to the recipient. In the latter case the invoice/reminder optionally can be signed and/or encrypted .

Due to he processing attributes "storno" and "copy" a previously generated invoice or reminder can be canceled or a copy can be produced (cf. Notes about processing attributes).

To get a staring point there is a Visual Basic code snippet provided that can be used for using the generalInvoiceRequest module.


 How to generate PDF archive files of an invoice

To generate PDF archive files of an invoice in the generalInvoiceRequestManager use
(PDF=PDF_file_to_generate;)
or
(PDF_NOPRINT=PDF_file_to_generate;)
as an object name in the Print method. The "PDF" token means to print the invoice and generate the PDF files, whereas the "PDF_NOPRINT" token only generates the PDF files without physical printing.
This object definition is only used while printing and is ignored in the preview mode!

In its simplest form e.g. in the generalInvoiceRequestManager code this means

     BSTR bstrPrintTemplate = "(PDF="+bstrPDFFile+";)";

     IGeneralInvoiceRequestManager::Print(bstrPrintTemplate,...);
in order to generate a PDF archive file of the "TP Rechnung" or the "Patienten-Rechnung" AND "Rückforderungsbeleg" in the TG case.
If two separated PDF archive files should be generated in the TG case ("Patienten-Rechnung" and "Rückerstattungsbeleg") then produce a comma separated list of PDF file names e.g.

     BSTR bstrPrintTemplate = "(PDF="+bstrPDFFile1+","+bstrPDFFile2+";)";

     IGeneralInvoiceRequestManager::Print(bstrPrintTemplate,...);

Since the PDF generation is not the main purpose of the Print method this PDF feature has NO error propagation. The generation is done on a best effort basis, errors are only dumped to the log file!
Boundary conditions:
  • Only active in printing mode
  • No error propagation
  • The supplied PDF archive name(s) must not exist
  • The directory where the PDF is stored must be writable (EMF files are temporarily generated and delete there.)


 How to best make...

The following list describes the easiest way to generate e.g. a reminder or storno request given that the initial invoice was successfully produced and the XML infoset invoiceXML was archived on a local disk.

copy of an invoice
This can be accomplished by calling the following 4 methods:
  1. IGeneralInvoiceRequestManager::LoadXML using invoiceXML as input file
  2. IGeneralInvoiceResult::GetRequest to retrieve the parameters
  3. IGeneralInvoiceRequest::SetRequest with eRequestSubtype=enRequestSubtypeCopy
  4. IGeneralInvoiceRequestManager::GetXML
storno of an invoice
This can be accomplished by calling the following 5 methods:
  1. IGeneralInvoiceRequestManager::LoadXML using invoiceXML as input file
  2. IGeneralInvoiceResult::GetRequest to retrieve the parameters
  3. IGeneralInvoiceRequest::SetRequest with eRequestSubtype=enRequestSubtypeStorno
  4. Possibly IGeneralInvoiceRequest::SetTransport with bstrToGLN='noRecipientGLN'
  5. IGeneralInvoiceRequestManager::GetXML
refund of a invoice (TP only)
This can be accomplished by calling the following 4 methods:
  1. IGeneralInvoiceRequestManager::LoadXML using invoiceXML as input file
  2. IGeneralInvoiceResult::GetRequest to retrieve the parameters
  3. IGeneralInvoiceRequest::SetRequest with eRequestSubtype=enRequestSubtypeRefund
    and defining the variable bstrRefundList="ID1, ID2,..."
  4. IGeneralInvoiceRequestManager::GetXML
create a reminder
This can be accomplished by calling the following 3 methods:
  1. IGeneralInvoiceRequestManager::LoadXML using invoiceXML as input file
  2. IGeneralInvoiceRequest::SetReminder using lRequestTimestamp=0
  3. IGeneralInvoiceRequestManager::GetXML - store as reminderXML and possibly lRequestTimestamp
Claiming deductible/franchise
This can be accomplished by calling the following 3 methods:
  1. IGeneralInvoiceRequestManager::LoadXML using reminderXML as input file
  2. IGeneralInvoiceRequest::SetTiers with eTiersMode=enTiersGarant
    and dAmountPrepaid= -'amount already paid' (negative amount!!)
  3. IGeneralInvoiceRequestManager::GetXML or IGeneralInvoiceRequestManager::Print


 How to print webstamps onto a invoice/reminder request

To print a webstamp onto a invoice/reminder request in the generalInvoiceRequestManager use a special print object name (cf. Syntax of the printTemplate variable for an overview).

(WEBSTAMP=file_path_of_BMP_file;)
as a print object name on the printTemplate variable of the Print method.

In its simplest form e.g. in the GeneralInvoiceRequestManager code this means

     BSTR bstrPrintTemplate = "(WEBSTAMP="+bstrBMPFile+";)";

     IGeneralInvoiceRequestManager::Print(bstrPrintTemplate,...);
in order to print a webstamp onto the first page that is onto "TP Rechnung" in the TP case or onto "Patienten-Rechnung" in the TG case.

If a webstamp should be printed on all first pages in the TG case ("Patienten-Rechnung" and "Rückerstattungsbeleg") then produce a comma separated list of BMP stamp files e.g.

     BSTR bstrPrintTemplate = "(WEBSTAMP="+bstrBMPFile1+","+file_path_of_BMP_file2+";)";

     IGeneralInvoiceRequestManager::Print(bstrPrintTemplate,...);

Since the webstamp printing is not the main purpose of the Print method this feature has NO error propagation. The generation is done on a best effort basis, errors are only dumped to the log file!

Boundary conditions:

  • No error propagation
  • The supplied BMP webstamp must exist


 How to set the default printer for a certain request

The report generator included in the module allows to map a printer with its print settings against a print template.

The interface IGeneralInvoiceRequestManager includes the IGeneralInvoiceRequestManager::PrintSetup method which displays the Microsoft's standard print setup dialog. The defined printer and its settings are then stored persistently in a INI file of the same name as the print template but with an extension .vpd (whereas the print template has an extension .vps).


 Syntax of the printTemplate variable of the Print method

bstrPrintTemplate argument of the IGeneralInvoiceRequestManager::Print is either empty or of the general form defined below. In the case of an empty bstrPrintTemplate variable than no print variables are changed/substituted and the default print templates are used according to the defined language, law and tiers type.

However, bstrPrintTemplate can be used to change the normal printing behavior or changing printing objects dynamically. The following syntax is used as content of the bstrPrintTemplate variable:

[logTpl[4Recipient]][(objectName1=text;...)][=printTemplateFile][#INIPATH=inipath]

where a [] pair defines an optional part. The commands are case insensitive and have the following meaning:
  • logTpl: is the logical template name out of a set of 6 well-defined template names: {summary | feeSummary | detail | feeDetail | annex | patCopy}.
    The variant with the 'fee' tag produces fee notes/reminders (with the law=enORG), while the other variant provides the healthcare-defined invoices/reminders (with the law<>enORG).
  • 4Recipient: defines the optional addressee where from the set of {4debitor | 4guarantor | 4patient | 4hc} can be choosen.
    For example, in a Tiers Garant/enKVG case summary4debitor (or just summary) and detail4debitor (or just detail) are the defaults for the debitor addressed invoice/reminder form ("Patienten-Rechnung", "Rückforderungsbeleg" and "Tiers Garant QR-Code Blatt")
    For example, in a Tiers Garant/enORG case feesummary4debitor (or just feesummary) and feedetail4debitor (or just feedetail) are the defaults for the debitor addressed fee note/reminder form ("Honorarrechnung" and "Leistungsübersicht")
    For example, in a Tiers Payant/enUVG case detail4hc is the for the healthcare-addressed invoice/reminder form ("Debitorrechnung mit QR-Code", "Tiers Payant Rechnung", and "Tiers Payant QR-Code Blatt").
    The other combinations basically use the addressed recipient and automatically change the title and other print objects. E.g. detail4patient prints a detailed invoice with the patient as recipient.
    Please note, that there is a subtle difference between a patient and a guarantor even if it is physically the same person. From a formal point of view the patient is not the payer of the invoice but the guarantor, and that has an influence upon the title and other print objects!
  • objectName1=text; does control a substitution of the content of the print object objectName1 by text.
    A print object is terminated by a semicolon and all print objects together are enclosed in a () pair.
    There are 3 predefined pseudo print objects with a special meaning:
    • PDF for generating PDF files
    • WEBSTAMP for printing electronic stamps
    • PRINTLANGUAGE=language, where language is {DE|FR|IT}, forces the usage of the print_template for the given language and thus override the print language given in IGeneralInvoiceRequest::Initialize . Please note that only the print template is changed, whereas all data remains as supplied.
  • printTemplateFile defines an external print template file name (full path + name!).
    If an external print template is supplied it must be mapped against a logical template. Therefore detail=full_vps_file must be used!
  • #INIPATH=inipath defines a fully qualified path to a directory where the report engine searches the corresponding .vpd print template INI file.
    This allows for global settings of a print template in a LAN. The default inipath is the install directory of the Dll

Here are some usage examples:
  • bstrPrintTemplate: "" or bstrPrintTemplate: Detail
    denotes a standard printing situation for a TP/enUVG case.
  • bstrPrintTemplate: feedetail(DOCUMENT_TITLE_DETAIL=Alternate title for the service overview;) prints a substituted title for the list of services of a fee note in a TG/enORG case.
  • bstrPrintTemplate: summary4hc(DOCUMENT_TITLE_SUMMARY=Alternate title for the HealthCare company;) prints a summary invoice on A4 with ESR attached on the bottom for a health care company. The title is adjusted as given above.
  • bstrPrintTemplate: feesummary=C:\myForms\myPrintForm.vps
    uses the print template "C:\myForms\myPrintForm.vps". An optional INI file with the name "C:\myForms\myPrintForm.vpd" is searched under this condition at the same directory.
  • bstrPrintTemplate: #INIPATH=\\host1\\myForms\
    the default path for the ini files (place of the installed component) is changed to "\\host1\\myForms\". If "\\host1\\myForms\" is accessible by all hosts of the LAN then the same INI settings can be used.


 Process attributes...

An XML request is primarily defined by its topmost object reference (cf. "Overview over "Object reference"), and the RequestType of the SetRequest method, respecively. However, the RequestSubtype parameter of the SetRequest method can be seen as a request variation, subsuming a specific data set.

"enRequestSubtypeNormal" attribute

The normal attribute defines the standard (normal) XML infoset describing an ordinary invoice/reminder (Default)

"enRequestSubtypeCopy" attribute

The copy attribute defines the XML request as an identical copy of an initial request.

It is considered an error to send a XML request with turned on copy attribute without having prior sent a "normal" request.

"enRequestSubtypeRefund" attribute

The refund attribute acts on a prior defined normal XML infoset notably sent to and paid by a health care insurance. In other words it is an announcement to the insurance company to pay back certain services of an invoice (qualified by a negative quantity), whereas the services with zero quantity are correctly invoiced.

It is considered an error to send a XML request with turned on copy attribute without having prior sent a "normal" request.

"enRequestSubtypeStorno" attribute

The storno attribute cancels the XML request defined by the topmost reference object.

It is considered an error to send a XML request with turned on storno attribute without having prior sent a "normal" request.


 Important new feature: pseudo service codes

The IGeneralInvoiceRequest::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:

  • tariff type 010/swissDRG/drgValidator: pseudo codes allows to control the provider type, and relocation status - cf. New and important features of the drgValidator regarding swissDRG and references therein!
Pseudo codes are active until the next call of the IGeneralInvoiceRequest::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!


 Object reference...

The following paragraphs defines the concepts of object reference, object reference chain, and topmost object reference. These concepts are of high importance within the XML request/response system.

object reference

An object reference is an identification of an individual XML request defined by a unique triple of data, namely
  • timestamp (UNIX time) defined at the moment of generation
  • date of the object defined by the provider
  • id of the object defined by the provider
Each and every XML request of version 4.3 is defined by such an object reference. All XML responses are replies to the object reference of the corresponding request.

Thus the object reference is a clustered primary key of the request/response system!

object reference chain

As a consequence of the XML schema coded business logic most XML request schemas define more than just 1 object reference, e.g. a "GeneralInvoiceResponse" can hold a maximum of 3 object references, namely
  • an optional credit object reference from the "General Credit Request" process
  • a mandatory invoice object reference from the "General Invoice Request" process
  • an optional reminder object reference given if the process encodes a reminder!
This set of object references by itself defines an ordered object reference chain (e.g. credit -> invoice -> reminder) with the topmost object reference as unique identification of the XML request. Therefore the object reference chain defines -on business logic point of view- dependencies among different XML requests.

topmost object reference

The end node of an object reference chain is defined as topmost object reference, that is by definition the object reference of the XML request itself. Each request/response communication is always done for this topmost object reference and only for that.

For example: a reminder XML request does reference an optional credit XML request, if that object reference was given in the initial invoice XML request. However, the reference of the initial invoice XML request for which a reminder process is started, is mandatory. The topmost object reference is then the object reference of the generated reminder process. Each XML response than references the topmost object reference for which it is a response. Such a response is never targeted for the corresponding invoice but only for the reminder!


 Introduction, overview and usage of the Restful Webservice Server

The application generalInvoiceRequestManagerServer500.exe is a Restful Webservice Server, that has the same interface methods/properties as the COM module generalInvoiceRequestManager500.dll.
This allows to create a programming semantically similar to the COM approach but under the Restful Webservice paradigm. Consequently, on the Restful Client side there are no prevailing dependencies on Microsoft platforms and/or on Microsoft resources such as the database technology. Of course, the installation location of the server software is still subject to these restrictions.

In the next section of this document, the installation, configuration and operation of generalInvoiceRequestManagerServer500.exe will be addressed.

Installation, registration and parameterization:
By installing the installer object generalInvoiceRequestManager500 the COM module generalInvoiceRequestManager500.dll as well as the out-of-process proxy component oopGeneralInvoiceRequestManager500.exe is automatically installed/registered in the system. However, the generalInvoiceRequestManagerServer500.exe must be installed manually as a system service.
generalInvoiceRequestManagerServer500.exe -help | Creates a help window with the the name and full version of the applicationb as well as the currently define Webservice Endpoint. Furthermore the complete list of command line switches is shown.
generalInvoiceRequestManagerServer500.exe -install | Installs/registers the Restful Webservice Server as a system service. Please take into account, that the installation must be performed under administrator privileges
generalInvoiceRequestManagerServer500.exe -uninstall | Uninstalls the system service component. Please take into account, that the uninstallation must be performed under administrator privileges
generalInvoiceRequestManagerServer500.exe -setport X | Sets the port X as part of the Webservice Endpoint
Restful Webservice Endpoint:
Installing generalInvoiceRequestManagerServer500.exe as a service activates the Restful Webservice Endpoint:
http://localhost:35430/generalInvoiceRequestManagerServer500
which is subsumed as baseURL in the subsequent API documentation.

To run the webservice under a different URL or under https protocol, a permanent webservice target endpoint mapping is performed on the target system.
For example, under Apache, the following rewrite rule is defined:
<VirtualHost *:*>
    ProxyPreserveHost Off
    Header always set Access-Control-Allow-Origin "*"
    Header always set Access-Control-Max-Age "1000"
    Header always set Access-Control-Allow-Headers "x-requested-with, Content-Type, origin, authorization, accept, client-security-token"

    ProxyPass /generalInvoiceRequestManager/500/ http://localhost:35430/generalInvoiceRequestManagerServer500/
    ProxyPassReverse /generalInvoiceRequestManager/500/ http://localhost:35430/generalInvoiceRequestManagerServer500/
</VirtualHost>
Restful Webservice Operation:
The service might be modified after installation, for example to start under a different account, to extend the recovery properties or to change the startup type. Finally, this should be set to 'Automatic' or 'Automatic (Delayed start)' so that the service is automatically available after a system restart.
Remarks about programming:
In the rest of this document we will discuss programming of the Restful web service and the differences to the C/C++ programming of the classic COM component.

As already mentioned, Restful programming is analogous to C++ programming with the addition that each instance of an interface (including the main interface) is created via the corresponding GET function. For example, an instance of the main interface is created with:
baseURL/IGeneralInvoiceRequestManager/GetCreateGeneralInvoiceRequestManager | returns the instance address as JSON out{pIGeneralInvoiceRequestManager: longValue,...}
In every further call of a method or a property of the main interface this instance address must be included as part of the JSON-In. The termination/deletion of an instance must be done via the corresponding PUT Destruct property:
baseURL/IGeneralInvoiceRequestManager/PutDestructGeneralInvoiceRequestManager | with JSON-In{pIGeneralInvoiceRequestManager: longValue}, deletes the corresponding main instance AND all at that moment still active dependent subinstances (subinstances which have been generated by the explicit main instance).
It should be noted that the webserver generalInvoiceRequestManagerServer500.exe performs an internal management of the generated instances and automatically deletes instances that have no activity for a defined period of 1 hour. If after the deletion a rest call with such an instance is made, an error (HTTP Status >= 400) is generated and the instance address is marked as unknown.
Code snippet:
Minimal code snippet to load an XML and produce a PDF representation of that input data:

  http://localhost:35430/generalInvoiceRequestManagerServer500/IGeneralInvoiceRequestManager/GetCreateGeneralInvoiceRequestManager
    returns JSON-Out{pIGeneralInvoiceRequestManager: 45467}

  http://localhost:35430/generalInvoiceRequestManagerServer500/IGeneralInvoiceRequestManager/PutModuleLanguage
    JSON-IN(pIGeneralInvoiceRequestManager: 45467, eLanguage: 0}

  http://localhost:35430/generalInvoiceRequestManagerServer500/IGeneralInvoiceRequestManager/LoadXML
     JSON-IN(pIGeneralInvoiceRequestManager: 45467, bstrInputFile: "test.xml"}
    +  C:\test.xml
    returns JSON-Out{pIGeneralInvoiceRequest: 5788991, pIInvoiceResponse: 5788981,
                     pbstrUsedSchema: "generalInvoiceRequest_500.xsd", pbStatus: "true"}

  http://localhost:35430/generalInvoiceRequestManagerServer500/IGeneralInvoiceRequestManager/Print
    JSON-IN(pIGeneralInvoiceRequestManager: 45467, bstrPrintTemplate: "", bstrSenderID:"",
            ePrintPreview:1, eSortTimeTariff:0, lGenerationAttributes:0, plTimestamp:0}
    returns JSON-Out{pIInvoiceResponse: 5788981, plTimestamp:1734303600, pbStatus: "true",
                     pbstrPDFFile: "/generalInvoiceRequestManagerServer500/files/88d26dae.pdf" }

  http://localhost:35430/generalInvoiceRequestManagerServer500/IGeneralInvoiceRequest/PutDestructGeneralInvoiceRequest
    JSON-IN(pIGeneralInvoiceRequest: 5788991}

  http://localhost:35430/generalInvoiceRequestManagerServer500/IGeneralInvoiceResponse/PutDestructGeneralInvoiceResponse
    JSON-IN(pIGeneralInvoiceRequest: 5788981}

  http://localhost:35430/generalInvoiceRequestManagerServer500/IGeneralInvoiceRequestManager/PutDestructGeneralInvoiceRequestManager
    JSON-IN{pIGeneralInvoiceRequestManager:45467}