 API browser of generalInvoiceRequest430 COM module
Interface version: | 4.30
Interface date: | 26 Aug 2010

The GeneralInvoiceRequestManager is an ATL COM module which provides methods to generate invoices, reminders, and credit advices 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.

To ease the migration to V430 compatibility measures has been built into the module that basically

  • allows for lower versions of XML to load and transparently upgrade to V430
  • allows to transparently downgrade V430 data to the appropriate lower version based on a white list
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, reminders or credit advices for all roles and places.
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.
ITarmedInput | The utility interface ITarmedInput provides methods for data required in the Tarmed validator.
Types
type definitions | List of all used builtin, composite and enumeration types
Important documents about the usage and handling
Document | General usage of the generalInvoiceRequest430 COM module - an overview
Document | New and important feature: pseudo service codes for the AddService method allowing to controll the underlying validators
Document | Overview of the concept of "Object reference"
Document | Notes about the processing attributes
Document | Notes about the signature part of the XML infoset
Document | Notes about the encryption part of the XML infoset
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 | How to reposition the ESR coding line
Document | VB code snippet for using the generalInvoiceRequest430 COM module

© by sumex1.net - all rights reserved


  • generalInvoiceRequest430
  • IAddress

IAddress interface |  | V4.30/26 Aug 2010
With the IAddress interface address data can be set and retrieved. The address of a person is set by the method SetPerson and a company address is entered by the method SetCompany. Before setting a new address the address data has to be initialized by the method Initialize. |  | space
Methods |  | 15 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 |
GetFax | Retrieves the structured fax number |
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 address variables |
SetCompany | Sets the company's naming part of the address |
SetFax | Sets a structured fax number |
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 |
Properties |  | 1 properties
[get] Type | GetType returns the type of address either enAddressPerson or enAddressCompany if a address is defined at all |


  • IAddress
  • AddPhone

IAddress::AddPhone method |  |  |
Adds a structured phone number. The Swiss international calling code +41 is filtered 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
C/C++ calling syntax |  |  |
HRESULT AddPhone( | BSTR BSTR BSTR BSTR VARIANT_BOOL | bstrNumber, bstrLocalCode, bstrInternationalCode, bstrExt, *pbStatus); |
Calling argument description |  |  |
[in] BSTR | bstrNumber | Phone number. |
[in] BSTR | bstrLocalCode | Local area code. |
[in] BSTR | bstrInternationalCode | International calling code. |
[in] BSTR | bstrExt | Extension 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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IAddress
  • GetAbortInfo

IAddress::GetAbortInfo method |  |  |
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
C/C++ calling syntax |  |  |
HRESULT GetAbortInfo( | BSTR VARIANT_BOOL | *pbstrAbort, *pbStatus); |
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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IAddress
  • GetCompany

IAddress::GetCompany method |  |  |
Retrieves the company's naming part of the address. Call the property GetType first to test if GetPerson or GetCompany should be called. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetCompany( | BSTR BSTR BSTR VARIANT_BOOL | *pbstrCompanyName, *pbstrDepartment, *pbstrSubaddressing, *pbStatus); |
Calling argument description |  |  |
[out] BSTR | *pbstrCompanyName | Company name. |
[out] BSTR | *pbstrDepartment | Department. |
[out] BSTR | *pbstrSubaddressing | Optional subaddressing information, e.g. c/o, P.O. box and the like |
[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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IAddress
  • GetFax

IAddress::GetFax method |  |  |
Retrieves the structured fax number. Empty variables are returned if there is no fax number available. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetFax( | BSTR BSTR BSTR BSTR VARIANT_BOOL | *pbstrNumber, *pbstrLocalCode, *pbstrInternationalCode, *pbstrExt, *pbStatus); |
Calling argument description |  |  |
[out] BSTR | *pbstrNumber | Fax number. |
[out] BSTR | *pbstrLocalCode | Local area code. |
[out] BSTR | *pbstrInternationalCode | International calling code. |
[out] BSTR | *pbstrExt | Extension 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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IAddress
  • GetFirstPhone

IAddress::GetFirstPhone method |  |  |
Retrieves the first phone number information. VARIANT_FALSE is returned if the end of the phone list is reached. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetFirstPhone( | BSTR BSTR BSTR BSTR VARIANT_BOOL | *pbstrNumber, *pbstrLocalCode, *pbstrInternationalCode, *pbstrExt, *pbStatus); |
Calling argument description |  |  |
[out] BSTR | *pbstrNumber | Phone number. |
[out] BSTR | *pbstrLocalCode | Local area code. |
[out] BSTR | *pbstrInternationalCode | International calling code. |
[out] BSTR | *pbstrExt | Extension number. |
[out, retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE the end of data is reached |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IAddress
  • GetNextPhone

IAddress::GetNextPhone method |  |  |
Retrieves the next phone number information. VARIANT_FALSE is returned if the end of the phone list is reached |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetNextPhone( | BSTR BSTR BSTR BSTR VARIANT_BOOL | *pbstrNumber, *pbstrLocalCode, *pbstrInternationalCode, *pbstrExt, *pbStatus); |
Calling argument description |  |  |
[out] BSTR | *pbstrNumber | Phone number. |
[out] BSTR | *pbstrLocalCode | Local area code. |
[out] BSTR | *pbstrInternationalCode | International calling code. |
[out] BSTR | *pbstrExt | Extension number. |
[out, retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE the end of data is reached |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IAddress
  • GetOnline

IAddress::GetOnline method |  |  |
Retrieves the structured online part of the address. Empty variables are returned if there are no online information available. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetOnline( | BSTR BSTR VARIANT_BOOL | *pbstrEMail, *pbstrUrl, *pbStatus); |
Calling argument description |  |  |
[out] BSTR | *pbstrEMail | Email address. |
[out] BSTR | *pbstrUrl | 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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IAddress
  • GetPerson

IAddress::GetPerson method |  |  |
Retrieves the person's naming part of the address. Call the property GetType first to test if GetPerson or GetCompany should be called. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetPerson( | BSTR BSTR BSTR BSTR BSTR VARIANT_BOOL | *pbstrFamilyname, *pbstrGivenname, *pbstrSalutation, *pbstrTitle, *pbstrSubaddressing, *pbStatus); |
Calling argument description |  |  |
[out] BSTR | *pbstrFamilyname | Family name. |
[out] BSTR | *pbstrGivenname | Given name. |
[out] BSTR | *pbstrSalutation | Salutation. |
[out] BSTR | *pbstrTitle | Title. |
[out] BSTR | *pbstrSubaddressing | Optional subaddressing information, e.g. c/o, P.O. box and the like |
[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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IAddress
  • GetPostal

IAddress::GetPostal method |  |  |
Retrieves the structured postal address part of the address |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetPostal( | BSTR BSTR BSTR BSTR BSTR BSTR VARIANT_BOOL | *pbstrStreet, *pbstrPoBox, *pbstrZip, *pbstrCity, *pbstrStateCode, *pbstrCountryCode, *pbStatus); |
Calling argument description |  |  |
[out] BSTR | *pbstrStreet | Street. |
[out] BSTR | *pbstrPoBox | P.O. Box. |
[out] BSTR | *pbstrZip | ZIP code |
[out] BSTR | *pbstrCity | City. |
[out] BSTR | *pbstrStateCode | State code. |
[out] BSTR | *pbstrCountryCode | ISO country code. |
[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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IAddress
  • Initialize

IAddress::Initialize method |  |  |
Initializes all address variables. This method should be called before any data are supplied. |  |  | space
C/C++ calling syntax |  |  |
HRESULT Initialize( | VARIANT_BOOL | *pbStatus); |
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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IAddress
  • SetCompany

IAddress::SetCompany method |  |  |
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
C/C++ calling syntax |  |  |
HRESULT SetCompany( | BSTR BSTR BSTR VARIANT_BOOL | bstrCompanyName, bstrDepartment, bstrSubaddressing, *pbStatus); |
Calling argument description |  |  |
[in] BSTR | bstrCompanyName | Company name. |
[in] BSTR | bstrDepartment | Department. |
[in] BSTR | bstrSubaddressing | Optional subaddressing information, e.g. c/o, P.O. box and the like |
[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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IAddress
  • SetFax

IAddress::SetFax method |  |  |
Sets a structured fax number. The Swiss international calling code +41 is filtered 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
C/C++ calling syntax |  |  |
HRESULT SetFax( | BSTR BSTR BSTR BSTR VARIANT_BOOL | bstrNumber, bstrLocalCode, bstrInternationalCode, bstrExt, *pbStatus); |
Calling argument description |  |  |
[in] BSTR | bstrNumber | Fax number. |
[in] BSTR | bstrLocalCode | Local area code. |
[in] BSTR | bstrInternationalCode | International calling code. |
[in] BSTR | bstrExt | Extension 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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IAddress
  • SetOnline

IAddress::SetOnline method |  |  |
Sets the structured online part of the address. |  |  | space
C/C++ calling syntax |  |  |
HRESULT SetOnline( | BSTR BSTR VARIANT_BOOL | bstrEMail, bstrUrl, *pbStatus); |
Calling argument description |  |  |
[in] BSTR | bstrEMail | Email address. |
[in] BSTR | bstrUrl | 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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IAddress
  • SetPerson

IAddress::SetPerson method |  |  |
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
C/C++ calling syntax |  |  |
HRESULT SetPerson( | BSTR BSTR BSTR BSTR BSTR VARIANT_BOOL | bstrFamilyname, bstrGivenname, bstrSalutation, bstrTitle, bstrSubaddressing, *pbStatus); |
Calling argument description |  |  |
[in] BSTR | bstrFamilyname | Family name. |
[in] BSTR | bstrGivenname | Given name. |
[in] BSTR | bstrSalutation | Salutation. |
[in] BSTR | bstrTitle | Title. |
[in] BSTR | bstrSubaddressing | Optional subaddressing information, e.g. "c/o" and the like |
[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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IAddress
  • SetPostal

IAddress::SetPostal method |  |  |
Sets the structured postal address part. The Swiss ISO county code is the default but is filtered in the printing. |  |  | space
C/C++ calling syntax |  |  |
HRESULT SetPostal( | BSTR BSTR BSTR BSTR BSTR BSTR VARIANT_BOOL | bstrStreet, bstrPoBox, bstrZip, bstrCity, bstrStateCode, bstrCountryCode, *pbStatus); |
Calling argument description |  |  |
[in] BSTR | bstrStreet | Street |
[in] BSTR | bstrPoBox | P.O. Box |
[in] BSTR | bstrZip | ZIP code |
[in] BSTR | bstrCity | City |
[in] BSTR | bstrStateCode | State code like the codes of the US states. Such state code should only be supplied if it is part of the address because the state code is printed before the zip code. |
[in] BSTR | bstrCountryCode | ISO country code |
[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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IAddress
  • Type

IAddress::Type property
GetType returns the type of address either enAddressPerson or enAddressCompany if a address is defined at all. If no address is set then enAddressUndefined is returned. | space
C/C++ calling syntax
[get] HRESULT | Type( AddressType *aAddressType);
space
Calling argument description
[out, retval] AddressType | *aAddressType
C/C++ return value
S_OK | This value is returned if the function call was successful.
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.
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 | V4.30/26 Aug 2010
With the IGeneralInvoiceRequest interface all the invoice or reminder related data and parameters can be set by the available interface methods like SetPatient, SetTreatment,...

It is very important to add the service records (Tarmed, drug, lab,...) after all other invoice/reminder data e.g. addresses, treatment information has been set. If this ordering is not obeyed, some service parameters like the tax point value can not be correctly determined!

Alternatively to produce the data from scratch the data of a previously generated XML infoset can be loaded with the IGeneralInvoiceRequestManger::LoadXML method and thereafter changed appropriately.

space
Methods | 30 methods
AddDiagnosis | Adds a diagnosis to the list of diagnoses.
AddDocument | Adds one document -either inline or online- to the list of documents.
AddService | Adds one none-Tarmed service record to the list of none-Tarmed services
AddTarmedService | Adds a Tarmed service to the list of Tarmed services
AddTarmedServiceEx | Adds a Tarmed service supplying all data - there is no auto-expansion of any data
Finalize | Finalizes and validates all data set so far in the GeneralInvoiceRequest interface
GetAbortInfo | Get the abort information string with the error coded in the module language
Initialize | Initializes all input data in the IGeneralInvoiceRequest interface
SetBiller | Sets the various identifiers (EAN, ZSR,...) and the structured address of the biller
SetCard | Sets the patient's insurance card information (might be the patient card later on) - this information is optional.
SetCredit | Sets the optional credit object reference parameters
SetEmployer | Sets the various identifiers (EAN, ZSR,...) and the structured address of the employer of the patient
SetEsr | Sets the ESR 5 or 9 information.
SetEsrRed | Sets the information for red payin slips (aka esrRed).
SetGuarantor | Sets the structured address of the guarantor of the patient
SetInsurance | Sets the EAN and the structured address of the insurance
SetInvoice | Sets the invoice object reference
SetLaw | Sets the law and its dependent information
SetPackage | Defines the identification parameters of the main software that uses this DLL.
SetPatient | Sets the primary parameters and structured address of the patient
SetProcessing | Sets the processing information used at the last intermediate's side.
SetProvider | Sets the various identifiers (EAN, ZSR,...) and the structured address of the main provider
SetReferrer | Sets the various identifiers (EAN, ZSR,...) and the structured address of the referrer - this is an optional part
SetReminder | Sets the reminder object reference parameters - in which case the all invoice object reference parameters must be defined
SetRequest Sets the role and place information, the processing parameters "storno" and "copy" besides data language and optional remark
SetTiers | Sets the Tiers Garant (TG) or Tiers Payant (TP) mode together with the VAT number and prepaid amount.
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 primary treatment input data.
SetXtraDrug | Sets additional drug input data for the defined service record if eRoleType=enRolePharmacist
SetXtraTreatment | Sets additional treatment input data if eRoleType=enRoleHospital and/or ePlaceType=enPlaceHospital
Properties | 2 properties
[get] CreateAddress | Create an instance of the IAddress interface
[get] CreateTarmedInput | Creates an instance of the ITarmedInput interface


  • IGeneralInvoiceRequest
  • AddDiagnosis

IGeneralInvoiceRequest::AddDiagnosis method |  |  |
Adds a diagnosis to the list of diagnoses. |  |  | space
C/C++ calling syntax |  |  |
HRESULT AddDiagnosis( | DiagnosisType BSTR BSTR VARIANT_BOOL | eDiagnosisType, bstrCode, bstrText, *pbStatus); |
Calling argument description |  |  |
[in] DiagnosisType | eDiagnosisType | The type of the diagnosis |
[in] BSTR | bstrCode | The code of the diagnosis as given in the corresponding diagnosis catalog defined by eDiagnosisType . |
[in] BSTR | bstrText | Textual description of the code as given in the corresponding diagnosis catalog defined by eDiagnosisType . |
[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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceRequest
  • AddDocument

IGeneralInvoiceRequest::AddDocument method |  |  |
Adds one document -either inline or online- to the list of documents. |  |  | space
C/C++ calling syntax |  |  |
HRESULT AddDocument( | YesNoType BSTR BSTR BSTR BSTR VARIANT_BOOL | eIsURL, bstrSource, bstrFilename, bstrMimeType, bstrViewer, *pbStatus); |
Calling argument description |  |  |
[in] YesNoType | eIsURL | Boolean that defines if the document is added online using a URL (enYes) or inline as Base64 coded stream (enNo). |
[in] BSTR | bstrSource | If eIsURL = enYes then bstrSource is a URL for accessing the file online. If eIsURL = enNo then bstrSource is a full file name (path + name) that is Base64 coded. Note that the file must exist and having READ access. |
[in] BSTR | bstrFilename | The name of the file (without path) in the local file system. This information is an aid for saving the file at the target location. |
[in] BSTR | bstrMimeType | The MIME type of the document. The MIME type enables applications to read the file. RFC 2046 standardizes and names the commonly used MIME types. |
[in] BSTR | bstrViewer | An optional URL where a viewer for the file can be downloaded. |
[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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceRequest
  • AddService

IGeneralInvoiceRequest::AddService method
Adds one none-Tarmed service record to the list of none-Tarmed services.

Auto-expansion: under the condition that the corresponding validator is installed and eIgnoreValidate=enNo then bstrText, dUnit, and dAmount are auto-expanded to the correct values by the validator if and only if these values are set empty or 0, respectively.

Important new feature: the AddService method has been patched to allow for controlling the underlying validators by using a pseudo service code: bstrCode="setParameter(cmd=value)", where cmd=value are validator specific commands. In such a case besides the service code (bstrCode) only the tariff type (bstrTariffType) and date (dDate) must be defined.

Currently there are defined pseudo codes for the following tariff types/validators in effect:

  • 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
C/C++ calling syntax
HRESULT AddService( BSTR
BSTR
BSTR
double
long
DATE
BSTR
BSTR
BSTR
double
double
double
double
double
ObligationType
BSTR
BSTR
YesNoType
long
long
VARIANT_BOOL 		bstrTariffType,
bstrCode,
bstrReferenceCode,
dQuantity,
lSessionNumber,
dDate,
bstrProviderEAN,
bstrResponsibleEAN,
bstrText,
dUnit,
dUnitFactor,
dExternalFactor,
dAmount,
dVatRate,
eIsObligatory,
bstrRemark,
bstrSectionCode,
eIgnoreValidate,
lServiceAttributes,
*plID,
*pbStatus);
Calling argument description
[in] BSTR | bstrTariffType | The official tariff type as defined by Forum Datenaustausch
[in] BSTR bstrCode The service code.

Important new feature: in order to control the underlying validators the feature of pseudo service codes bstrCode="setParameter(cmd=value)" have been defined, where cmd=value are validator specific.

[in] BSTR | bstrReferenceCode | The reference code if one must be supplied (otherwise bstrReferenceCode is ignored)
[in] double dQuantity The floating point quantity.

Note that quantity changes the sign if a credit advice or a storno request is produced.

[in] long | lSessionNumber | The session number - use a session value of 1 if no session concept is established for the used tariff
[in] DATE | dDate | The date of the service's application
[in] BSTR bstrProviderEAN EAN number of the service provider party.

Note if bstrProviderEAN is undefined and bstrResponsibleEAN is defined then bstrResponsibleEAN is copied into the bstrProviderEAN variable. If both variables are undefined the pseudo EAN "2099999999999" is set.

[in] BSTR bstrResponsibleEAN EAN number of the service responsible party.

Note if bstrResponsibleEAN is undefined and bstrProviderEAN is defined then bstrProviderEAN is copied into the bstrResponsibleEAN variable. If both variables are undefined the pseudo EAN "2099999999999" is set.

[in] BSTR | bstrText | The service name as defined by the used tariff
[in] double | dUnit | Tax points of the service.
[in] double | dUnitFactor | Tax point value of the service.
[in] double | dExternalFactor | The external scaling factor used to scale the tax point value e.g. to give a discount
[in] double dAmount The amount in CHF for the service.

Note that amount changes the sign if a credit advice or a storno request is produced.

[in] double | dVatRate | The VAT rate that should be applied to this service.
[in] ObligationType | eIsObligatory | Enumerator indicating whether the given service record is obligatory regarding the given law (UVG,KVG,...). If the enumerator is set to enObligationAutomatic then the status is set internally using some ad hoc rules.
[in] BSTR | bstrRemark | An optional remark for the given service
[in] BSTR | bstrSectionCode | An optional BfS section code where the service was applied as defined by Swiss Federal Statistical Office - this code is only given for eRoleType=enRoleHospital!
[in] YesNoType eIgnoreValidate Flag indicating whether the validation must be ignored that is wether the validator must not be called.

This flag might be useful in the following situation: the user wants to add the service even if the validation failed, perhaps he has a special agreement with the insurance or patient.

[in] long lServiceAttributes lServiceAttributes is a 32-bit integer where each bit position defines a special information.

Currently only Bit 1 (0x000001) is defined. It applies to drug services only and means "Code 207" aka "Drug must not be substituted due to medical reasons".

[out] long *plID This is the internal ID of the service record.

This internal ID is used to append extra drug information to this service with the SetXtraDrug 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.
C/C++ return value
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE.
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE.
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions.


  • IGeneralInvoiceRequest
  • AddTarmedService

IGeneralInvoiceRequest::AddTarmedService method |  |  |
Adds a Tarmed service to the list of Tarmed services. The method automatically auto-expand the "missing data", namely bstrText, dAmount, dUnitMT, dUnitInternalScalingFactorMT, dAmountMT, dUnitTT, dUnitInternalScalingFactorTT, dAmountTT. If the return status is VARIANT_FALSE then the service record is not added! |  |  | space
C/C++ calling syntax |  |  |
HRESULT AddTarmedService( | ITarmedInput BSTR BSTR BSTR double long DATE SideType YesNoType double double double ObligationType BSTR BSTR long long VARIANT_BOOL | *pITarmedInput, bstrTariffType, bstrCode, bstrReferenceCode, dQuantity, lSessionNumber, dDate, eSide, eIgnoreValidate, dUnitFactorMT, dUnitFactorTT, dVatRate, eIsObligatory, bstrRemark, bstrSectionCode, lServiceAttributes, *plID, *pbStatus); |
Calling argument description |  |  |
[in] ITarmedInput | *pITarmedInput | ITarmedInput interface instance. |
[in] BSTR | bstrTariffType | The official Tarmed tariff type. The tariff type is currently ignored and fixed to "001" |
[in] BSTR | bstrCode | The Tarmed service code. |
[in] BSTR | bstrReferenceCode | The Tarmed reference code if one must be supplied (otherwise bstrReferenceCode is ignored) |
[in] double | dQuantity | The floating point quantity. Note that quantity changes the sign if a credit advice or a storno request is produced. |
[in] long | lSessionNumber | The Tarmed session number |
[in] DATE | dDate | The date of the service's application |
[in] SideType | eSide | The Tarmed side type |
[in] YesNoType | eIgnoreValidate | Flag indicating whether the validation was ignored. 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] double | dUnitFactorMT | Tax point value for the medical Tarmed part of the service. |
[in] double | dUnitFactorTT | Tax point value for the technical Tarmed part of the service. |
[in] double | dVatRate | The VAT rate that should be applied to this service. |
[in] ObligationType | eIsObligatory | Enumerator indicating whether the given service record is obligatory regarding the given law (UVG,KVG,...). If the enumerator is set to enObligationAutomatic then the status is set internally using some ad hoc rules. |
[in] BSTR | bstrRemark | An optional remark for the given service |
[in] BSTR | bstrSectionCode | An optional BfS section code where the service was applied as defined by Swiss Federal Statistical Office - this code is only given for eRoleType=enRoleHospital! |
[in] long | lServiceAttributes | lServiceAttributes is a 32-bit integer where each bit position defines a special information. Currently only Bit 1 (0x000001) is defined. It applies to drug services only and means "Code 207" aka "Drug must not be substituted due to medical reasons". |
[out] long | *plID | This is the internal ID of the service record. Currently unused for Tarmed records. |
[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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceRequest
  • AddTarmedServiceEx

IGeneralInvoiceRequest::AddTarmedServiceEx method |  |  |
Adds a Tarmed service supplying all data - there is no auto-expansion of any data. Auto-expansion: under the condition that the tarmedValidator 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. If the return status is VARIANT_FALSE then the service record is not added! |  |  | space
C/C++ calling syntax |  |  |
HRESULT AddTarmedServiceEx( | ITarmedInput BSTR BSTR BSTR double long DATE SideType BSTR double double double double double double double double double double ObligationType BSTR BSTR YesNoType long long VARIANT_BOOL | *pITarmedInput, bstrTariffType, bstrCode, bstrReferenceCode, dQuantity, lSessionNumber, dDate, eSide, bstrText, dUnitMT, dUnitFactorMT, dUnitInternalScalingFactorMT, dAmountMT, dUnitTT, dUnitFactorTT, dUnitInternalScalingFactorTT, dAmountTT, dAmount, dVatRate, eIsObligatory, bstrRemark, bstrSectionCode, eIgnoreValidate, lServiceAttributes, *plID, *pbStatus); |
Calling argument description |  |  |
[in] ITarmedInput | *pITarmedInput | ITarmedInput interface instance. |
[in] BSTR | bstrTariffType | The official Tarmed tariff type. The tariff type is currently ignored and fixed to "001" |
[in] BSTR | bstrCode | The Tarmed service code. |
[in] BSTR | bstrReferenceCode | The Tarmed reference code if one must be supplied (otherwise bstrReferenceCode is ignored) |
[in] double | dQuantity | The floating point quantity. Note that quantity changes the sign if a credit advice or a storno request is produced. |
[in] long | lSessionNumber | The Tarmed session number |
[in] DATE | dDate | The date of the service's application |
[in] SideType | eSide | The Tarmed side type |
[in] BSTR | bstrText | The service name as defined by the Tarmed tariff |
[in] double | dUnitMT | Tax points for the medical Tarmed part of the service. |
[in] double | dUnitFactorMT | Tax point value for the medical Tarmed part of the service. |
[in] double | dUnitInternalScalingFactorMT | Internal scaling factor for medical part of the Tarmed service. |
[in] double | dAmountMT | The amount in CHF for the medical part of the Tarmed service. Note that medical amount changes the sign if a credit advice or a storno request is produced. |
[in] double | dUnitTT | Tax points for the technical Tarmed part of the service. |
[in] double | dUnitFactorTT | Tax point value for the technical Tarmed part of the service. |
[in] double | dUnitInternalScalingFactorTT | Internal scaling factor for technical part of the Tarmed service. |
[in] double | dAmountTT | The amount in CHF for the technical part of the Tarmed service. Note that technical amount changes the sign if a credit advice or a storno request is produced. |
[in] double | dAmount | The amount in CHF for the Tarmed service. Note that amount changes the sign if a credit advice or a storno request is produced. |
[in] double | dVatRate | The VAT rate that should be applied to this service. |
[in] ObligationType | eIsObligatory | Enumerator indicating whether the given service record is obligatory regarding the given law (UVG,KVG,...). If the enumerator is set to enObligationAutomatic then the status is set internally using some ad hoc rules. |
[in] BSTR | bstrRemark | An optional remark for the given service |
[in] BSTR | bstrSectionCode | An optional BfS section code where the service was applied as defined by Swiss Federal Statistical Office - this code is only given for eRoleType=enRoleHospital! |
[in] YesNoType | eIgnoreValidate | Flag indicating whether the validation was ignored. 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. Currently only Bit 1 (0x000001) is defined. It applies to drug services only and means "Code 207" aka "Drug must not be substituted due to medical reasons". |
[out] long | *plID | This is the internal ID of the service record. Currently unused for Tarmed records. |
[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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceRequest
  • Finalize

IGeneralInvoiceRequest::Finalize method |  |  |
Finalizes and validates all data set so far in the GeneralInvoiceRequest 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. |  |  | space
C/C++ calling syntax |  |  |
HRESULT Finalize( | double VARIANT_BOOL | *pdRoundDifference, *pbStatus); |
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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceRequest
  • GetAbortInfo

IGeneralInvoiceRequest::GetAbortInfo method |  |  |
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
C/C++ calling syntax |  |  |
HRESULT GetAbortInfo( | BSTR VARIANT_BOOL | *pbstrAbort, *pbStatus); |
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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceRequest
  • Initialize

IGeneralInvoiceRequest::Initialize method |  |  |
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
C/C++ calling syntax |  |  |
HRESULT Initialize( | LanguageType VARIANT_BOOL | eDataLanguage, *pbStatus); |
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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceRequest
  • SetBiller

IGeneralInvoiceRequest::SetBiller method |  |  |
Sets the various identifiers (EAN, ZSR,...) and the structured address of the biller. The biller's address is used as creditor address in the ESR part as well. The address is defined via a IAddress interface pointer and the address data must be defined prior to call this method. |  |  | space
C/C++ calling syntax |  |  |
HRESULT SetBiller( | BSTR BSTR BSTR BSTR IAddress VARIANT_BOOL | bstrEAN, bstrZSR, bstrNIF, bstrSpecialty, *pIAddress, *pbStatus); |
Calling argument description |  |  |
[in] BSTR | bstrEAN | EAN number of the biller as supplied by medwin.ch |
[in] BSTR | bstrZSR | ZSR number of the biller as supplied by santésuisse |
[in] BSTR | bstrNIF | The IV specific identification number NIF of the biller. |
[in] BSTR | bstrSpecialty | Specialty, i.e. FMH title of the physician. |
[in] IAddress | *pIAddress | Pointer to an IAddress interface instance 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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceRequest
  • SetCard

IGeneralInvoiceRequest::SetCard method |  |  |
Sets the patient's insurance card information (might be the patient card later on) - this information is optional. |  |  | space
C/C++ calling syntax |  |  |
HRESULT SetCard( | BSTR DATE DATE BSTR BSTR VARIANT_BOOL | bstrCardID, dExpiryDate, dValidationDate, bstrValidationID, bstrValidationServer, *pbStatus); |
Calling argument description |  |  |
[in] BSTR | bstrCardID | The mandatory unique 20 digits card identifier |
[in] DATE | dExpiryDate | The mandatory expiry date of the card |
[in] DATE | dValidationDate | The optional date of the last validation of the card's data |
[in] BSTR | bstrValidationID | The optional replied ID when the last validation of the card's data was performed |
[in] BSTR | bstrValidationServer | The optional server for the last validation 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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceRequest
  • SetCredit

IGeneralInvoiceRequest::SetCredit method |  |  |
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
C/C++ calling syntax |  |  |
HRESULT SetCredit( | BSTR DATE long VARIANT_BOOL | bstrRequestCreditID, dRequestCreditDate, lRequestCreditTimestamp, *pbStatus); |
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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceRequest
  • SetEmployer

IGeneralInvoiceRequest::SetEmployer method |  |  |
Sets the various identifiers (EAN, ZSR,...) and the structured address of the employer of the patient. The address is defined via a IAddress interface pointer and the address data must be defined prior to call this method. |  |  | space
C/C++ calling syntax |  |  |
HRESULT SetEmployer( | BSTR BSTR IAddress VARIANT_BOOL | bstrEAN, bstrRegNumber, *pIAddress, *pbStatus); |
Calling argument description |  |  |
[in] BSTR | bstrEAN | EAN number of the employer as supplied by medwin.ch |
[in] BSTR | bstrRegNumber | The employer's national BER number as defined by Swiss Federal Statistical Office |
[in] IAddress | *pIAddress | Pointer to an IAddress interface instance 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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceRequest
  • SetEsr

IGeneralInvoiceRequest::SetEsr method |  |  |
Sets the ESR 5 or 9 information. |  |  | space
C/C++ calling syntax |  |  |
HRESULT SetEsr( | EsrType BSTR BSTR BSTR IAddress long VARIANT_BOOL | eEsrType, bstrParticipantNumber, bstrReferenceNumber, bstrBankAccount, *pIBankAddress, lPaymentPeriod, *pbStatus); |
Calling argument description |  |  |
[in] EsrType | eEsrType | ESR 5 or 9 type |
[in] BSTR | bstrParticipantNumber | ESR participant number. |
[in] BSTR | bstrReferenceNumber | ESR reference number. |
[in] BSTR | bstrBankAccount | ESR bank account number. |
[in] IAddress | *pIBankAddress | Bank address interface instance for BESR. |
[in] long | lPaymentPeriod | 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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceRequest
  • SetEsrRed

IGeneralInvoiceRequest::SetEsrRed method |  |  |
Sets the information for red payin slips (aka esrRed). Please note that the SetEsrRed method is IBAN compatible! |  |  | space
C/C++ calling syntax |  |  |
HRESULT SetEsrRed( | BSTR BSTR BSTR BSTR IAddress long VARIANT_BOOL | bstrPostAccount, bstrIBAN, bstrReferenceNumber, bstrRemarks, *pIBankAddress, lPaymentPeriod, *pbStatus); |
Calling argument description |  |  |
[in] BSTR | bstrPostAccount | Postal account number |
[in] BSTR | bstrIBAN | The IBAN number The IBAN number is defined only if it is a bank transaction - the IBankAddress interface handle is not NULL in this situation. |
[in] BSTR | bstrReferenceNumber | Reference number with the coded bank account if it is a bank transaction Note that this reference number is copied to the remarks section if it is a postal based invoice because there is no reference section in the coding line 1. |
[in] BSTR | bstrRemarks | The optional remark that should be printed on the payin slip |
[in] IAddress | *pIBankAddress | The IBankAddress is an IAddress interface handle to the bank address. The handle allows to get the bank's structured address data back. If no address is defined then the handle is NULL. |
[in] long | lPaymentPeriod | Payment period for the invoice/reminder |
[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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceRequest
  • SetGuarantor

IGeneralInvoiceRequest::SetGuarantor method
Sets the structured address of the guarantor of the patient. This is the patient himself or his legal representative. If the guarantor's address is not set then the patient's address is automatically cloned as guarantor address.

Note, that there is a difference between the meaning of the guarantor in Tiers Garant and Tiers Payant. In TG case the guarantor is the receiver (unless IReceiverAddress is specified for the print) and debitor of invoice/reminder. Whereas in the TP case is the legal representative and debitor of the premiums.

The address is defined via a IAddress interface pointer and the address data must be defined prior to call this method.

space
C/C++ calling syntax
HRESULT SetGuarantor( IAddress
VARIANT_BOOL 		*pIAddress,
*pbStatus);
Calling argument description
[in] IAddress *pIAddress Pointer to an IAddress interface instance 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.
C/C++ return value
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE.
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE.
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions.


  • IGeneralInvoiceRequest
  • SetInsurance

IGeneralInvoiceRequest::SetInsurance method |  |  |
Sets the EAN and the structured address of the insurance. The address is defined via a IAddress interface pointer and the address data must be defined prior to call this method. |  |  | space
C/C++ calling syntax |  |  |
HRESULT SetInsurance( | BSTR IAddress VARIANT_BOOL | bstrEAN, *pIAddress, *pbStatus); |
Calling argument description |  |  |
[in] BSTR | bstrEAN | EAN number of the insurance as supplied by medwin.ch |
[in] IAddress | *pIAddress | Pointer to an IAddress interface instance 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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceRequest
  • SetInvoice

IGeneralInvoiceRequest::SetInvoice method |  |  |
Sets the invoice object reference. 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
C/C++ calling syntax |  |  |
HRESULT SetInvoice( | BSTR DATE long BSTR VARIANT_BOOL | bstrRequestInvoiceID, dRequestInvoiceDate, lRequestInvoiceTimestamp, bstrRequestPatientID, *pbStatus); |
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 |
[in] BSTR | bstrRequestPatientID | The patient ID is the main software's identification of the patient ("Patientennummer"). This parameter is not part of a object reference and is only present in an 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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceRequest
  • SetLaw

IGeneralInvoiceRequest::SetLaw method |  |  |
Sets the law and its dependent information |  |  | space
C/C++ calling syntax |  |  |
HRESULT SetLaw( | LawType DATE BSTR BSTR BSTR VARIANT_BOOL | eLawType, dCaseDate, bstrCaseID, bstrInsuredID, bstrContractNumber, *pbStatus); |
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 undefined for certain laws and therefore left empty |
[in] BSTR | bstrCaseID | The case ID of the insurance (e.g. accident number in UVG) This ID might undefined for certain laws and therefore left empty |
[in] BSTR | bstrInsuredID | The patient's ID at the insurance This ID might undefined for certain laws and therefore left empty |
[in] BSTR | bstrContractNumber | Contract number if such a special contract exists between provider and insurance |
[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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceRequest
  • SetPackage

IGeneralInvoiceRequest::SetPackage method |  |  |
Defines the identification parameters of the main software that uses this DLL. |  |  | space
C/C++ calling syntax |  |  |
HRESULT SetPackage( | BSTR long long BSTR VARIANT_BOOL | bstrSoftwarePackage, lSoftwareVersion, lSoftwareID, bstrSoftwareCopyright, *pbStatus); |
Calling argument description |  |  |
[in] BSTR | bstrSoftwarePackage | Name of the main software that uses this DLL |
[in] long | lSoftwareVersion | Version of the main software codes as 32-bit value where lSoftwareVersion = 100*Major version + Minor version. |
[in] long | lSoftwareID | Optional ID of the main software that uses this DLL |
[in] BSTR | bstrSoftwareCopyright | The copyright notice of the developer of main software. |
[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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceRequest
  • SetPatient

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

The address is defined via a IAddress interface pointer and the address data must be defined prior to call this method.

space
C/C++ calling syntax
HRESULT SetPatient( SexType
DATE
BSTR
IAddress
VARIANT_BOOL 		eSexType,
dBirthdate,
bstrSSN,
*pIAddress,
*pbStatus);
Calling argument description
[in] SexType | eSexType | The patient's gender.
[in] DATE | dBirthdate | The patient's birthdate.
[in] BSTR bstrSSN Defines the social security number (SSN) of the patient whereupon 3 distinguished types are allowed:
  • the old 11 digit Swiss SSN ("AHV-Nummer") as defined by Federal Social Insurance Office
  • 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 SSN can be supplied in its printed (with dots) or electronic (only digits) form.
[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.
C/C++ return value
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE.
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE.
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions.


  • IGeneralInvoiceRequest
  • SetProcessing

IGeneralInvoiceRequest::SetProcessing method |  |  |
Sets the processing information used at the last intermediate's side. |  |  | space
C/C++ calling syntax |  |  |
HRESULT SetProcessing( | YesNoType YesNoType BSTR VARIANT_BOOL | ePrintAtIntermediate, ePrintPatientCopy, bstrTCToken, *pbStatus); |
Calling argument description |  |  |
[in] YesNoType | ePrintAtIntermediate | The Boolean ePrintAtIntermediate is a processing instruction for the last intermediate. It defines if the sent XML infoset must be print at the intermediate and sent to the guarantor (TG case) or the invoice (TP case). Note that this is the "real" invoice to be printed (the detail and/or summary) whereas the ePrintPatientCopy is the processing instruction of a copy of the invoice without any ESR information! |
[in] YesNoType | ePrintPatientCopy | The Boolean ePrintPatientCopy is a processing instruction for the last intermediate. It defines if the sent XML infoset must be print at the intermediate as copy of the invoice and sent to the guarantor. Note that this is a copy of the invoice without any ESR information (probably the summary part only) whereas the pePrintAtIntermediate defines the processing instruction of the "real" invoice/reminder! |
[in] BSTR | bstrTCToken | The optional 2-digit Trust Center token. Note that this is relevant for eRoleType=enRolePhysician only. If set then the Trust Center token is printed as replacement for the "01" beginning of the ESR 5/9 coding line in the detail invoice! |
[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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceRequest
  • SetProvider

IGeneralInvoiceRequest::SetProvider method |  |  |
Sets the various identifiers (EAN, ZSR,...) and the structured address of the main provider. The address is defined via a IAddress interface pointer and the address data must be defined prior to call this method. |  |  | space
C/C++ calling syntax |  |  |
HRESULT SetProvider( | BSTR BSTR BSTR BSTR IAddress VARIANT_BOOL | bstrEAN, bstrZSR, bstrNIF, bstrSpecialty, *pIAddress, *pbStatus); |
Calling argument description |  |  |
[in] BSTR | bstrEAN | EAN number of the provider as supplied by medwin.ch |
[in] BSTR | bstrZSR | ZSR number of the provider as supplied by santésuisse |
[in] BSTR | bstrNIF | The IV specific identification number NIF of the provider. |
[in] BSTR | bstrSpecialty | An optional specialty, i.e. FMH title of a physician. |
[in] IAddress | *pIAddress | Pointer to an IAddress interface instance 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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceRequest
  • SetReferrer

IGeneralInvoiceRequest::SetReferrer method |  |  |
Sets the various identifiers (EAN, ZSR,...) and the structured address of the referrer - this is an optional part. The address is defined via a IAddress interface pointer and the address data must be defined prior to call this method. |  |  | space
C/C++ calling syntax |  |  |
HRESULT SetReferrer( | BSTR BSTR BSTR BSTR IAddress VARIANT_BOOL | bstrEAN, bstrZSR, bstrNIF, bstrSpecialty, *pIAddress, *pbStatus); |
Calling argument description |  |  |
[in] BSTR | bstrEAN | EAN number of the referrer as supplied by medwin.ch |
[in] BSTR | bstrZSR | ZSR number of the referrer as supplied by santésuisse |
[in] BSTR | bstrNIF | The IV specific identification number NIF of the referrer. |
[in] BSTR | bstrSpecialty | Specialty, i.e. FMH title of the physician. |
[in] IAddress | *pIAddress | Pointer to an IAddress interface instance 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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceRequest
  • SetReminder

IGeneralInvoiceRequest::SetReminder method |  |  |
Sets the reminder object reference parameters - in which case the all invoice object reference parameters must be defined. 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
C/C++ calling syntax |  |  |
HRESULT SetReminder( | BSTR DATE long long BSTR double VARIANT_BOOL | bstrRequestReminderID, dRequestReminderDate, lRequestReminderTimestamp, lReminderLevel, bstrReminderText, dAmountReminder, *pbStatus); |
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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceRequest
  • SetRequest

IGeneralInvoiceRequest::SetRequest method |  |  |
Sets the role and place information, the processing parameters "storno" and "copy" besides data language and 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 that is > 0 otherwise an error will result in the Finalize method. |  |  | space
C/C++ calling syntax |  |  |
HRESULT SetRequest( | RoleType PlaceType BSTR YesNoType YesNoType BSTR VARIANT_BOOL | eRoleType, ePlaceType, bstrRoleTitle, eIsStorno, eIsCopy, bstrRemark, *pbStatus); |
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] YesNoType | eIsStorno | Boolean value that defines the "storno" status of the invoice/reminder. eIsStorno should be false when the initial invoice or reminder is produced. At this step the timestamp is generated and returned in the GeneralInvoiceRequestManager::Print and/or GeneralInvoiceRequestManager::GetXML method. Whenever eIsStorno is true then the invoice or reminder timestamp must be set otherwise an error will result. |
[in] YesNoType | eIsCopy | Boolean value that defines the "copy" status of the invoice/reminder. eIsCopy should be false when the initial invoice or reminder is produced. At this step the timestamp is generated and returned in the IGeneralInvoiceRequestManager::Print and/or IGeneralInvoiceRequestRequestManager::GetXML method. Whenever eIsCopy is true then the invoice or reminder timestamp must be set otherwise an error will result. |
[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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceRequest
  • SetTiers

IGeneralInvoiceRequest::SetTiers method |  |  |
Sets the Tiers Garant (TG) or Tiers Payant (TP) mode together with the VAT number and prepaid amount. |  |  | space
C/C++ calling syntax |  |  |
HRESULT SetTiers( | TiersModeType BSTR double VARIANT_BOOL | eTiersMode, bstrVatNumber, dAmountPrepaid, *pbStatus); |
Calling argument description |  |  |
[in] TiersModeType | eTiersMode | The tiers mode ("Tiers Garant" or "Tiers Payant") to set from the TiersMode enumeration |
[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 | 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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceRequest
  • SetTransport

IGeneralInvoiceRequest::SetTransport method |  |  |
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 EAN numbers as defined by www.medwin.ch. This method allows to sign and/or encrypt the resulting XML infoset. Therefore, read the notes about signature and encryption to get familiar with these concepts. |  |  | space
C/C++ calling syntax |  |  |
HRESULT SetTransport( | BSTR BSTR BSTR BSTR BSTR BSTR VARIANT_BOOL | bstrFromEAN, bstrFromPFXFile, bstrFromPFXPassword, bstrViaEAN, bstrToEAN, bstrToBinDERFile, *pbStatus); |
Calling argument description |  |  |
[in] BSTR | bstrFromEAN | The EAN number of the sender as supplied by medwin.ch |
[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 | bstrViaEAN | The EAN number of the first intermediate as supplied by medwin.ch |
[in] BSTR | bstrToEAN | The EAN number of the recipient as supplied by medwin.ch |
[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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceRequest
  • SetTreatment

IGeneralInvoiceRequest::SetTreatment method |  |  |
Sets the primary treatment input data. |  |  | space
C/C++ calling syntax |  |  |
HRESULT SetTreatment( | DATE DATE CantonType TreatmentReasonType VARIANT_BOOL | dDateBegin, dDateEnd, eTreatmentCanton, eTreatmentReason, *pbStatus); |
Calling argument description |  |  |
[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] TreatmentReasonType | eTreatmentReason | The treatment reason given by the TreatmentReasonType 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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceRequest
  • SetXtraDrug

IGeneralInvoiceRequest::SetXtraDrug method
Sets additional drug input data for the defined service record if eRoleType=enRolePharmacist.

The defined bit positions for lRegulationAttributes as of Aug. 2010

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'urgende: 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"
 space
C/C++ calling syntax
HRESULT SetXtraDrug( long
YesNoType
BSTR
DeliveryType
long
YesNoType
VARIANT_BOOL 		lID,
eIsIndicated,
bstrIOCM,
eDelivery,
lRegulationAttributes,
eHasLimitation,
*pbStatus);
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] YesNoType | eIsIndicated | Boolean value that defines if the drug is medically indicated (enYes) or not (enNo)
[in] BSTR | bstrIOCM | Defines the official Swissmedic IOCM category of the drug given as 1-character uppercase string 'A' to 'E'
[in] DeliveryType | eDelivery | The delivery mode given by the DeliveryType enumeration
[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
[in] YesNoType | eHasLimitation | Boolean value that defines if the drug has a BAG defined limitation (enYes) or not (enNo)
[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.
C/C++ return value
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE.
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE.
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions.


  • IGeneralInvoiceRequest
  • SetXtraTreatment

IGeneralInvoiceRequest::SetXtraTreatment method
Sets additional treatment input data if eRoleType=enRoleHospital and/or ePlaceType=enPlaceHospital.

If this method is used then it does implicitly mean that the "hospital" form is used in printing the detailed invoice/reminder

space
C/C++ calling syntax
HRESULT SetXtraTreatment( TreatmentType
DATE
long
HospitalizationType
HospitalizationMode
HospitalizationClass
BSTR
YesNoType
AdmissionType
DischargeType
VARIANT_BOOL 		eTreatmentType,
dDateHospitalization,
lTreatmentDays,
eHospitalizationType,
eHospitalizationMode,
eHospitalizationClass,
bstrSectionMajor,
eHasExpenseLoading,
eAdmissionType,
eDischargeType,
*pbStatus);
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

  • None-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] 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] AdmissionType eAdmissionType The type/reason of the patient's admission given by the AdmissionType enumeration which is basically the DRG grouper admission enumeration.

This information is not used in the ambulatory case!

[in] DischargeType eDischargeType The type/reason of the patient's discharge given by the DischargeType enumeration which is basically the DRG grouper discharge enumeration.

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.
C/C++ return value
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE.
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE.
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions.


  • IGeneralInvoiceRequest
  • CreateAddress

IGeneralInvoiceRequest::CreateAddress property
Create an instance of the IAddress interface.

Any address is specified using properties and methods of this interface.

space
C/C++ calling syntax
[get] HRESULT | CreateAddress( IAddress **aIAddress);
space
Calling argument description
[out, retval] IAddress | **aIAddress
C/C++ return value
S_OK | This value is returned if the function call was successful.
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.
Remarks
If SmartPointers are used than the function names and calls are rewritten by Microsoft into the form
  • IAddress **GetCreateAddress(void);
space


  • IGeneralInvoiceRequest
  • CreateTarmedInput

IGeneralInvoiceRequest::CreateTarmedInput property
Creates an instance of the ITarmedInput interface.

Any Tarmed service is specified using properties and methods of this interface.

space
C/C++ calling syntax
[get] HRESULT | CreateTarmedInput( ITarmedInput **aITarmedInput);
space
Calling argument description
[out, retval] ITarmedInput | **aITarmedInput
C/C++ return value
S_OK | This value is returned if the function call was successful.
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.
Remarks
If SmartPointers are used than the function names and calls are rewritten by Microsoft into the form
  • ITarmedInput **GetCreateTarmedInput(void);
space


  • IGeneralInvoiceRequestManager

IGeneralInvoiceRequestManager interface | V4.30/26 Aug 2010
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 like SetPatient, SetTreatment,...

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

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 of an accepted type 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 printer settings connected with a .vps report generator file
SetLogo | Optionally sets a logo to be printed atop of the patient's summary invoice
SetLogSettings | Set the log settings for the module
Properties | 6 properties
[get] GeneralInvoiceRequest | The property GetGeneralInvoiceRequest supplies a pointer to the IGeneralInvoiceRequest interface
[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 textual version of the GeneralInvoiceRequestManager module.
[get/put] Modus | Get the operation modus
[get/put] PrintCopies | Get/Set the number of copies to print.


  • IGeneralInvoiceRequestManager
  • GetAbortInfo

IGeneralInvoiceRequestManager::GetAbortInfo method |  |  |
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
C/C++ calling syntax |  |  |
HRESULT GetAbortInfo( | BSTR VARIANT_BOOL | *pbstrAbort, *pbStatus); |
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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceRequestManager
  • GetLogSettings

IGeneralInvoiceRequestManager::GetLogSettings method
Get the log settings for the module. | space
C/C++ calling syntax
HRESULT GetLogSettings( long
long
YesNoType
BSTR
VARIANT_BOOL 		*plLogLevel,
*plMaxSizeKB,
*peDoArchive,
*pbstrArchiveDir,
*pbStatus);
Calling argument description
[out] long | *plLogLevel | eDoArchive defines if the log file is recycled if the maximum size is reached (enNo) or if the log file is archived (enYes).
[out] long *plMaxSizeKB 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] YesNoType | *peDoArchive | The base directory where log files are archived. bstrArchiveDir is only defined if eDoArchive=enYes otherwise bstrArchiveDir is empty.
[out] BSTR | *pbstrArchiveDir | 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, 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.
C/C++ return value
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE.
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE.
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions.


  • IGeneralInvoiceRequestManager
  • GetXML

IGeneralInvoiceRequestManager::GetXML method
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!

As a migration help there is a downgrade facility implemented that allows to override the generation of the V430 infosets. The downgrade to a lower versions (V400 and V410) is done by a delegation mechanism using the target version's COM module. and setting the appropriate timestamp argument plTimestamp !

Note about encryption: an encrypted XML infoset can not be loaded successfully by LoadXML. Therefore, to build a local archive besides encrypted XML infoset call GetXML twice once with the lXMLGenerationAttributes = enGenerateWithoutEncryption

space
C/C++ calling syntax
HRESULT GetXML( long
BSTR
long
long
BSTR
IGeneralInvoiceResult
VARIANT_BOOL 		lXMLGenerationAttributes,
*pbstrOutputFile,
*plValidationError,
*plTimestamp,
*pbstrUsedSchema,
**ppIGeneralInvoiceResult,
*pbStatus);
Calling argument description
[in] long lXMLGenerationAttributes This variable defines which principal parts of the XML generation should not be carried out even if the data for that part are defined. lXMLGenerationAttributes is a 32-bit integer where the possible excludes are values from the XMLGenerationAttributes data type and are 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 "toEan" entity can be produced and in a second call the XML infoset without encryption and documents (lXMLGenerationAttributes = enGenerateWithoutEncryption | enGenerateWithoutDocuments) is requested for a local archive (that can be loaded back later!).

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

[out] long | *plValidationError | lValidationError is filled with the validation error code returned by the MSXML-4 parser. A zero value indicates that the validation was successful.
[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.

Normally this would be generalInvoiceRequest_430.xsd. However, in the downgrade situation the XSD schema name is adjusted appropriately.

PATCH: by setting the plTimestamp variable as

  • lTimestamp = -323456780 - enforce upgrade
  • lTimestamp = -223456780 - enforce downgrade
the white list behavior is overridden and the downgrade or upgrade action is enforced.
[out] BSTR *pbstrUsedSchema The full XSD name that was used to generate the data.

Normally this would be generalInvoiceRequest_440.xsd. However, in the downgrade situation managed by the plTimestamp variable the XSD schema name is adjusted appropriately.

[out] IGeneralInvoiceResult **ppIGeneralInvoiceResult The IGeneralInvoiceResult interface handles 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.
C/C++ return value
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE.
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE.
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions.


  • IGeneralInvoiceRequestManager
  • LoadXML

IGeneralInvoiceRequestManager::LoadXML method
Loads a previously generated XML infoset of an accepted type back into memory for further processing via the returned interface handles. The accepted XML types are
  • generalInvoiceRequest_430.xsd
  • generalInvoiceRequest_410.xsd
  • hospitalInvoiceRequest_400.xsd
  • mdInvoiceRequest_400.xsd
If the type was lower than V430 the data is loaded and implicitly upgraded to V430 - cf. compatibility measures for the details.

This method serves as dashboard e.g. to produce a reminder from an invoice or to make a "storno" or "copy" XML infoset.

  • Load the initial XML infoset with LoadXML
  • set the reminder data with the IGeneralInvoiceRequest::SetReminder method or set the appropriate storno and/or copy values with the IGeneralInvoiceRequest::SetRequest method
  • produce the XML infoset again with the GetXML method or print the invoice/reminder with the Print method.
space
C/C++ calling syntax
HRESULT LoadXML( BSTR
BSTR
IGeneralInvoiceRequest
IGeneralInvoiceResult
VARIANT_BOOL 		bstrInputFile,
*pbstrUsedSchema,
**ppIGeneralInvoiceRequest,
**ppIGeneralInvoiceResult,
*pbStatus);
Calling argument description
[in] BSTR | bstrInputFile | The full file name (path + name) of a XML infoset of type generalInvoiceRequest_430.xsd, generalInvoiceRequest_431.xsd, hospitalInvoiceRequest_400.xsd, or mdInvoiceRequest_400.xsd.
[out] BSTR | *pbstrUsedSchema | The full XSD name of the loaded XML file.
[out] IGeneralInvoiceRequest **ppIGeneralInvoiceRequest The IGeneralInvoiceRequest interface handle that allows to add further data.
The handle is NULL if an error occurred.
[out] IGeneralInvoiceResult **ppIGeneralInvoiceResult 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.
C/C++ return value
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE.
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE.
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions.


  • IGeneralInvoiceRequestManager
  • Print

IGeneralInvoiceRequestManager::Print method
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 object dynamically.

  • "How to print webstamps" is a description about webstamps
  • "How to generate PDF archive file" is a description about PDF archive files
  • "Syntax of the printTemplate variable"

As a migration help there is a downgrade facility implemented that allows to override the generation of the V430 infosets. The downgrade to a lower versions (V400 and V410) is done by a delegation mechanism using the target version's COM module. and setting the appropriate timestamp argument plTimestamp !

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
C/C++ calling syntax
HRESULT Print( BSTR
YesNoType
YesNoType
YesNoType
long
BSTR
IAddress
long
BSTR
IGeneralInvoiceResult
VARIANT_BOOL 		bstrPrintTemplate,
ePrintPreview,
eAddressRight,
eSortTimeTariff,
lEsrExcludeAttributes,
bstrSenderID,
*pIReceiverAddress,
*plTimestamp,
*pbstrUsedSchema,
**ppIGeneralInvoiceResult,
*pbStatus);
Calling argument description
[in] BSTR bstrPrintTemplate The bstrPrintTemplate is either empty or build as defined in "Syntax of the printTemplate variable".

If bstrPrintTemplate is empty then the default print template of the supplied data language (IGeneralInvoiceRequest::Initialize method) is used.

[in] YesNoType | ePrintPreview | A Boolean that defines if print preview is used (enYes) or printing is done (enNo)
[in] YesNoType eAddressRight A Boolean that defines on which side -left or right- the receiver address should be printed.

Note that currently only right-sided addressing is allowed. Therefore eAddressRight is internally always set to enYes.

[in] YesNoType eSortTimeTariff A Boolean that defines how the services are sorted:
  • primary axis: ascending date, secondary axis ascending tariff number (enYes)
  • primary axis: ascending tariff number, secondary axis ascending date (enNo)
[in] long lEsrExcludeAttributes This variable defines which principal parts of the ESR should not be printed. lEsrExcludeAttributes is a 32-bit integer where the possible excludes are values from the EsrExcludeAttributes data type and are ORed together to form the overall command.

This feature is necessary to exclude certain parts of the ESR data from printing due the pre-printed forms.

[in] BSTR bstrSenderID Short sender address identification or empty.

If set then the sender identification is printed atop of the receiver address as an alternative to the sender address on the envelop.

[in] IAddress *pIReceiverAddress An optional receiver address given via an IAddress interface.

This is used whenever the supplied insurance should be overridden as receiver by the supplied address. Note that the "inner" data is not affected or changed by this override.

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

PATCH: by setting the plTimestamp variable as

  • lTimestamp = -323456780 - enforce upgrade
  • lTimestamp = -223456780 - enforce downgrade
the white list behavior is overridden and the downgrade or upgrade action is enforced.
[out] BSTR *pbstrUsedSchema The full XSD name that was used to print the data.

Normally this would be generalInvoiceRequest_430.xsd. However, in the downgrade situation managed by the plTimestamp variable the XSD schema name is adjusted appropriately.

[out] IGeneralInvoiceResult **ppIGeneralInvoiceResult 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.
C/C++ return value
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE.
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE.
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions.


  • IGeneralInvoiceRequestManager
  • PrintAdjust

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

The method allows to manipulate the print objects for lower versions than V430. However, special logical names must be used - compatibility measures for the details.

space
C/C++ calling syntax
HRESULT PrintAdjust( BSTR
BSTR
VARIANT_BOOL 		bstrPrintTemplate,
bstrINIPath,
*pbStatus);
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_address_side_language
or
Detail_typeaddress_side_language

where
  • address_side is R for right sided addressing or L for left sided addressing of the recipient.
    This is fixed to R for the Detail .vps form
  • type is the type of form to use where G ist for the general non-stationary case whereas H is for the stationary case.
  • language is one of {dt, fr, it}.
For example the logical name "Detail_HR_fr" is the French print template 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.
C/C++ return value
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE.
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE.
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions.


  • IGeneralInvoiceRequestManager
  • PrintSetup

IGeneralInvoiceRequestManager::PrintSetup method
Shows the printer setup dialog that allows to define printer settings connected with a .vps report generator file.

The method allows to define the printers for lower versions than V430. However, special logical names must be used - compatibility measures for the details.

space
C/C++ calling syntax
HRESULT PrintSetup( BSTR
BSTR
VARIANT_BOOL 		bstrPrintTemplate,
bstrINIPath,
*pbStatus);
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_address_side_language
or
Detail_typeaddress_side_language

where
  • address_side is R for right sided addressing or L for left sided addressing of the recipient.
    This is fixed to R for the Detail .vps form
  • type is the type of form to use where G ist for the general non-stationary case whereas H is for the stationary case.
  • language is one of {dt, fr, it}.
For example the logical name "Detail_HR_fr" is the French print template 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.
C/C++ return value
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE.
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE.
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions.


  • IGeneralInvoiceRequestManager
  • SetLogo

IGeneralInvoiceRequestManager::SetLogo method |  |  |
Optionally sets a logo to be printed atop of the patient's summary invoice. Since the detailed invoice for the insurance is standardized the logo can not be printed there. |  |  | space
C/C++ calling syntax |  |  |
HRESULT SetLogo( | BSTR long long VARIANT_BOOL | bstrBMPLogoFile, lMMWidth, lMMHeigth, *pbStatus); |
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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceRequestManager
  • SetLogSettings

IGeneralInvoiceRequestManager::SetLogSettings method
Set the log settings for the module.

The defaults 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
C/C++ calling syntax
HRESULT SetLogSettings( long
long
YesNoType
BSTR
VARIANT_BOOL 		lLogLevel,
lMaxSizeKB,
eDoArchive,
bstrArchiveDir,
*pbStatus);
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.
C/C++ return value
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE.
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE.
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions.


  • IGeneralInvoiceRequestManager
  • GeneralInvoiceRequest

IGeneralInvoiceRequestManager::GeneralInvoiceRequest property
The property GetGeneralInvoiceRequest supplies a pointer to the IGeneralInvoiceRequest interface.

This interface pointer is needed to set all the data.

space
C/C++ calling syntax
[get] HRESULT | GeneralInvoiceRequest( IGeneralInvoiceRequest **aIGeneralInvoiceRequest);
space
Calling argument description
[out, retval] IGeneralInvoiceRequest | **aIGeneralInvoiceRequest
C/C++ return value
S_OK | This value is returned if the function call was successful.
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.
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
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
C/C++ calling syntax
[get] HRESULT | ModuleLanguage( LanguageType *aLanguageType);
[put] HRESULT | ModuleLanguage( LanguageType aLanguageType);
space
Calling argument description
[out,retval] LanguageType | *aLanguageType
[in] LanguageType | aLanguageType
C/C++ return value
S_OK | This value is returned if the function call was successful.
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.
Remarks
If SmartPointers are used than the function names and calls are rewritten by Microsoft into the form
  • LanguageType *GetModuleLanguage(void);
  • void PutModuleLanguage( LanguageType aLanguageType);
space


  • IGeneralInvoiceRequestManager
  • ModuleVersion

IGeneralInvoiceRequestManager::ModuleVersion property
Get the version of the GeneralInvoiceRequestManager module. | space
C/C++ calling syntax
[get] HRESULT | ModuleVersion( BSTR *aBSTR);
space
Calling argument description
[out, retval] BSTR | *aBSTR
C/C++ return value
S_OK | This value is returned if the function call was successful.
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.
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
Get the textual version of the GeneralInvoiceRequestManager module. | space
C/C++ calling syntax
[get] HRESULT | ModuleVersionText( BSTR *aBSTR);
space
Calling argument description
[out, retval] BSTR | *aBSTR
C/C++ return value
S_OK | This value is returned if the function call was successful.
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.
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
Get the operation modus.

The default modus is enProduction whereas for developing/debugging purposes enTest can be set.

space
C/C++ calling syntax
[get] HRESULT | Modus( ModusType *aModusType);
[put] HRESULT | Modus( ModusType aModusType);
space
Calling argument description
[out,retval] ModusType | *aModusType
[in] ModusType | aModusType
C/C++ return value
S_OK | This value is returned if the function call was successful.
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.
Remarks
If SmartPointers are used than the function names and calls are rewritten by Microsoft into the form
  • ModusType *GetModus(void);
  • void PutModus( ModusType aModusType);
space


  • IGeneralInvoiceRequestManager
  • PrintCopies

IGeneralInvoiceRequestManager::PrintCopies property
Get/Set the number of copies to print. | space
C/C++ calling syntax
[get] HRESULT | PrintCopies( long *along);
[put] HRESULT | PrintCopies( long along);
space
Calling argument description
[out,retval] long | *along
[in] long | along
C/C++ return value
S_OK | This value is returned if the function call was successful.
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.
Remarks
If SmartPointers are used than the function names and calls are rewritten by Microsoft into the form
  • long *GetPrintCopies(void);
  • void PutPrintCopies( long along);
space


  • IGeneralInvoiceResult

IGeneralInvoiceResult interface |  | V4.30/26 Aug 2010
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 IGeneralInvoiceRequestManger::LoadXML method. |  | space
Methods |  | 35 methods
GetAbortInfo | Get the abort information string with the error coded in the module language |
GetBalance | Retrieves the balance information. |
GetBiller | Retrieves the various identifiers (EAN, ZSR,...) and the structured address of the biller |
GetCard | Retrieves the patient's insurance card information (might be the patient card later on) |
GetCredit | Retrieves the optional credit object reference parameters |
GetEmployer | Retrieves the various identifiers (EAN, Reg number,...) and the structured address of the employer of the patient |
GetEsr | Retrieves the ESR 5 or 9 information if the ESR type is not enRedPayinSlip |
GetEsrRed | Retrieves the ESR Red (red payin slip) information if the ESR type is enRedPayinSlip |
GetEsrType | Retrieves the type of the ESR. |
GetFirstDiagnosis | Retrieves the first diagnosis |
GetFirstDocument | Retrieves the first document |
GetFirstService | Retrieves the first none-Tarmed service record |
GetFirstTarmedService | Retrieves the first Tarmed service record |
GetFirstVat | Retrieves the first VAT information |
GetGuarantor | Retrieves the structured address of the guarantor of the patient that is the patient himself or his legal representative |
GetInsurance | Retrieves the EAN and the structured address of the insurance |
GetInvoice | Retrieves the invoice object reference parameters |
GetLaw | Retrieves the data about the applied and its dependent information |
GetNextDiagnosis | Retrieves the next diagnosis |
GetNextDocument | Retrieves the next document |
GetNextService | Retrieves the next none-Tarmed service record |
GetNextTarmedService | Retrieves the next Tarmed service record |
GetNextVat | Retrieves the next vat information |
GetPackage | Retrieves the identification parameters of the main software that used this DLL. |
GetPatient | Retrieves the primary parameters and structured address of the patient |
GetProcessing | Retrieves the processing information used at the last intermediate's side. |
GetProvider | Retrieves the various identifiers (EAN, ZSR,...) and the structured address of the main provider |
GetReferrer | Retrieves the various identifiers (EAN, ZSR,...) and the structured address of the referrer |
GetReminder | Retrieves the reminder object reference parameters |
GetRequest | Retrieves the role and place information, the processing parameters "storno" and "copy" besides data language and optional remark. |
GetTiers | Retrieves the Tiers Garant (TG) or Tiers Payant (TP) mode together with the VAT number and prepaid amount. |
GetTransport | Returns the transport information that is the routing information going from a sender (from) over the first intermediate (via) to the receiver (to) |
GetTreatment | Retrieves the primary treatment input data. |
GetXtraDrug | Retrieves additional drug input data for the defined service record if eRoleType=enRolePharmacist |
GetXtraTreatment | Retrieves the additional treatment input data if eRoleType=enRoleHospital and/or ePlaceType=enPlaceHospital |
Properties |  | 0 properties


  • IGeneralInvoiceResult
  • GetAbortInfo

IGeneralInvoiceResult::GetAbortInfo method |  |  |
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
C/C++ calling syntax |  |  |
HRESULT GetAbortInfo( | BSTR VARIANT_BOOL | *pbstrAbort, *pbStatus); |
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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceResult
  • GetBalance

IGeneralInvoiceResult::GetBalance method |  |  |
Retrieves the balance information. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetBalance( | double double double double double double VARIANT_BOOL | *pdAmount, *pdAmountObligatory, *pdAmountPrepaid, *pdAmountReminder, *pdAmountDue, *pdAmountVat, *pbStatus); |
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 | *pdAmountObligatory | The total amount in CHF of obligatory services (eIsObligatory = enObligationYes) accumulated over the 2-digit precision service amounts. Therefore, the amount implicitly has a 2-digit precision as well. Note that amount might be 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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceResult
  • GetBiller

IGeneralInvoiceResult::GetBiller method |  |  |
Retrieves the various identifiers (EAN, ZSR,...) and the structured address of the biller. The biller's address is used as creditor address in the ESR part as well. The IAddress interface might be NULL if no address was defined. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetBiller( | BSTR BSTR BSTR BSTR IAddress VARIANT_BOOL | *pbstrEAN, *pbstrZSR, *pbstrNIF, *pbstrSpecialty, **ppIAddress, *pbStatus); |
Calling argument description |  |  |
[out] BSTR | *pbstrEAN | EAN number of the biller as supplied by medwin.ch |
[out] BSTR | *pbstrZSR | ZSR number of the biller as supplied by santésuisse |
[out] BSTR | *pbstrNIF | The IV specific identification number NIF of the biller. |
[out] BSTR | *pbstrSpecialty | The specialty, i.e. FMH title of a physician. |
[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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceResult
  • GetCard

IGeneralInvoiceResult::GetCard method |  |  |
Retrieves the patient's insurance card information (might be the patient card later on). VARIANT_FALSE is returned if the data are not defined. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetCard( | BSTR DATE DATE BSTR BSTR VARIANT_BOOL | *pbstrCardID, *pdExpiryDate, *pdValidationDate, *pbstrValidationID, *pbstrValidationServer, *pbStatus); |
Calling argument description |  |  |
[out] BSTR | *pbstrCardID | The mandatory unique 20 digits card identifier |
[out] DATE | *pdExpiryDate | The mandatory expiry date of the card |
[out] DATE | *pdValidationDate | The optional date of the last validation of the card's data |
[out] BSTR | *pbstrValidationID | The optional replied ID when the last validation of the card's data was performed |
[out] BSTR | *pbstrValidationServer | The optional server for the last validation process |
[out, retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE the data are undefined |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceResult
  • GetCredit

IGeneralInvoiceResult::GetCredit method |  |  |
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
C/C++ calling syntax |  |  |
HRESULT GetCredit( | BSTR DATE long VARIANT_BOOL | *pbstrRequestCreditID, *pdRequestCreditDate, *plRequestCreditTimestamp, *pbStatus); |
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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceResult
  • GetEmployer

IGeneralInvoiceResult::GetEmployer method |  |  |
Retrieves the various identifiers (EAN, Reg number,...) and the structured address of the employer of the patient. The IAddress interface might be NULL if no address was defined. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetEmployer( | BSTR BSTR IAddress VARIANT_BOOL | *pbstrEAN, *pbstrRegNumber, **ppIAddress, *pbStatus); |
Calling argument description |  |  |
[out] BSTR | *pbstrEAN | EAN number of the employer as supplied by medwin.ch |
[out] BSTR | *pbstrRegNumber | The employer's national BER number as defined by Swiss Federal Statistical Office |
[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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceResult
  • GetEsr

IGeneralInvoiceResult::GetEsr method |  |  |
Retrieves the ESR 5 or 9 information if the ESR type is not enRedPayinSlip Call this method only if GetEsrType does not return enRedPayinSlip otherwise the ESR information are undefined. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetEsr( | EsrType BSTR BSTR BSTR IAddress long VARIANT_BOOL | *peEsrType, *pbstrParticipantNumber, *pbstrReferenceNumber, *pbstrBankAccount, **ppIBankAddress, *plPaymentPeriod, *pbStatus); |
Calling argument description |  |  |
[out] EsrType | *peEsrType | ESR 5 or 9 type |
[out] BSTR | *pbstrParticipantNumber | ESR participant number |
[out] BSTR | *pbstrReferenceNumber | ESR reference number |
[out] BSTR | *pbstrBankAccount | ESR bank account number |
[out] IAddress | **ppIBankAddress | The IBankAddress is an IAddress interface handle to the bank address. The handle allows to get the bank's structured address data back. 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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceResult
  • GetEsrRed

IGeneralInvoiceResult::GetEsrRed method |  |  |
Retrieves the ESR Red (red payin slip) information if the ESR type is enRedPayinSlip Call this method only if GetEsrType returns enRedPayinSlip otherwise the ESR Red information are undefined. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetEsrRed( | BSTR BSTR BSTR BSTR IAddress long VARIANT_BOOL | *pbstrPostAccount, *pbstrIBAN, *pbstrReferenceNumber, *pbstrRemarks, **ppIBankAddress, *plPaymentPeriod, *pbStatus); |
Calling argument description |  |  |
[out] BSTR | *pbstrPostAccount | Postal account number |
[out] BSTR | *pbstrIBAN | The IBAN number The IBAN number is defined only if it is a bank transaction - the IBankAddress interface handle is not NULL in this situation. |
[out] BSTR | *pbstrReferenceNumber | Reference number with the coded bank account if it is a bank transaction Note that this reference number is copied to the remarks section if it is a postal based invoice because there is no reference section in the coding line 1. |
[out] BSTR | *pbstrRemarks | The optional remark that should be printed on the payin slip |
[out] IAddress | **ppIBankAddress | The IBankAddress is an IAddress interface handle to the bank address. The handle allows to get the bank's structured address data back. If no address is defined then the handle is NULL. |
[out] long | *plPaymentPeriod | Payment period for the invoice/reminder |
[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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceResult
  • GetEsrType

IGeneralInvoiceResult::GetEsrType method |  |  |
Retrieves the type of the ESR. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetEsrType( | EsrType VARIANT_BOOL | *peEsrType, *pbStatus); |
Calling argument description |  |  |
[out] EsrType | *peEsrType | Defines the type of ESR as defined 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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceResult
  • GetFirstDiagnosis

IGeneralInvoiceResult::GetFirstDiagnosis method |  |  |
Retrieves the first diagnosis. VARIANT_FALSE is returned if the end of the diagnosis list is reached. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetFirstDiagnosis( | DiagnosisType BSTR BSTR VARIANT_BOOL | *peDiagnosisType, *pbstrCode, *pbstrText, *pbStatus); |
Calling argument description |  |  |
[out] DiagnosisType | *peDiagnosisType | The type of the diagnosis |
[out] BSTR | *pbstrCode | The code of the diagnosis as given in the corresponding diagnosis catalog defined by eDiagnosisType . |
[out] BSTR | *pbstrText | Textual description of the code as given in the corresponding diagnosis catalog defined by eDiagnosisType . |
[out, retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE the end of data is reached |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceResult
  • GetFirstDocument

IGeneralInvoiceResult::GetFirstDocument method |  |  |
Retrieves the first document. VARIANT_FALSE is returned if the end of the document list is reached. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetFirstDocument( | YesNoType BSTR BSTR BSTR BSTR VARIANT_BOOL | *peIsURL, *pbstrSource, *pbstrFilename, *pbstrMimeType, *pbstrViewer, *pbStatus); |
Calling argument description |  |  |
[out] YesNoType | *peIsURL | Boolean that defines if the document is defined online using a URL (enYes) or inline as Base64 coded stream (enNo). |
[out] BSTR | *pbstrSource | If eIsURL = enYes then bstrSource is a URL for accessing the file online. If eIsURL = enNo then bstrSource is a full file name (path + name). |
[out] BSTR | *pbstrFilename | The name of the file (without path) in the local file system. |
[out] BSTR | *pbstrMimeType | The MIME type of the document. |
[out] BSTR | *pbstrViewer | The optional URL where a viewer for the file can be downloaded. |
[out, retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE the end of data is reached |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceResult
  • GetFirstService

IGeneralInvoiceResult::GetFirstService method |  |  |
Retrieves the first none-Tarmed service record VARIANT_FALSE is returned if the end of the none-Tarmed service list is reached. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetFirstService( | BSTR BSTR BSTR double long DATE BSTR BSTR BSTR double double double double double YesNoType BSTR BSTR YesNoType long long VARIANT_BOOL | *pbstrTariffType, *pbstrCode, *pbstrReferenceCode, *pdQuantity, *plSessionNumber, *pdDate, *pbstrProviderEAN, *pbstrResponsibleEAN, *pbstrText, *pdUnit, *pdUnitFactor, *pdExternalScalingFactor, *pdAmount, *pdVatRate, *peIsObligatory, *pbstrRemark, *pbstrSectionCode, *peIgnoreValidate, *plServiceAttributes, *plID, *pbStatus); |
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 if one must be supplied (otherwise bstrReferenceCode is ignored) |
[out] double | *pdQuantity | The floating point quantity. Note that quantity changes the sign if a credit advice or a storno request is produced. |
[out] long | *plSessionNumber | The session number - use a session value of 1 if no session concept is established for the used tariff |
[out] DATE | *pdDate | The date of the service's application |
[out] BSTR | *pbstrProviderEAN | EAN number of the service provider party. Note if bstrProviderEAN is undefined and bstrResponsibleEAN is defined then bstrResponsibleEAN is copied into the bstrProviderEAN variable. If both variables are undefined the pseudo EAN "2099999999999" is set. |
[out] BSTR | *pbstrResponsibleEAN | EAN number of the service responsible party. Note if bstrResponsibleEAN is undefined and bstrProviderEAN is defined then bstrProviderEAN is copied into the bstrResponsibleEAN variable. If both variables are undefined the pseudo EAN "2099999999999" is set. |
[out] BSTR | *pbstrText | The service name as defined by the used tariff |
[out] double | *pdUnit | Tax points of the service. |
[out] double | *pdUnitFactor | Tax point value of the service. |
[out] double | *pdExternalScalingFactor | The external scaling factor used to scale the tax point value e.g. to give a discount |
[out] double | *pdAmount | The amount in CHF of the service supplied in 2-digit precision. Note that amount changes the sign if a credit advice or a storno request is produced. |
[out] double | *pdVatRate | The VAT rate that should be applied to this service. |
[out] YesNoType | *peIsObligatory | Enumerator indicating whether the given service record is obligatory regarding the given law (UVG,KVG,...). If the enumerator is set to enObligationAutomatic then the status is set internally using some ad hoc rules. |
[out] BSTR | *pbstrRemark | An optional remark for the given service |
[out] BSTR | *pbstrSectionCode | An optional BfS section code where the service was applied as defined by Swiss Federal Statistical Office - this code is only given for eRoleType=enRoleHospital! |
[out] YesNoType | *peIgnoreValidate | Flag indicating whether the validation was ignored. 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. |
[out] long | *plServiceAttributes | lServiceAttributes is a 32-bit integer where each bit position defines a special information. Currently only Bit 1 (0x000001) is defined. It applies to drug services only and means "Code 207" aka "Drug must not be substituted due to medical reasons". |
[out] long | *plID | This is the internal ID of the service record. This internal ID is used to append extra drug information to this service with the /IGeneralInvoiceRequest::SetXtraDrug method |
[out, retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE the end of data is reached |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceResult
  • GetFirstTarmedService

IGeneralInvoiceResult::GetFirstTarmedService method |  |  |
Retrieves the first Tarmed service record VARIANT_FALSE is returned if the end of the Tarmed service list is reached. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetFirstTarmedService( | BSTR BSTR BSTR double long DATE SideType BSTR double double double double double double double double double double YesNoType BSTR BSTR YesNoType long TreatmentType double double BSTR BSTR BillingRoleType MedicalRoleType long VARIANT_BOOL | *pbstrTariffType, *pbstrCode, *pbstrReferenceCode, *pdQuantity, *plSessionNumber, *pdDate, *peSide, *pbstrText, *pdUnitMT, *pdUnitFactorMT, *pdUnitInternalScalingFactorMT, *pdAmountMT, *pdUnitTT, *pdUnitFactorTT, *pdUnitInternalScalingFactorTT, *pdAmountTT, *pdAmount, *pdVatRate, *peIsObligatory, *pbstrRemark, *pbstrSectionCode, *peIgnoreValidate, *plServiceAttributes, *peTreatmentType, *pdExternalScalingFactorMT, *pdExternalScalingFactorTT, *pbstrProviderEAN, *pbstrResponsibleEAN, *peBillingRole, *peMedicalRole, *plID, *pbStatus); |
Calling argument description |  |  |
[out] BSTR | *pbstrTariffType | The official Tarmed tariff type. The tariff type is currently ignored and fixed to "001" |
[out] BSTR | *pbstrCode | The Tarmed service code. |
[out] BSTR | *pbstrReferenceCode | The Tarmed reference code if one must be supplied otherwise empty |
[out] double | *pdQuantity | The floating point quantity. Note that quantity changes the sign if a credit advice or a storno request is produced. |
[out] long | *plSessionNumber | The Tarmed session number |
[out] DATE | *pdDate | The date of the service's application |
[out] SideType | *peSide | The Tarmed side type |
[out] BSTR | *pbstrText | The service name as defined by the Tarmed tariff |
[out] double | *pdUnitMT | Tax points for the medical Tarmed part of the service. |
[out] double | *pdUnitFactorMT | Tax points for the medical Tarmed part of the service. |
[out] double | *pdUnitInternalScalingFactorMT | Internal scaling factor for medical part of the Tarmed service. |
[out] double | *pdAmountMT | The amount in CHF for the medical part of the Tarmed service supplied in 2-digit precision. Note that medical amount changes the sign if a credit advice or a storno request is produced. |
[out] double | *pdUnitTT | Tax points for the technical Tarmed part of the service. |
[out] double | *pdUnitFactorTT | Tax points for the technical Tarmed part of the service. |
[out] double | *pdUnitInternalScalingFactorTT | Internal scaling factor for technical part of the Tarmed service. |
[out] double | *pdAmountTT | The amount in CHF for the technical part of the Tarmed service supplied in 2-digit precision. Note that technical amount changes the sign if a credit advice or a storno request is produced. |
[out] double | *pdAmount | The amount in CHF of the Tarmed service as sum from the MT and TT part supplied in 2-digit precision. Note that amount changes the sign if a credit advice or a storno request is produced. |
[out] double | *pdVatRate | The VAT rate that should be applied to this service. |
[out] YesNoType | *peIsObligatory | Enumerator indicating whether the given service record is obligatory regarding the given law (UVG,KVG,...). If the enumerator is set to enObligationAutomatic then the status is set internally using some ad hoc rules. |
[out] BSTR | *pbstrRemark | An optional remark for the given service |
[out] BSTR | *pbstrSectionCode | An optional BfS section code where the service was applied as defined by Swiss Federal Statistical Office - this code is only given for eRoleType=enRoleHospital! |
[out] YesNoType | *peIgnoreValidate | Flag indicating whether the validation was ignored. 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. |
[out] long | *plServiceAttributes | lServiceAttributes is a 32-bit integer where each bit position defines a special information. Currently only Bit 1 (0x000001) is defined. It applies to drug services only and means "Code 207" aka "Drug must not be substituted due to medical reasons". |
[out] TreatmentType | *peTreatmentType | The type of treatment (ambulatory or stationary) given by the TreatmentType enumeration |
[out] double | *pdExternalScalingFactorMT | The external scaling factor of the medical part used to scale the tax point value e.g. to give a discount Note that due to backwards compatibility the external scale factor of the medical part is defined with the ITarmedInput::ExternalFactor_MT property |
[out] double | *pdExternalScalingFactorTT | The external scaling factor of the medical part used to scale the tax point value e.g. to give a discount Note that due to backwards compatibility the external scale factor of the technical part is defined with the ITarmedInput::ExternalFactor_TT property |
[out] BSTR | *pbstrProviderEAN | EAN number of the service provider party. Note if bstrProviderEAN is undefined and bstrResponsibleEAN is defined then bstrResponsibleEAN is copied into the bstrProviderEAN variable. If both variables are undefined the pseudo EAN "2099999999999" is set. |
[out] BSTR | *pbstrResponsibleEAN | EAN number of the service responsible party. Note if bstrResponsibleEAN is undefined and bstrProviderEAN is defined then bstrProviderEAN is copied into the bstrResponsibleEAN variable. If both variables are undefined the pseudo EAN "2099999999999" is set. |
[out] BillingRoleType | *peBillingRole | The Tarmed billing role used for this service |
[out] MedicalRoleType | *peMedicalRole | The Tarmed medical role used for this service |
[out] long | *plID | This is the 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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceResult
  • GetFirstVat

IGeneralInvoiceResult::GetFirstVat method |  |  |
Retrieves the first VAT information. VARIANT_FALSE is returned if the end of the VAT list is reached. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetFirstVat( | double double VARIANT_BOOL | *pdVat, *pdVatRate, *pbStatus); |
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 |
[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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceResult
  • GetGuarantor

IGeneralInvoiceResult::GetGuarantor method |  |  |
Retrieves the structured address of the guarantor of the patient that is the patient himself or his legal representative. If the guarantor's address is not set then the patient's address is automatically cloned as guarantor address. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetGuarantor( | IAddress VARIANT_BOOL | **ppIAddress, *pbStatus); |
Calling argument description |  |  |
[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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceResult
  • GetInsurance

IGeneralInvoiceResult::GetInsurance method |  |  |
Retrieves the EAN and the structured address of the insurance. The address is defined via a IAddress interface pointer and the address data must be defined prior to call this method. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetInsurance( | BSTR IAddress VARIANT_BOOL | *pbstrEAN, **ppIAddress, *pbStatus); |
Calling argument description |  |  |
[out] BSTR | *pbstrEAN | EAN number of the insurance as supplied by medwin.ch |
[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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceResult
  • GetInvoice

IGeneralInvoiceResult::GetInvoice method |  |  |
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
C/C++ calling syntax |  |  |
HRESULT GetInvoice( | BSTR DATE long BSTR VARIANT_BOOL | *pbstrRequestInvoiceID, *pdRequestInvoiceDate, *plRequestInvoiceTimestamp, *pbstrRequestPatientID, *pbStatus); |
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] BSTR | *pbstrRequestPatientID | The patient ID is the main software's identification of the patient ("Patientennummer"). This parameter is not part of a object reference and only present in an 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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceResult
  • GetLaw

IGeneralInvoiceResult::GetLaw method |  |  |
Retrieves the data about the applied and its dependent information |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetLaw( | LawType DATE BSTR BSTR BSTR VARIANT_BOOL | *peLawType, *pdCaseDate, *pbstrCaseID, *pbstrInsuredID, *pbstrContractNumber, *pbStatus); |
Calling argument description |  |  |
[out] LawType | *peLawType | The type of law to set from the LawType enumeration |
[out] DATE | *pdCaseDate | The case date of the insurance (e.g. date of accident in UVG) This date might undefined for certain laws and therefore left empty |
[out] BSTR | *pbstrCaseID | The case ID of the insurance (e.g. accident number in UVG) This ID might undefined for certain laws and therefore left empty |
[out] BSTR | *pbstrInsuredID | The patient's ID at the insurance This ID might undefined for certain laws and therefore left empty |
[out] BSTR | *pbstrContractNumber | Contract number if such a special contract exists between provider and insurance |
[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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceResult
  • GetNextDiagnosis

IGeneralInvoiceResult::GetNextDiagnosis method |  |  |
Retrieves the next diagnosis. VARIANT_FALSE is returned if the end of the diagnosis list is reached. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetNextDiagnosis( | DiagnosisType BSTR BSTR VARIANT_BOOL | *peDiagnosisType, *pbstrCode, *pbstrText, *pbStatus); |
Calling argument description |  |  |
[out] DiagnosisType | *peDiagnosisType | The type of the diagnosis |
[out] BSTR | *pbstrCode | The code of the diagnosis as given in the corresponding diagnosis catalog defined by eDiagnosisType . |
[out] BSTR | *pbstrText | Textual description of the code as given in the corresponding diagnosis catalog defined by eDiagnosisType . |
[out, retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE the end of data is reached |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceResult
  • GetNextDocument

IGeneralInvoiceResult::GetNextDocument method |  |  |
Retrieves the next document VARIANT_FALSE is returned if the end of the document list is reached. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetNextDocument( | YesNoType BSTR BSTR BSTR BSTR VARIANT_BOOL | *peIsURL, *pbstrSource, *pbstrFilename, *pbstrMimeType, *pbstrViewer, *pbStatus); |
Calling argument description |  |  |
[out] YesNoType | *peIsURL | Boolean that defines if the document is defined online using a URL (enYes) or inline as Base64 coded stream (enNo). |
[out] BSTR | *pbstrSource | If eIsURL = enYes then bstrSource is a URL for accessing the file online. If eIsURL = enNo then bstrSource is a full file name (path + name). |
[out] BSTR | *pbstrFilename | The name of the file (without path) in the local file system. |
[out] BSTR | *pbstrMimeType | The MIME type of the document. |
[out] BSTR | *pbstrViewer | The optional URL where a viewer for the file can be downloaded. |
[out, retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE the end of data is reached |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceResult
  • GetNextService

IGeneralInvoiceResult::GetNextService method |  |  |
Retrieves the next none-Tarmed service record VARIANT_FALSE is returned if the end of the none-Tarmed service list is reached. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetNextService( | BSTR BSTR BSTR double long DATE BSTR BSTR BSTR double double double double double YesNoType BSTR BSTR YesNoType long long VARIANT_BOOL | *pbstrTariffType, *pbstrCode, *pbstrReferenceCode, *pdQuantity, *plSessionNumber, *pdDate, *pbstrProviderEAN, *pbstrResponsibleEAN, *pbstrText, *pdUnit, *pdUnitFactor, *pdExternalScalingFactor, *pdAmount, *pdVatRate, *peIsObligatory, *pbstrRemark, *pbstrSectionCode, *peIgnoreValidate, *plServiceAttributes, *plID, *pbStatus); |
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 if one must be supplied (otherwise bstrReferenceCode is ignored) |
[out] double | *pdQuantity | The floating point quantity. Note that quantity changes the sign if a credit advice or a storno request is produced. |
[out] long | *plSessionNumber | The session number - use a session value of 1 if no session concept is established for the used tariff |
[out] DATE | *pdDate | The date of the service's application |
[out] BSTR | *pbstrProviderEAN | EAN number of the service provider party. Note if bstrProviderEAN is undefined and bstrResponsibleEAN is defined then bstrResponsibleEAN is copied into the bstrProviderEAN variable. If both variables are undefined the pseudo EAN "2099999999999" is set. |
[out] BSTR | *pbstrResponsibleEAN | EAN number of the service responsible party. Note if bstrResponsibleEAN is undefined and bstrProviderEAN is defined then bstrProviderEAN is copied into the bstrResponsibleEAN variable. If both variables are undefined the pseudo EAN "2099999999999" is set. |
[out] BSTR | *pbstrText | The service name as defined by the used tariff |
[out] double | *pdUnit | Tax points of the service. |
[out] double | *pdUnitFactor | Tax point value of the service. |
[out] double | *pdExternalScalingFactor | The external scaling factor used to scale the tax point value e.g. to give a discount |
[out] double | *pdAmount | The amount in CHF of the service supplied in 2-digit precision. Note that amount changes the sign if a credit advice or a storno request is produced. |
[out] double | *pdVatRate | The VAT rate that should be applied to this service. |
[out] YesNoType | *peIsObligatory | Enumerator indicating whether the given service record is obligatory regarding the given law (UVG,KVG,...). If the enumerator is set to enObligationAutomatic then the status is set internally using some ad hoc rules. |
[out] BSTR | *pbstrRemark | An optional remark for the given service |
[out] BSTR | *pbstrSectionCode | An optional BfS section code where the service was applied as defined by Swiss Federal Statistical Office - this code is only given for eRoleType=enRoleHospital! |
[out] YesNoType | *peIgnoreValidate | Flag indicating whether the validation was ignored. 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. |
[out] long | *plServiceAttributes | lServiceAttributes is a 32-bit integer where each bit position defines a special information. Currently only Bit 1 (0x000001) is defined. It applies to drug services only and means "Code 207" aka "Drug must not be substituted due to medical reasons". |
[out] long | *plID | This is the internal ID of the service record. This internal ID is used to append extra drug information to this service with the /IGeneralInvoiceRequest::SetXtraDrug method |
[out, retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE the end of data is reached |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceResult
  • GetNextTarmedService

IGeneralInvoiceResult::GetNextTarmedService method |  |  |
Retrieves the next Tarmed service record VARIANT_FALSE is returned if the end of the Tarmed service list is reached. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetNextTarmedService( | BSTR BSTR BSTR double long DATE SideType BSTR double double double double double double double double double double YesNoType BSTR BSTR YesNoType long TreatmentType double double BSTR BSTR BillingRoleType MedicalRoleType long VARIANT_BOOL | *pbstrTariffType, *pbstrCode, *pbstrReferenceCode, *pdQuantity, *plSessionNumber, *pdDate, *peSide, *pbstrText, *pdUnitMT, *pdUnitFactorMT, *pdUnitInternalScalingFactorMT, *pdAmountMT, *pdUnitTT, *pdUnitFactorTT, *pdUnitInternalScalingFactorTT, *pdAmountTT, *pdAmount, *pdVatRate, *peIsObligatory, *pbstrRemark, *pbstrSectionCode, *peIgnoreValidate, *plServiceAttributes, *peTreatmentType, *pdExternalScalingFactorMT, *pdExternalScalingFactorTT, *pbstrProviderEAN, *pbstrResponsibleEAN, *peBillingRole, *peMedicalRole, *plID, *pbStatus); |
Calling argument description |  |  |
[out] BSTR | *pbstrTariffType | The official Tarmed tariff type. The tariff type is currently ignored and fixed to "001" |
[out] BSTR | *pbstrCode | The Tarmed service code. |
[out] BSTR | *pbstrReferenceCode | The Tarmed reference code if one must be supplied otherwise empty |
[out] double | *pdQuantity | The floating point quantity. Note that quantity changes the sign if a credit advice or a storno request is produced. |
[out] long | *plSessionNumber | Session number. |
[out] DATE | *pdDate | The date of the service's application |
[out] SideType | *peSide | The Tarmed side type |
[out] BSTR | *pbstrText | The service name as defined by the Tarmed tariff |
[out] double | *pdUnitMT | Tax points for the medical Tarmed part of the service. |
[out] double | *pdUnitFactorMT | Tax points for the medical Tarmed part of the service. |
[out] double | *pdUnitInternalScalingFactorMT | Internal scaling factor for medical part of the Tarmed service. |
[out] double | *pdAmountMT | The amount in CHF for the medical part of the Tarmed service supplied in 2-digit precision. Note that medical amount changes the sign if a credit advice or a storno request is produced. |
[out] double | *pdUnitTT | Tax points for the technical Tarmed part of the service. |
[out] double | *pdUnitFactorTT | Tax points for the technical Tarmed part of the service. |
[out] double | *pdUnitInternalScalingFactorTT | Internal scaling factor for technical part of the Tarmed service. |
[out] double | *pdAmountTT | The amount in CHF for the technical part of the Tarmed service supplied in 2-digit precision. Note that technical amount changes the sign if a credit advice or a storno request is produced. |
[out] double | *pdAmount | The amount in CHF of the Tarmed service as sum from the MT and TT part supplied in 2-digit precision. Note that amount changes the sign if a credit advice or a storno request is produced. |
[out] double | *pdVatRate | The VAT rate that should be applied to this service. |
[out] YesNoType | *peIsObligatory | Enumerator indicating whether the given service record is obligatory regarding the given law (UVG,KVG,...). If the enumerator is set to enObligationAutomatic then the status is set internally using some ad hoc rules. |
[out] BSTR | *pbstrRemark | An optional remark for the given service |
[out] BSTR | *pbstrSectionCode | An optional BfS section code where the service was applied as defined by Swiss Federal Statistical Office - this code is only given for eRoleType=enRoleHospital! |
[out] YesNoType | *peIgnoreValidate | Flag indicating whether the validation was ignored. 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. |
[out] long | *plServiceAttributes | The Tarmed session number |
[out] TreatmentType | *peTreatmentType | The type of treatment (ambulatory or stationary) given by the TreatmentType enumeration |
[out] double | *pdExternalScalingFactorMT | The external scaling factor of the medical part used to scale the tax point value e.g. to give a discount Note that due to backwards compatibility the external scale factor of the medical part is defined with the ITarmedInput::ExternalFactor_MT property |
[out] double | *pdExternalScalingFactorTT | The external scaling factor of the medical part used to scale the tax point value e.g. to give a discount Note that due to backwards compatibility the external scale factor of the technical part is defined with the ITarmedInput::ExternalFactor_TT property |
[out] BSTR | *pbstrProviderEAN | EAN number of the service provider party. Note if bstrProviderEAN is undefined and bstrResponsibleEAN is defined then bstrResponsibleEAN is copied into the bstrProviderEAN variable. If both variables are undefined the pseudo EAN "2099999999999" is set. |
[out] BSTR | *pbstrResponsibleEAN | EAN number of the service responsible party. Note if bstrResponsibleEAN is undefined and bstrProviderEAN is defined then bstrProviderEAN is copied into the bstrResponsibleEAN variable. If both variables are undefined the pseudo EAN "2099999999999" is set. |
[out] BillingRoleType | *peBillingRole | The Tarmed billing role used for this service |
[out] MedicalRoleType | *peMedicalRole | The Tarmed medical role used for this service |
[out] long | *plID | lServiceAttributes is a 32-bit integer where each bit position defines a special information. Currently only Bit 1 (0x000001) is defined. It applies to drug services only and means "Code 207" aka "Drug must not be substituted due to medical reasons". |
[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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceResult
  • GetNextVat

IGeneralInvoiceResult::GetNextVat method |  |  |
Retrieves the next vat information. VARIANT_FALSE is returned if the end of the VAT list is reached. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetNextVat( | double double VARIANT_BOOL | *pdVat, *pdVatRate, *pbStatus); |
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 |
[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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceResult
  • GetPackage

IGeneralInvoiceResult::GetPackage method |  |  |
Retrieves the identification parameters of the main software that used this DLL. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetPackage( | BSTR long long BSTR VARIANT_BOOL | *pbstrSoftwarePackage, *plSoftwareVersion, *plSoftwareID, *pbstrSoftwareCopyright, *pbStatus); |
Calling argument description |  |  |
[out] BSTR | *pbstrSoftwarePackage | Name of the main software that uses this DLL |
[out] long | *plSoftwareVersion | Version of the main software codes as 32-bit value where lSoftwareVersion = 100*Major version + Minor version. |
[out] long | *plSoftwareID | Optional ID of the main software that uses this DLL |
[out] BSTR | *pbstrSoftwareCopyright | The copyright notice of the developer of main software. |
[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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceResult
  • GetPatient

IGeneralInvoiceResult::GetPatient method
Retrieves the primary parameters and structured address of the patient.

The address is defined via a IAddress interface pointer and the address data must be defined prior to call this method.

space
C/C++ calling syntax
HRESULT GetPatient( SexType
DATE
BSTR
IAddress
VARIANT_BOOL 		*peSexType,
*pdBirthdate,
*pbstrSSN,
**ppIAddress,
*pbStatus);
Calling argument description
[out] SexType | *peSexType | The patient's gender.
[out] DATE | *pdBirthdate | The patient's birthdate.
[out] BSTR *pbstrSSN The social security number (SSN) of the patient in its printed form whereupon 3 distinguished types are possible:
  • the old 11 digit Swiss SSN ("AHV-Nummer") as defined by Federal Social Insurance Office
  • 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
[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.
C/C++ return value
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE.
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE.
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions.


  • IGeneralInvoiceResult
  • GetProcessing

IGeneralInvoiceResult::GetProcessing method |  |  |
Retrieves the processing information used at the last intermediate's side. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetProcessing( | YesNoType YesNoType BSTR VARIANT_BOOL | *pePrintAtIntermediate, *pePrintPatientCopy, *pbstrTCToken, *pbStatus); |
Calling argument description |  |  |
[out] YesNoType | *pePrintAtIntermediate | The Boolean ePrintAtIntermediate is a processing instruction for the last intermediate. It defines if the sent XML infoset must be print at the intermediate and sent to the guarantor (TG case) or the invoice (TP case). Note that this is the "real" invoice to be printed (the detail and/or summary) whereas the ePrintPatientCopy is the processing instruction of a copy of the invoice without any ESR information! |
[out] YesNoType | *pePrintPatientCopy | The Boolean ePrintPatientCopy is a processing instruction for the last intermediate. It defines if the sent XML infoset must be print at the intermediate as copy of the invoice and sent to the guarantor. Note that this is a copy of the invoice without any ESR information (probably the summary part only) whereas the pePrintAtIntermediate defines the processing instruction of the "real" invoice/reminder! |
[out] BSTR | *pbstrTCToken | The optional 2-digit Trust Center token. |
[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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceResult
  • GetProvider

IGeneralInvoiceResult::GetProvider method |  |  |
Retrieves the various identifiers (EAN, ZSR,...) and the structured address of the main provider. The IAddress interface might be NULL if no address was defined. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetProvider( | BSTR BSTR BSTR BSTR IAddress VARIANT_BOOL | *pbstrEAN, *pbstrZSR, *pbstrNIF, *pbstrSpecialty, **ppIAddress, *pbStatus); |
Calling argument description |  |  |
[out] BSTR | *pbstrEAN | EAN number of the provider as supplied by medwin.ch |
[out] BSTR | *pbstrZSR | ZSR number of the provider as supplied by santésuisse |
[out] BSTR | *pbstrNIF | The IV specific identification number NIF of the provider. |
[out] BSTR | *pbstrSpecialty | The specialty, i.e. FMH title of a physician. |
[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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceResult
  • GetReferrer

IGeneralInvoiceResult::GetReferrer method |  |  |
Retrieves the various identifiers (EAN, ZSR,...) and the structured address of the referrer. The IAddress interface might be NULL if no address was defined. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetReferrer( | BSTR BSTR BSTR BSTR IAddress VARIANT_BOOL | *pbstrEAN, *pbstrZSR, *pbstrNIF, *pbstrSpecialty, **ppIAddress, *pbStatus); |
Calling argument description |  |  |
[out] BSTR | *pbstrEAN | EAN number of the referrer as supplied by medwin.ch |
[out] BSTR | *pbstrZSR | ZSR number of the referrer as supplied by santésuisse |
[out] BSTR | *pbstrNIF | The IV specific identification number NIF of the referrer. |
[out] BSTR | *pbstrSpecialty | The specialty, i.e. FMH title of a physician. |
[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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceResult
  • GetReminder

IGeneralInvoiceResult::GetReminder method |  |  |
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
C/C++ calling syntax |  |  |
HRESULT GetReminder( | BSTR DATE long long BSTR double VARIANT_BOOL | *pbstrRequestReminderID, *pdRequestReminderDate, *plRequestReminderTimestamp, *plReminderLevel, *pbstrReminderText, *pdAmountReminder, *pbStatus); |
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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceResult
  • GetRequest

IGeneralInvoiceResult::GetRequest method |  |  |
Retrieves the role and place information, the processing parameters "storno" and "copy" besides data language and optional remark. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetRequest( | LanguageType RoleType PlaceType BSTR YesNoType YesNoType BSTR VARIANT_BOOL | *peDataLanguage, *peRoleType, *pePlaceType, *pbstrRoleTitle, *peIsStorno, *peIsCopy, *pbstrRemark, *pbStatus); |
Calling argument description |  |  |
[out] LanguageType | *peDataLanguage | 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) 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] YesNoType | *peIsStorno | Boolean value that defines the "storno" status of the invoice/reminder. eIsStorno should be false when the initial invoice or reminder is produced. At this step the timestamp is generated and returned in the GeneralInvoiceRequestManager::Print and/or GeneralInvoiceRequestManager::GetXML method. Whenever eIsStorno is true then the invoice or reminder timestamp must be set otherwise an error will result. |
[out] YesNoType | *peIsCopy | Boolean value that defines the "copy" status of the invoice/reminder. eIsCopy should be false when the initial invoice or reminder is produced. At this step the timestamp is generated and returned in the IGeneralInvoiceRequestManager::Print and/or IGeneralInvoiceRequestRequestManager::GetXML method. Whenever eIsCopy is true then the invoice or reminder timestamp must be set otherwise an error will result. |
[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, 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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceResult
  • GetTiers

IGeneralInvoiceResult::GetTiers method |  |  |
Retrieves the Tiers Garant (TG) or Tiers Payant (TP) mode together with the VAT number and prepaid amount. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetTiers( | TiersModeType BSTR double VARIANT_BOOL | *peTiersMode, *pbstrVatNumber, *pdAmountPrepaid, *pbStatus); |
Calling argument description |  |  |
[out] TiersModeType | *peTiersMode | The tiers mode ("Tiers Garant" or "Tiers Payant") from the TiersMode enumeration |
[out] BSTR | *pbstrVatNumber | The VAT number of the biller as given by the "Swiss Federal Tax Administration". if one was supplied. The VAT number is returned is its printed form as requested by the federal authorities. |
[out] double | *pdAmountPrepaid | 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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceResult
  • GetTransport

IGeneralInvoiceResult::GetTransport method |  |  |
Returns the 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 EAN numbers as defined by www.medwin.ch. If the parameters for the signature and encryption were set then these data are returned as well otherwise the corresponding variables are empty. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetTransport( | BSTR BSTR BSTR BSTR BSTR BSTR VARIANT_BOOL | *pbstrFromEAN, *pbstrFromPFXFile, *pbstrFromPFXPassword, *pbstrViaEAN, *pbstrToEAN, *pbstrToBinDERFile, *pbStatus); |
Calling argument description |  |  |
[out] BSTR | *pbstrFromEAN | The EAN number of the sender as supplied by medwin.ch |
[out] BSTR | *pbstrFromPFXFile | The file name of the PFX certificate that is the private certificate of the "from" entity. |
[out] BSTR | *pbstrFromPFXPassword | The password to open the PFX certificate. |
[out] BSTR | *pbstrViaEAN | The EAN number of the first intermediate as supplied by medwin.ch |
[out] BSTR | *pbstrToEAN | The EAN number of the receiver as supplied by medwin.ch |
[out] BSTR | *pbstrToBinDERFile | The file name of the binary DER certificate 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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceResult
  • GetTreatment

IGeneralInvoiceResult::GetTreatment method |  |  |
Retrieves the primary treatment input data. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetTreatment( | DATE DATE CantonType TreatmentReasonType VARIANT_BOOL | *pdDateBegin, *pdDateEnd, *peTreatmentCanton, *peTreatmentReason, *pbStatus); |
Calling argument description |  |  |
[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] TreatmentReasonType | *peTreatmentReason | The treatment reason given by the TreatmentReasonType 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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • IGeneralInvoiceResult
  • GetXtraDrug

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

The defined bit positions for lRegulationAttributes as of Aug. 2010

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'urgende: 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"
 space
C/C++ calling syntax
HRESULT GetXtraDrug( long
YesNoType
BSTR
DeliveryType
long
YesNoType
VARIANT_BOOL 		lID,
*peIsIndicated,
*pbstrIOCM,
*peDelivery,
*plRegulationAttributes,
*peHasLimitation,
*pbStatus);
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] YesNoType | *peIsIndicated | Boolean value that defines if the drug is medically indicated (enYes) or not (enNo)
[out] BSTR | *pbstrIOCM | Defines the official Swissmedic IOCM category of the drug given as 1-character uppercase string 'A' to 'E'
[out] DeliveryType | *peDelivery | The delivery mode given by the DeliveryType enumeration
[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 as of Aug. 2010

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'urgende: 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"
[out] YesNoType | *peHasLimitation | Boolean value that defines if the drug has a BAG defined limitation (enYes) or not (enNo)
[out, retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE the additional data set is undefined.
C/C++ return value
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE.
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE.
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions.


  • IGeneralInvoiceResult
  • GetXtraTreatment

IGeneralInvoiceResult::GetXtraTreatment method
Retrieves the additional treatment input data if eRoleType=enRoleHospital and/or ePlaceType=enPlaceHospital.

VARIANT_FALSE is returned if the data are not defined.

space
C/C++ calling syntax
HRESULT GetXtraTreatment( TreatmentType
DATE
long
HospitalizationType
HospitalizationMode
HospitalizationClass
BSTR
YesNoType
AdmissionType
DischargeType
VARIANT_BOOL 		*peTreatmentType,
*pdDateHospitalization,
*plTreatmentDays,
*peHospitalizationType,
*peHospitalizationMode,
*peHospitalizationClass,
*pbstrSectionMajor,
*peHasExpenseLoading,
*peAdmissionType,
*peDischargeType,
*pbStatus);
Calling argument description
[out] TreatmentType | *peTreatmentType | The type of treatment -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 these treatment days is dependent on whether SwissDRG is used nor not!
The treatment days are calculated as

  • None-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] 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] AdmissionType *peAdmissionType The type/reason of the patient's admission given by the AdmissionType enumeration which is basically the DRG grouper admission enumeration.

This information is meaningless in the ambulatory case and should be ignored!

[out] DischargeType *peDischargeType The type/reason of the patient's discharge given by the DischargeType enumeration which is basically the DRG grouper discharge enumeration.

This information is meaningless in the ambulatory case and should be ignored!

[out, retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE the data are undefined
C/C++ return value
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE.
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE.
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions.


  • ITarmedInput

ITarmedInput interface |  | V4.30/26 Aug 2010
The ITarmedInput interface provides methods for the input of data which will mainly stay constant for a particular installation of the program, such as the dignities of the physicians, or stay constant throughout a session, such as the patient sex or patient birth date. It is used in conjunction with the IValidate interface. The physician, patient and treatment data are entered via the ITarmedInput interface, then the service data are entered via the IValidate interface. |  | space
Methods |  | 16 methods
AddDignity | Adds a qualitative dignity for the supplied physician. |
AddSection | Adds the service location section. |
GetAbortInfo | Get the abort information string with the error coded in the module language |
GetFirstDignity | Retrieves the first dignity information given a EAN number and qualitative dignity as search criterion |
GetFirstSection | Retrieves the first section information given a EAN number and section code as search criterion |
GetNextDignity | Retrieves the next dignity information |
GetNextSection | Retrieves the next section information |
GetPatient | Retrieves the primary Tarmed relevant patient input data. |
GetPhysician | Retrieves the Tarmed relevant physician input data. |
GetTreatment | Retrieves the Tarmed relevant treatment input data. |
InitDignity | Initializes the dignity-relevant input data parts. |
Initialize | Initializes the static (physician, treatment patient parts) input data. |
InitSection | Initializes the section-relevant input data parts |
SetPatient | Sets the primary Tarmed relevant patient input data. |
SetPhysician | Sets the Tarmed relevant physician input data. |
SetTreatment | Sets the Tarmed relevant treatment input data |
Properties |  | 2 properties
[get/put] ExternalFactor_MT | Get and Set the external scaling factor for the medical part of Tarmed services |
[get/put] ExternalFactor_TT | Get and Set the external scaling factor for the technical part of Tarmed services |


  • ITarmedInput
  • AddDignity

ITarmedInput::AddDignity method |  |  |
Adds a qualitative dignity for the supplied physician. |  |  | space
C/C++ calling syntax |  |  |
HRESULT AddDignity( | BSTR BSTR VARIANT_BOOL | bstrEanNumber, bstrQLCode, *pbStatus); |
Calling argument description |  |  |
[in] BSTR | bstrEanNumber | EAN number of the physician |
[in] BSTR | bstrQLCode | Qualitative dignity code (cf. tarmedValidator::ICatalog interface for a description of the dignity) |
[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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • ITarmedInput
  • AddSection

ITarmedInput::AddSection method |  |  |
Adds the service location section. |  |  | space
C/C++ calling syntax |  |  |
HRESULT AddSection( | BSTR BSTR VARIANT_BOOL | bstrEanNumber, bstrCode, *pbStatus); |
Calling argument description |  |  |
[in] BSTR | bstrEanNumber | EAN number of the section. |
[in] BSTR | bstrCode | Section code (see tarmedValidator::ICatalog interface). |
[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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • ITarmedInput
  • GetAbortInfo

ITarmedInput::GetAbortInfo method |  |  |
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
C/C++ calling syntax |  |  |
HRESULT GetAbortInfo( | BSTR VARIANT_BOOL | *pbstrAbort, *pbStatus); |
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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • ITarmedInput
  • GetFirstDignity

ITarmedInput::GetFirstDignity method |  |  |
Retrieves the first dignity information given a EAN number and qualitative dignity as search criterion. VARIANT_FALSE is returned if the end of the qualitative dignity list is reached. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetFirstDignity( | BSTR BSTR BSTR BSTR VARIANT_BOOL | bstrEanNumber, bstrQLCode, *pbstrEanNumber, *pbstrQLCode, *pbStatus); |
Calling argument description |  |  |
[in] BSTR | bstrEanNumber | EAN number to search for in GetFirstDignity/GetNextDignity iterator. Use the wildcard symbol (*) to search over all records. |
[in] BSTR | bstrQLCode | Qualitative dignity code to search for. Use the wildcard symbol (*) to search over all records. |
[out] BSTR | *pbstrEanNumber | The first EAN number fulfilling the search criterion. |
[out] BSTR | *pbstrQLCode | The first qualitative dignity code 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 |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • ITarmedInput
  • GetFirstSection

ITarmedInput::GetFirstSection method |  |  |
Retrieves the first section information given a EAN number and section code as search criterion. VARIANT_FALSE is returned if the end of the DRG service list is reached. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetFirstSection( | BSTR BSTR BSTR BSTR VARIANT_BOOL | bstrEanNumber, bstrCode, *pbstrEanNumber, *pbstrCode, *pbStatus); |
Calling argument description |  |  |
[in] BSTR | bstrEanNumber | EAN number to search for in GetFirstSection/GetNextSection iterator. Use the wildcard symbol (*) to search over all records. |
[in] BSTR | bstrCode | Section code to search for. Use the wildcard symbol (*) to search over all records. |
[out] BSTR | *pbstrEanNumber | The first EAN number fulfilling the search criterion. |
[out] BSTR | *pbstrCode | The first section code 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 |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • ITarmedInput
  • GetNextDignity

ITarmedInput::GetNextDignity method |  |  |
Retrieves the next dignity information. VARIANT_FALSE is returned if the end of the qualitative dignity list is reached. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetNextDignity( | BSTR BSTR VARIANT_BOOL | *pbstrEanNumber, *pbstrQLCode, *pbStatus); |
Calling argument description |  |  |
[out] BSTR | *pbstrEanNumber | The next EAN number fulfilling the search criterion. |
[out] BSTR | *pbstrQLCode | The next qualitative dignity code 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 |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • ITarmedInput
  • GetNextSection

ITarmedInput::GetNextSection method |  |  |
Retrieves the next section information. VARIANT_FALSE is returned if the end of the DRG service list is reached. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetNextSection( | BSTR BSTR VARIANT_BOOL | *pbstrEanNumber, *pbstrCode, *pbStatus); |
Calling argument description |  |  |
[out] BSTR | *pbstrEanNumber | The next EAN number fulfilling the search criterion. |
[out] BSTR | *pbstrCode | The next section code 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 |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • ITarmedInput
  • GetPatient

ITarmedInput::GetPatient method |  |  |
Retrieves the primary Tarmed relevant patient input data. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetPatient( | DATE SexType VARIANT_BOOL | *pdBirthdate, *peSex, *pbStatus); |
Calling argument description |  |  |
[out] DATE | *pdBirthdate | Patient"s birthdate |
[out] SexType | *peSex | Patient's gender |
[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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • ITarmedInput
  • GetPhysician

ITarmedInput::GetPhysician method |  |  |
Retrieves the Tarmed relevant physician input data. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetPhysician( | MedicalRoleType BillingRoleType BSTR BSTR VARIANT_BOOL | *peMedicalRole, *peBillingRole, *pbstrEanNumberProvider, *pbstrEanNumberResponsible, *pbStatus); |
Calling argument description |  |  |
[out] MedicalRoleType | *peMedicalRole | The Tarmed relevant medical role given by the MedicalRoleType enumeration |
[out] BillingRoleType | *peBillingRole | The Tarmed relevant billing role given by the BillingRoleType enumeration |
[out] BSTR | *pbstrEanNumberProvider | EAN number of the service provider. |
[out] BSTR | *pbstrEanNumberResponsible | EAN number of the responsible person. |
[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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • ITarmedInput
  • GetTreatment

ITarmedInput::GetTreatment method |  |  |
Retrieves the Tarmed relevant treatment input data. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetTreatment( | CantonType LawType TreatmentType SettlementType BSTR VARIANT_BOOL | *peCanton, *peLaw, *peTreatmentType, *peSettlement, *pbstrEanNumberSection, *pbStatus); |
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 type of treatment (ambulatory or stationary) given by the TreatmentType enumeration |
[out] SettlementType | *peSettlement | The settlement category given by the SettlementType enumeration |
[out] BSTR | *pbstrEanNumberSection | EAN number of the section. |
[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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • ITarmedInput
  • InitDignity

ITarmedInput::InitDignity method |  |  |
Initializes the dignity-relevant input data parts. |  |  | space
C/C++ calling syntax |  |  |
HRESULT InitDignity( | VARIANT_BOOL | *pbStatus); |
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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • ITarmedInput
  • Initialize

ITarmedInput::Initialize method |  |  |
Initializes the static (physician, treatment patient parts) input data. |  |  | space
C/C++ calling syntax |  |  |
HRESULT Initialize( | VARIANT_BOOL | *pbStatus); |
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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • ITarmedInput
  • InitSection

ITarmedInput::InitSection method |  |  |
Initializes the section-relevant input data parts |  |  | space
C/C++ calling syntax |  |  |
HRESULT InitSection( | VARIANT_BOOL | *pbStatus); |
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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • ITarmedInput
  • SetPatient

ITarmedInput::SetPatient method |  |  |
Sets the primary Tarmed relevant patient input data. |  |  | space
C/C++ calling syntax |  |  |
HRESULT SetPatient( | DATE SexType VARIANT_BOOL | dBirthdate, eSex, *pbStatus); |
Calling argument description |  |  |
[in] DATE | dBirthdate | Patient"s birthdates |
[in] SexType | eSex | Patient's gender |
[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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • ITarmedInput
  • SetPhysician

ITarmedInput::SetPhysician method |  |  |
Sets the Tarmed relevant physician input data. |  |  | space
C/C++ calling syntax |  |  |
HRESULT SetPhysician( | MedicalRoleType BillingRoleType BSTR BSTR VARIANT_BOOL | eMedicalRole, eBillingRole, bstrEanNumberProvider, bstrEanNumberResponsible, *pbStatus); |
Calling argument description |  |  |
[in] MedicalRoleType | eMedicalRole | The Tarmed relevant medical role given by the MedicalRoleType enumeration |
[in] BillingRoleType | eBillingRole | The Tarmed relevant billing role given by the BillingRoleType enumeration |
[in] BSTR | bstrEanNumberProvider | EAN number of the provider. |
[in] BSTR | bstrEanNumberResponsible | EAN number of the responsible person. |
[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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • ITarmedInput
  • SetTreatment

ITarmedInput::SetTreatment method |  |  |
Sets the Tarmed relevant treatment input data. PATCH Due to the disagreement between the tariff partners in the social insurance area, Tarmed 1.09 cannot be introduced uniformly as of April 1, 2018. This patch describes how to externally set the validity barrier between Tarmed 1.08BR and Tarmed 1.09 UV/IV/MV by using the bstrEanNumberSection variable. |  |  | space
C/C++ calling syntax |  |  |
HRESULT SetTreatment( | CantonType LawType TreatmentType SettlementType BSTR VARIANT_BOOL | eCanton, eLaw, eTreatmentType, eSettlement, bstrEanNumberSection, *pbStatus); |
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 type of treatment (ambulatory or stationary) given by the TreatmentType enumeration |
[in] SettlementType | eSettlement | The settlement category given by the SettlementType enumeration |
[in] BSTR | bstrEanNumberSection | EAN number of the section - leave empty if the section concept is unused. PATCH Append the validity barrier '#VB109=dd.mm.yyyy' to the bstrEanNumberSection variable, where the patch is case-insensitive and applicable for eLaw = UV|MV|IV only. By defining the validity barrier, the tarmedValidator automatically switches between the two Tarmed versions UV/IV/MV and its different rule spaces. |
[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. |
C/C++ return value |  |  |
S_OK | This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE. |  |
S_FALSE | This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE. |  |
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |  |


  • ITarmedInput
  • ExternalFactor_MT

ITarmedInput::ExternalFactor_MT property
Get and Set the external scaling factor for the medical part of Tarmed services.

Please note that negative external factors are not allowed and an exception is thrown under such a condition.

space
C/C++ calling syntax
[get] HRESULT | ExternalFactor_MT( double *adouble);
[put] HRESULT | ExternalFactor_MT( double adouble);
space
Calling argument description
[out,retval] double | *adouble
[in] double | adouble
C/C++ return value
S_OK | This value is returned if the function call was successful.
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.
Remarks
If SmartPointers are used than the function names and calls are rewritten by Microsoft into the form
  • double *GetExternalFactor_MT(void);
  • void PutExternalFactor_MT( double adouble);
space


  • ITarmedInput
  • ExternalFactor_TT

ITarmedInput::ExternalFactor_TT property
Get and Set the external scaling factor for the technical part of Tarmed services.

Please note that negative external factors are not allowed and an exception is thrown under such a condition.

space
C/C++ calling syntax
[get] HRESULT | ExternalFactor_TT( double *adouble);
[put] HRESULT | ExternalFactor_TT( double adouble);
space
Calling argument description
[out,retval] double | *adouble
[in] double | adouble
C/C++ return value
S_OK | This value is returned if the function call was successful.
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.
Remarks
If SmartPointers are used than the function names and calls are rewritten by Microsoft into the form
  • double *GetExternalFactor_TT(void);
  • void PutExternalFactor_TT( double adouble);
space


  • Type definitions

Builtin, composite & enumeration types |  | V4.30/26 Aug 2010
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
Data types |  | 37 types
[enumeration] AddressType | Enumerates the defined address categories. |
[enumeration] AdmissionType | Enumerates the defined types of the patient's admission used in a DRG grouper |
[enumeration] BillingRoleType | Enumerates the defined billing role categories for Tarmed. |
[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 or countries close to the border. |
[builtin] DATE | A value denoting a date and time was specified |
[enumeration] DeliveryType | Enumerates the defined delivery modes of drugs |
[enumeration] DiagnosisType | Enumerates the defined diagnosis coding systems. |
[enumeration] DischargeType | Enumerates the defined types of the patient's discharge used in a DRG grouper |
[builtin] double | An 8-byte IEEE real value. |
[enumeration] EsrExcludeAttributes | List of ESR printing excludes |
[enumeration] EsrType | Enumerates the defined ESR categories. |
[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 |
[builtin] HRESULT | The HRESULT data type is a 32-bit value that is used to describe an error or warning. |
[builtin] IAddress | IAddress interface. |
[builtin] IGeneralInvoiceRequest | IGeneralInvoiceRequest interface. |
[builtin] IGeneralInvoiceResult | IGeneralInvoiceResult interface. |
[builtin] ITarmedInput | ITarmedInput interface. |
[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 categories for Tarmed. |
[enumeration] ModusType | Enumerates the defined operation modus types |
[enumeration] ObligationType | Enumerator of the obligation status of a service record |
[enumeration] PlaceType | Enumerates the defined places where the main provider is located |
[enumeration] RoleType | Enumerates the defined role categories that the main provider is best categorized |
[enumeration] SettlementType | Enumerates the defined settlement categories. |
[enumeration] SexType | Enumerates the defined gender categories. |
[enumeration] SideType | Enumerates the defined side categories. |
[enumeration] TiersModeType | Enumerates the defined tiers modes. |
[enumeration] TreatmentReasonType | Enumerates the defined treatment reasons. |
[enumeration] TreatmentType | Enumerates the top level treatment categories. |
[builtin] VARIANT_BOOL | A 16 bit Boolean (True/False) value was specified |
[enumeration] XMLGenerationAttributes | Enumerates defined types of XML generation attributes |
[enumeration] YesNoType | Boolean enumerator. |


  • Type definitions
  • AddressType

AddressType enumeration type |  |
Enumerates the defined address categories. |  | space
Set of enumeration values |  | 3 elements
enAddressUndefined: 0 | Undefined or unknown address. |
enAddressPerson: 1 | Person address. |
enAddressCompany: 2 | Company address. |


  • Type definitions
  • AdmissionType

AdmissionType enumeration type |  |
Enumerates the defined types of the patient's admission used in a DRG grouper |  | space
Set of enumeration values |  | 3 elements
enAdmissionNormal: 1 | The admission of the patient was normal |
enAdmissionRelocated: 2 | The patient was relocated from another hospital |
enAdmissionUnknown: 99 | The admission of the patient is unknown |


  • Type definitions
  • BillingRoleType

BillingRoleType enumeration type |  |
Enumerates the defined billing role categories for Tarmed. |  | 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 | None |


  • 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


  • Type definitions
  • CantonType

CantonType enumeration type |  |
Enumerates the defined Swiss cantons or countries close to the border. |  | 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 |


  • Type definitions
  • DATE

DATE type |
A value denoting a date and time was specified. Dates are represented as double-precision numbers, where midnight, January 1, 1900 is 2.0, January 2, 1900 is 3.0, and so on. The value is passed in date. | space


  • Type definitions
  • DeliveryType

DeliveryType enumeration type |  |
Enumerates the defined delivery modes of drugs |  | space
Set of enumeration values |  | 3 elements
enDeliveryFirst: 1 | The drug is delivered to the patient for the first time |
enDeliveryRepeated: 2 | The drug is delivered to the patient on a repeated basis that is not for the first time |
enDeliveryPermanent: 3 | The drug is delivered to the patient on a permanent basis |


  • Type definitions
  • DiagnosisType

DiagnosisType enumeration type |  |
Enumerates the defined diagnosis coding systems. |  | space
Set of enumeration values |  | 7 elements
enDiagnosisICD: 0 | ICD 10 diagnosis |
enDiagnosisCantonal: 1 | Cantonal diagnosis code. |
enDiagnosisByContract: 2 | Diagnosis coded according to contract. |
enDiagnosisFreeText: 3 | Free text diagnosis. |
enDiagnosisBirthdefect: 4 | Birth defect diagnosis |
enDiagnosisICPC: 5 | ICPC diagnosis (International Classification of Primary Care) |
enDiagnosisDRG: 6 | DRG diagnosis that is the DRG service code |


  • Type definitions
  • DischargeType

DischargeType enumeration type |  |
Enumerates the defined types of the patient's discharge used in a DRG grouper |  | space
Set of enumeration values |  | 5 elements
enDischargeNormal: 1 | The discharge of the patient was normal |
enDischargeRelocated: 2 | The discharge of the patient was a relocation to another hospital |
enDischargeDeceased: 3 | The patient deceased |
enDischargeAborted: 4 | The patient aborted the treatment against the advice of the physicians |
enDischargeUnknown: 99 | The discharge of the patient is unknown |


  • Type definitions
  • double

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


  • Type definitions
  • EsrExcludeAttributes

EsrExcludeAttributes enumeration type |  |
List of ESR printing excludes |  | space
Set of enumeration values |  | 12 elements
enExcludeESR: 1 | Exclude all ESR parts from printing |
enExcludeCreditor: 2 | Exclude the creditor address (receiver) from printing |
enExcludeCreditorName: 4 | Exclude the debitor (receiver) name and first name/department from printing |
enExcludeBank: 8 | Exclude the bank address (if defined) from printing |
enExcludeBankName: 16 | Exclude the bank name and department from printing. The postal part if defined is printed |
enExcludeDebitor: 32 | Exclude the debitor (payer) address from printing |
enExcludeDebitorName: 64 | Exclude the debitor (payer) name and first name/department from printing |
enExcludeAccounting: 128 | Exclude the accounting data outside the ESR coding lines from printing |
enExcludeCodinglines: 256 | Exclude the ESR coding lines from printing |
enExcludeAmount: 512 | Exclude the amount from printing |
enExcludeRemarks: 1024 | Exclude the remarks (if defined) from printing. This is only relevant for enRedPayinSlip |
enExcludeInFavorOf: 2048 | Exclude the 'in favor of' title from printing |


  • Type definitions
  • EsrType

EsrType enumeration type |  |
Enumerates the defined ESR categories. |  | space
Set of enumeration values |  | 5 elements
en9to16or27: 0 | ESR 9/16 or 9/27 with amount included |
en9to16or27plus: 1 | ESR+ 9/16 or 9/27 without amount included |
en5to15: 2 | ESR 5/15 with amount included |
en5to15plus: 3 | ESR+ 5/15 without amount included |
enRedPayinSlip: 4 | ESR Red (red payin slip) |


  • Type definitions
  • HospitalizationClass

HospitalizationClass enumeration type |  |
Enumerates the defined classes/types of hospitalization |  | space
Set of enumeration values |  | 5 elements
enGeneral: 0 | General hospitalization class |
enSemiPrivate: 1 | Semi-private hospitalization class |
enPrivate: 2 | Private hospitalization class |
enComfort: 3 | Comfort hospitalization class |
enFreeMDChoice: 4 | Hospitalization class with free choice of physician |


  • Type definitions
  • HospitalizationMode

HospitalizationMode enumeration type |  |
Enumerates the defined modes/indications of the hospitalization |  | 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 |


  • Type definitions
  • HospitalizationType

HospitalizationType enumeration type |  |
Enumerates the defined types/reasons of the hospitalization |  | space
Set of enumeration values |  | 3 elements
enRegular: 0 | The reason of the hospitalization is regular |
enEmergency: 1 | The reason of the hospitalization is an emergency |
enWelfare: 2 | The reason of the hospitalization is due to welfare ("Freiheitsenzug") |


  • Type definitions
  • HRESULT

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


  • Type definitions
  • IAddress

IAddress type |
IAddress interface. | space


  • Type definitions
  • IGeneralInvoiceRequest

IGeneralInvoiceRequest type |
IGeneralInvoiceRequest interface. | space


  • Type definitions
  • IGeneralInvoiceResult

IGeneralInvoiceResult type |
IGeneralInvoiceResult interface. | space


  • Type definitions
  • ITarmedInput

ITarmedInput type |
ITarmedInput interface. | space


  • Type definitions
  • LanguageType

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


  • Type definitions
  • LawType

LawType enumeration type |  |
Enumerates the supported legal law set. |  | 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. |


  • Type definitions
  • long

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


  • Type definitions
  • MedicalRoleType

MedicalRoleType enumeration type |  |
Enumerates the defined medical role categories for Tarmed. |  | space
Set of enumeration values |  | 2 elements
enMedicalRoleSelfEmployed: 0 | Employee (Medical practice) |
enMedicalRoleEmployee: 1 | Employee (Hospital or Institute) |


  • Type definitions
  • ModusType

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


  • Type definitions
  • ObligationType

ObligationType enumeration type |  |
Enumerator of the obligation status of a service record |  | space
Set of enumeration values |  | 3 elements
enObligationAutomatic: 0 | The request manager must set the obligation status based on the V3.0 rules |
enObligationYes: 1 | The service record is obligatory |
enObligationNo: 2 | The service record is not obligatory |


  • Type definitions
  • PlaceType

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


  • Type definitions
  • RoleType

RoleType enumeration type |  |
Enumerates the defined role categories that the main provider is best categorized |  | space
Set of enumeration values |  | 21 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 |
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 none-conventional Western medicine/none-biomedicine. |
enRoleNaturopathicTherapist: 2097152 | The main provider is a is naturopathic therapist. As per definition this is a therapist of none-conventional Western medicine/none-biomedicine. This role includes wellness therapists as well. |
enRoleOther: 4194304 | The main provider has an other role than defined here. Supply a role title in this case with a description of the role |


  • Type definitions
  • SettlementType

SettlementType enumeration type |  |
Enumerates the defined settlement categories. |  | space
Set of enumeration values |  | 2 elements
enSettlementElectronic: 0 | Electronic transmit of the bill. |
enSettlementPaper: 1 | Print on paper of the bill. |


  • Type definitions
  • SexType

SexType enumeration type |  |
Enumerates the defined gender categories. |  | space
Set of enumeration values |  | 2 elements
enMale: 0 | Male. |
enFemale: 1 | Female. |


  • Type definitions
  • SideType

SideType enumeration type |  |
Enumerates the defined side categories. |  | space
Set of enumeration values |  | 3 elements
enSideNone: 0 | None. |
enSideLeft: 1 | Left side. |
enSideRight: 2 | Right side. |


  • Type definitions
  • TiersModeType

TiersModeType enumeration type |  |
Enumerates the defined tiers modes. |  | space
Set of enumeration values |  | 2 elements
enTiersGarant: 0 | Tiers garant mode is used |
enTiersPayant: 1 | Tiers payant mode is used |


  • Type definitions
  • TreatmentReasonType

TreatmentReasonType enumeration type |  |
Enumerates the defined treatment reasons. |  | 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 |


  • Type definitions
  • TreatmentType

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


  • 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


  • Type definitions
  • XMLGenerationAttributes

XMLGenerationAttributes enumeration type |  |
Enumerates defined types of XML generation attributes |  | space
Set of enumeration values |  | 3 elements
enGenerateWithoutDocuments: 1 | The XML infoset is generated without documents even if such documents have been added in the IGeneralInvoiceRequest::AddDocument method. |
enGenerateWithoutSignature: 2 | The XML infoset is generated without applying a signature even if the signature parameters have been set in the IGeneralInvoiceRequest::SetTransport method. |
enGenerateWithoutEncryption: 4 | The XML infoset is generated without applying encryption even if the encryption parameters have been set in the IGeneralInvoiceRequest::SetTransport method. |


  • Type definitions
  • YesNoType

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


 Compatibility measures & White list

  • Rational
  • Boundary conditions
  • Upgrade functionality
  • Downgrade functionality
  • White list
The 1st of January is the official start date of all V4.3 XML versions. However, neither an intermediate nor insurance is ready to process these XML files before the 1st of April. Furthermore, it seems that some insurances will not be ready before the 1st of January 2012!

As a consequence the generalInvoiceRequest430 module will be enhanced by

  • a transparent upgrade function allowing to read all V4.0 and V4.1 XML files and transform these to V4.3
  • a transparent downgrade function allowing to generate either V4.3 files or downgrade to V4.0, V4.1 files, respectively. The decision process is implicit and based on a white list of insurances ready to process V4.3. If an insurance EAN is not in the list there is an automatic downgrade. The white list itself is maintained by Suva.
By implementing these measures there is an easy and transparent migration path to V4.3.

Boundary conditions
  • The upgrade and downgrade functionality is achieved by a delegation technique to the lower version COM modules in question. As a consequence such a COM module must be installed as well but of course only the ones for which invoices/reminders are produced.
  • The module undestands
    • generalInvoiceRequest_410.xsd - the generalInvoiceRequest410 COM module must be installed
    • hospitalInvoiceRequest_400.xsd - the hospitalInvoiceRequest400 COM module must be installed
    • mdInvoiceRequest_400.xsd - the mdInvoiceRequest400 COM module must be installed
    • invoiceReminderRequest_400.xsd - the reminderRequest400 COM module must be installed
      This module can be used for a downgrade only!
  • The downgrade in the GetXML/Print methods is based on the white list of Suva and the role/place information
    • role/place = enRolePhysician/enPlacePractice downgrades to mdInvoiceRequest400
    • role/place = enRolePhysician/enPlaceHospital downgrades to hospitalInvoiceRequest400
    • role/place = enRoleHospital/enPlaceHospital downgrades to hospitalInvoiceRequest400
    • role = enRolePharmacist is not downgraded as there is no older Sumex1 COM module of that type
    • all other role/place combinations downgrade to generalInvoiceRequest410
    • due to the white list technique an absent insurance EAN always produces a downgrade

Upgrade functionality
The upgrade functionality is achieved by the LoadXML method and the lower version COM module. LoadXML can load
  • generalInvoiceRequest_430.xsd
  • generalInvoiceRequest_410.xsd
  • hospitalInvoiceRequest_400.xsd
  • mdInvoiceRequest_400.xsd
Since the data spaces of V4.3 and the lower versions are not fully compatible the module makes some compatibility decisions:
generalInvoiceRequest410 to generalInvoiceRequest430
case_id (main software) | is not loaded anymore (cf. downgrade)
patient_id (main software) | is loaded if available
role | roles without an equivalence in V4.3 are transformed to the best fit
hospitalInvoiceRequest400 to generalInvoiceRequest430
case_id (main software) | is not loaded anymore (cf. downgrade)
hospitalizationEnd | is not loaded anymore (cf. downgrade)
patient_id (main software) | is loaded if available
surgery | is not loaded anymore (cf. downgrade)
mdInvoiceRequest400 to generalInvoiceRequest430
case_id (main software) | is not loaded anymore (cf. downgrade)
patient_id (main software) | is loaded if available
surgery | is not loaded anymore (cf. downgrade)
serviceLocation address | is not loaded anymore (cf. downgrade)
case_id (main software) | is not loaded anymore (cf. downgrade)
invoiceReminderRequest400 to generalInvoiceRequest430
can not be loaded

Downgrade functionality
The downgrade functionality is achieved by the GetXML and Print methods and the lower version COM modules. The downgrade decision is primarly based on the white list and the boundary conditions.
Since the data spaces of V4.3 and the lower versions are not fully compatible the module makes some compatibility decisions:
generalInvoiceRequest430 to generalInvoiceRequest410
case_id (main software) | the patient_id from V4.3 is used as case_id
role | roles without an equivalence in V4.1 are transformed to the best fit
validator Since there is no service record validation in the lower version
only a pseudo downgrade validator is included in the XML
generalInvoiceRequest430 to hospitalInvoiceRequest400
case_id (main software) | the patient_id from V4.3 is used as case_id
ESR=enRedPayinSlip | produces an error!
hospitalizationEnd is calculated as
max(treatmentEnd, last service date, hospitalizationBegin + treatmentDays)
law=ORG | produces an error!
surgery | is not populated
validator Since there is no service record validation in the lower version
only a pseudo downgrade validator is included in the XML
generalInvoiceRequest430 to mdInvoiceRequest400
case_id (main software) | the patient_id from V4.3 is used as case_id
ESR=enRedPayinSlip | produces an error!
serviceLocation is calculated as
= hospital if enBillingRoleMT is set for a Tarmed record
= practice otherwise
Note that no address can be set!
law=ORG | produces an error!
surgery | is not populated
validator Since there is no service record validation in the lower version
only a pseudo downgrade validator is included in the XML
generalInvoiceRequest430 to invoiceReminderRequest400
ESR=enRedPayinSlip | produces an error!
storno | produces an error!

White list
The white list maintained by Suva and published on the web site of the Forum Datenaustausch


 Notes about the encryption

XML Encryption is a specification, governed by a W3C recommendation, that defines how to encrypt the contents of an XML element. Although XML Encryption can be used to encrypt any kind of data, it is nonetheless known as "XML Encryption" because an XML element (either an EncryptedData or EncryptedKey element) contains or refers to the cipher text, keying information, and algorithms.

However, it is beyond the scope of this documentation to explain all details of a encryption or the encryption process. Detailed information about all aspects of encryption can be found at W3C.

Boundary conditions and critical aspects

  • the encryption is optional!
  • if an infoset is encrypted then the public certificate of the recipient must be used and this certificate is applied to the body element.

    Here recipient is used in terms of the communication and therefore is defined as the EAN entity given in the transport@to attribute
  • the namespace v1 of W3C http://www.w3.org/2001/04/xmlenc must be used- cf. XML Encryption Syntax and Processing
  • The encryption algorithm is fixed to PKCS1 (RSA-SHA1) (RFC 2437: RSA Cryptography Specifications)
  • The block encryption algorithm is fixed to Triple DES

The generalInvoiceRequest module does obey all these conditions whenever encryption is "turned on" by setting a public certificate of the "toEAN" entity (cf. IGeneralInvoiceRequest::SetTransport). This certificate must be in the format "binary DER".

Where do I get this certificate?
The request/response system is self-contained insofar as the generalInvoiceResponse module (or any other V4.3 module!) extracts the public certificate of a signed response XML infoset and generates a binary DER file named X509DER_from_EAN.cer. This is exactly the certificate to use for encrypting an invoice or reminder (or all other V4.3) request XML infosets!


 How to adjust the position of the ESR coding line

The report generator included in the module allows to shift the position of any print object (cf. Syntax of the printTemplate variable).

The interface IGeneralInvoiceRequestManager includes the IGeneralInvoiceRequestManager::PrintAdjust method which shows the dialog shown to the right. One can select a print object and adjust its object location.

The delta X and Y values are stored 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). To shift the ESR coding line of the standard summary request template (generalInvoiceRequest430_R_Summary_dt.vpd in the install directory) the print object ESR_CODINGLINE1 might be chosen and adjusted with the dialog. This action produces an entry in the INI section [ObjectAdjustment] of the form:

[ObjectAdjustment]
ESR_CODINGLINE1=250,-140
where ESR_CODINGLINE1 is the print object name followed by the delta X and Y, respectively. Both values are given in TWIPS with the origin in the upper left corner of the document. The conversion factor between TWIPS and mm is: 1 mm = 56.69291 TWIPS.

Note that there is a further possibility to adjust the position of the whole document by using the 2 input fields at the bottom. Eventually an appropriate entry in the [ObjectAdjustment] section is written for this shift.


 VB code snippet for using the generalInvoiceRequestManager

Private Sub GeneralInvoiceRequestExampleButton_Click()

On Error GoTo Err_Trap

Dim bStatus As Boolean

'### init variables
Dim strFrom As String
strFrom = "7601001302112"
Dim strVia As String
strVia = "7601000012345"
Dim strTo As String
strTo = "7634567890000"
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("2010-08-31")
Dim dTreatmentStart As Date
dTreatmentStart = DateValue("2010-08-01")
Dim strCaseID As String
strCaseID = "123456-6789"
Dim strPatientInsID As String
strPatientInsID = "123.45.678-012"
Dim strContractNumber As String
strContractNumber = "AZ-3.456"
Dim eTreatmentReason As TreatmentReasonType
eTreatmentReason = enDisease
Dim eMedicalRole As MedicalRoleType
eMedicalRole = enMedicalRoleSelfEmployed
Dim eBillingRole As BillingRoleType
eBillingRole = enBillingRoleBoth
Dim strEanProvider As String
strEanProvider = "7634567890111"
Dim strEanResponsible As String
strEanResponsible = "7634567890333"

'### GeneralInvoiceRequestManager interface
Dim generalInvoiceRequestManagerEx As GENERALINVOICEREQUESTMANAGER430Lib.GeneralInvoiceRequestManager
Set generalInvoiceRequestManagerEx = New GeneralInvoiceRequestManager

'### GeneralInvoiceRequest interface
Dim generalInvoiceRequestEx As GENERALINVOICEREQUESTMANAGER430Lib.GeneralInvoiceRequest
Set generalInvoiceRequestEx = generalInvoiceRequestManagerEx.GeneralInvoiceRequest

generalInvoiceRequestEx.Initialize (enGerman)

'### Set request
bStatus = generalInvoiceRequestEx.SetRequest(eRole, ePlace, strTitle, enNo, enNo, "some remark")

'### Set tiers
bStatus = generalInvoiceRequestEx.SetTiers(enTiersGarant, "", 0)

'### Set transport
bStatus = generalInvoiceRequestEx.SetTransport(strFrom, "", "", strVia, strTo, "")

'### Set package
bStatus = generalInvoiceRequestEx.SetPackage("GeneralInvoiceRequestExample", 10001, 4, "sumex1")

'### Set invoice
bStatus = generalInvoiceRequestEx.SetInvoice("2009_01:001", dTreatmentEnd, 0, "patID_1456")

Dim IAddress As GENERALINVOICEREQUESTMANAGER430Lib.Address
Set IAddress = generalInvoiceRequestEx.CreateAddress
'### esr
Dim lPaymentPeriod As Long
lPaymentPeriod = 25
IAddress.Initialize
bStatus = IAddress.SetCompany("Bank AG", "Abteilung VESR", "")
bStatus = IAddress.SetPostal("Bankstrasse 11", "Postfach", "4002", "Basel", "BS", "CH")
bStatus = generalInvoiceRequestEx.SetEsr(en9to16or27, "010001628", "12345620000188888888888888",  _
                                         "01-162-8", IAddress, lPaymentPeriod)

'### biller
IAddress.Initialize
bStatus = IAddress.SetCompany("Biller AG", "Abteilung Inkasso", "")
bStatus = IAddress.SetPostal("Billerweg 128", "", "4414", "Frenkendorf", "", "")
bStatus = IAddress.AddPhone("956 99 00", "061", "", "")
bStatus = IAddress.SetFax("956 99 10", "061", "+41", "")
bStatus = IAddress.SetOnline("info@biller.ch", "")
bStatus = generalInvoiceRequestEx.SetBiller("2011234567890", "H-1211-11", "334455", "", IAddress)

'### set provider
IAddress.Initialize
bStatus = IAddress.SetPerson("Aerztin", "Patricia", "Frau", "Dr. med.", "")
bStatus = IAddress.SetPostal("Arztgasse 17b5", "", "4000", "Basel", "BS", "")
bStatus = generalInvoiceRequestEx.SetProvider(strEanProvider, "P-1234-56", "42042",  _
                                              "FMH Innere Medizin", IAddress)

'### health insurance
IAddress.Initialize
bStatus = IAddress.SetCompany("Krankenkasse AG", "Sektion Basel", "")
bStatus = IAddress.SetPostal("Kassengraben 222", "", "4000", "Basel", "", "")
bStatus = generalInvoiceRequestEx.SetInsurance("2034567890222", IAddress)

'### patient
IAddress.Initialize
bStatus = IAddress.SetPerson("Muster", "Peter", "Herr", "", "c/o Mieter Karl")
bStatus = IAddress.SetPostal("Musterstrasse 5", "", "7304", "Maienfeld", "", "")
bStatus = generalInvoiceRequestEx.SetPatient(eSex, dBirthdate, "756.1234.5678.90", IAddress)
bStatus = generalInvoiceRequestEx.SetCard("12345678901234567890", DateValue("2009-12-31"),  _
                                          DateValue("2011-12-31"), "", "")
'### guarantor, same as patient
bStatus = generalInvoiceRequestEx.SetGuarantor(IAddress)

'### referrer
IAddress.Initialize
bStatus = IAddress.SetPerson("Ueberweiser", "Herbert", "Herr", "Dr. med.", "")
bStatus = IAddress.SetPostal("Referrerstrasse 11", "", "5000", "Aarau", "AG", "")
bStatus = generalInvoiceRequestEx.SetReferrer("2034567890333", "R-2345-67", "",  _
                                              "FMH Inner Medizin", IAddress)

'### employer
IAddress.Initialize
bStatus = IAddress.SetCompany("Arbeitgeber AG", "R&D", "")
bStatus = IAddress.SetPostal("Arbeitsplatz 3-5", "", "4410", "Liestal", "BL", "")
bStatus = generalInvoiceRequestEx.SetEmployer("7600123456789", "123-456.78", IAddress)

'### set applicable law
bStatus = generalInvoiceRequestEx.SetLaw(enKVG, dTreatmentEnd, strCaseID, strPatientInsID,  _
                                         strContractNumber)

'### set processing
bStatus = generalInvoiceRequestEx.SetProcessing(enYes, enNo, "69")

'### set treatment
bStatus = generalInvoiceRequestEx.SetTreatment(dTreatmentStart, dTreatmentEnd, eCanton,  _
                                               eTreatmentReason)
'bStatus = generalInvoiceRequestEx.AddDiagnosis(enDiagnosisByContract, "A1", "A1 Text")
'bStatus = generalInvoiceRequestEx.AddDiagnosis(enDiagnosisByContract, "B2", "")

'### Tarmed data
Dim tarmedInputEx As TarmedInput
Set tarmedInputEx = generalInvoiceRequestEx.CreateTarmedInput

tarmedInputEx.ExternalFactor_MT = 1
tarmedInputEx.ExternalFactor_TT = 1

'### physician
bStatus = tarmedInputEx.SetPhysician(eMedicalRole, eBillingRole, strEanProvider, strEanResponsible)
'### patient
bStatus = tarmedInputEx.SetPatient(dBirthdate, eSex)
'### treatment
Dim strEanSection As String
strEanSection = "7634567890000"
Dim eSettlement As SettlementType
eSettlement = enSettlementElectronic
bStatus = tarmedInputEx.SetTreatment(eCanton, eLaw, eTreatment, eSettlement, strEanSection)

'### add consultation
Dim lID As Long
Dim lSession As Long
lSession = 1
Dim lStatus As Long
bStatus = generalInvoiceRequestEx.AddTarmedService(tarmedInputEx, _
                                "001", _
                                "00.0010", _
                                "", _
                                1, _
                                lSession, _
                                dTreatmentStart, _
                                enSideNone, _
                                enNo, _
                                0.92, _
                                0.92, _
                                6, _
                                enObligationAutomatic, _
                                "", _
                                "", _
                                0, _
                                lID)

bStatus = generalInvoiceRequestEx.AddTarmedService(tarmedInputEx, "001", _
                                "00.0020", _
                                "00.0010", _
                                1, _
                                lSession, _
                                dTreatmentStart, _
                                enSideNone, _
                                enNo, _
                                0.92, _
                                0.92, _
                                6, _
                                enObligationAutomatic, _
                                "", _
                                "", _
                                0, _
                                lID)

bStatus = generalInvoiceRequestEx.AddTarmedService(tarmedInputEx, "001", _
                                "00.0030", _
                                "00.0010", _
                                1, _
                                lSession, _
                                dTreatmentStart, _
                                enSideNone, _
                                enNo, _
                                0.92, _
                                0.92, _
                                6, _
                                enObligationAutomatic, _
                                "", _
                                "", _
                                0, _
                                lID)

'### Add a drug service
bStatus = generalInvoiceRequestEx.AddService("402", _
                                "7680381331011", _
                                "", _
                                1#, _
                                1, _
                                dTreatmentStart, _
                                strEanProvider, _
                                strEanResponsible, _
                                "Aspegic Forte 20 Sach. 1000 mg", _
                                0#, _
                                0#, _
                                1#, _
                                0#, _
                                0, _
                                enObligationAutomatic, _
                                "", _
                                "", _
                                enNo, _
                                1, _
                                lID)

Dim dRoundDifference As Double
dRoundDiference = 1#
bStatus = generalInvoiceRequestEx.Finalize(dRoundDifference)

Dim lXMLGenerationAttribute As Long
lXMLGenerationAttribute = 0
Dim lValidationError As Long
Dim lTimestamp As Long
Dim generalInvoiceResultEx As GENERALINVOICEREQUESTMANAGER430Lib.GeneralInvoiceResult

Dim strTmpFile As String
Dim strUsedSchema As String
bStatus = generalInvoiceRequestManagerEx.GetXML(lXMLGenerationAttribute, strTmpFile, lValidationError,  _
                                                lTimestamp, strUsedSchema, generalInvoiceResultEx)
Dim strTargetFile As String
strTargetFile = "GeneralInvoiceRequestExample.xml"
FileCopy strTmpFile, strTargetFile

'### relase resources
Set tarmedInputEx = Nothing
Set IAddress = Nothing
Set generalInvoiceResultEx = Nothing
Set generalInvoiceRequestEx = Nothing
Set generalInvoiceRequestManagerEx = Nothing

Exit Sub

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

'### relase resources
Set tarmedInputEx = Nothing
Set IAddress = Nothing
Set generalInvoiceResultEx = Nothing
Set generalInvoiceRequestEx = Nothing
Set generalInvoiceRequestManagerEx = Nothing

End Sub


 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 interfaces IAddress and ITarmedInput are available for setting address and Tarmed related invoice data.

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 none-encrypted 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 eIsCopy=enYes
  4. IGeneralInvoiceRequestManager::GetXML
storno 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 eIsStorno=enYes
  4. IGeneralInvoiceRequestManager::GetXML
create 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
copy of a reminder
This can be accomplished by calling the following 4 methods:
  1. IGeneralInvoiceRequestManager::LoadXML using reminderXML as input file
  2. IGeneralInvoiceResult::GetRequest to retrieve the parameters
  3. IGeneralInvoiceRequest::SetRequest with eIsCopy=enYes
  4. IGeneralInvoiceRequestManager::GetXML
storno of a reminder
This can be accomplished by calling the following 5 methods.
Note that this shows an alternative way of using invoiceXML and lRequestTimestamp instead of reminderXML.
  1. IGeneralInvoiceRequestManager::LoadXML using invoiceXML as input file
  2. IGeneralInvoiceResult::GetRequest to retrieve the parameters
  3. IGeneralInvoiceRequest::SetReminder using the stored lRequestTimestamp
  4. IGeneralInvoiceRequest::SetRequest with eIsStorno=enYes
  5. IGeneralInvoiceRequestManager::GetXML


 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 given below.

If the bstrPrintTemplate variable is empty then the default print template (using the data language as language switch - see below) is used.
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.
  • logTpl: is the logical template name where 2 template names are defined: summary|detail.
  • 4Recipient: defines the optional recipient where guarantor|patient|hc are defined.
    For TG summary4guarantor (or just summary) and detail4guarantor (or just detail) are the defaults for the guarantor addressed invoice/reminder form ("Patienten-Rechnung" and "Rückforderungsbeleg")
    For TP detail4hc (or just detail) is the default for the insurance addressed invoice/reminder form ("TP Rechnung").
    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 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 2 predefined pseudo print objects with a special meaning:

    • PDF for generating PDF files
    • WEBSTAMP for printing electronic stamps

  • printTemplateFile is 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 the TP case.
  • bstrPrintTemplate: (DOCUMENT_TITLE=Alternate title for the invoice;) prints a substituted title as given above.
  • bstrPrintTemplate: summary4hc(DOCUMENT_TITLE=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: detail=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.
  • 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"). However, the XML request is further characterized by a state that is formed by a set of Boolean process attributes, namely

"copy" attribute

The copy attribute defines the XML request as an identical copy of an initial request.
The absence of the copy attribute in reverse defines the XML request as "normal" (initial) request.

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

"storno" attribute

The storno attribute cancels the XML request defined by the topmost reference object.
The absence of the storno attribute in reverse defines the XML request as "normal" request.

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

The copy and storno attributes can be combined to form a total of 4 different combinations.


 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!


 Notes about the signature

XML signatures are digital signatures designed for use in XML transactions. The W3C standard defines a schema for capturing the result of a digital signature operation applied to an infoset. XML signatures add authentication, data integrity, and support for non-repudiation to the data that they sign.
However, it is beyond the scope of this documentation to explain all details of a signature or the signing process. Detailed information about all aspects of signatures can be found at W3C.

Boundary conditions and critical aspects

  • the signature is optional!
  • if an infoset is signed then the private certificate of the sender must be used and this certificate is applied to the payload element. This inherently qualifies for a detached signature.

    In this context sender is used in terms of the communication and therefore is defined as the EAN entity given in the transport@from attribute

  • the URI attribute of the reference element must use a XPointer syntax of the payload element, e.g. <ds:Reference URI="#xpointer(/invoice:request/invoice:payload)">
  • it is recommended to add the public key via a X509Data element such that a key store can be built at the recipient's site
  • The signature algorithm is fixed to PKCS1 (RSA-SHA1) (RFC 2437: RSA Cryptography Specifications)
  • The digest algorithm is fixed to SHA-1
  • the used canonicalization algorithm must be http://www.w3.org/2001/10/xml-exc-c14n#, the exclusive XML Canonicalization

The generalInvoiceRequest module does obey all these conditions whenever signature is "turned on" by setting the private certificate and password of the "fromEAN" entity (cf. IGeneralInvoiceRequest::SetTransport). This certificate must be in the PFX format.