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

The GeneralInvoiceResponseManager is an ATL COM module which provides methods to load and analyze XML infosets of type generalInvoiceResponse_430. These infosets are responses to a previously sent invoice or reminder where the topmost object reference defines target request. The subchapter object reference provides an in-depth description of the concept of "object reference". |  | space
Interfaces |  | 3 interface
IAddress | The utility interface IAddress is available for retrieving structured address data out of the XML response. |
IGeneralInvoiceResponse | The interface IGeneralInvoiceResponse allows to read back all data that have been loaded with the IGeneralInvoiceResponseManager::LoadXML method. |
IGeneralInvoiceResponseManager | The main interface IGeneralInvoiceResponseManager -creatable in its own right- allows to load and analyze a XML infoset of type generalInvoiceResponse_430. |
Types |  |
type definitions | List of all used builtin, composite and enumeration types |
Important information about the usage and handling of the module |  |
Document | General usage of the generalInvoiceResponse430 COM module - an overview |
Document | Overview of the concept of "Object reference" |
Document | Notes about the signature part of the XML infoset |
Document | Notes about the encryption part of the XML infoset |
Document | Notes about the reimbursement process |
Document | Syntax of the printTemplate variable of the Print method |
Document | How to generate a PDF archive file of an invoice/reminder response |
Document | VB code snippet for using the generalInvoiceResponse430 COM module |

© by sumex1.net - all rights reserved


  • generalInvoiceResponse430
  • IAddress

IAddress interface |  | V4.30/26 Aug 2010
With the IAddress interface structured 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. |
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 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
  • 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. |  |  | 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, 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
  • 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


  • IGeneralInvoiceResponse

IGeneralInvoiceResponse interface |  | V4.30/26 Aug 2010
The IGeneralInvoiceResponse interface allows to read back all data that have been loaded with the IGeneralInvoiceResponseManager::LoadXML method. |  | space
Methods |  | 24 methods
GetAbortInfo | Get the abort information string with the error coded in the module language |
GetAcceptType | This method is called if the main response type returned by the GetResponse method is enResponseAccepted |
GetBalance | Retrieves the balance information for the reimbursement process |
GetBiller | Retrieves the EAN number of the biller |
GetContact | Retrieves the EAN number and the structured address of the main contact |
GetCredit | Retrieves the optional credit object reference parameters |
GetCreditor | Retrieves the structured address of the creditor for the reimbursement process |
GetDebitor | Retrieves the structured address of the debitor for the reimbursement process |
GetEsr | Retrieves the ESR 5 or 9 information for the reimbursement process if the ESR type is not enRedPayinSlip |
GetEsrRed | Retrieves the ESR Red (red payin slip) information for the reimbursement process if the ESR type is enRedPayinSlip |
GetEsrType | Retrieves the type of the ESR |
GetFirstNotification | Retrieves the first notification object |
GetGenerator | Retrieves the identification parameters of the senders XML infoset generator software |
GetInsurance | Retrieves the EAN number of the insurance |
GetInvoice | Retrieves the invoice object reference parameters |
GetNextNotification | Retrieves the next notification object |
GetPackage | Retrieves the identification parameters of the senders main software |
GetPatient | Retrieves the primary parameters and structured address of the patient - these data are mirrored from the request |
GetPendingType | This method is called if the main response type returned by the GetResponse method is enResponsePending |
GetProvider | Retrieves the EAN number of the provider |
GetRejectType | This method is called if the main response type returned by the GetResponse method is enResponseRejected |
GetReminder | Retrieves the reminder object reference parameters |
GetResponse | Returns the primary parameters of the response infoset, namely the operation modus, the language the infoset is formulated, and most important the type of the response |
GetTransport | Returns the transport information that defines the routing of the infoset |
Properties |  | 0 properties


  • IGeneralInvoiceResponse
  • GetAbortInfo

IGeneralInvoiceResponse::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 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. |  |


  • IGeneralInvoiceResponse
  • GetAcceptType

IGeneralInvoiceResponse::GetAcceptType method
This method is called if the main response type returned by the GetResponse method is enResponseAccepted.

If eHasReimbursement=enYes then the response includes reimbursement information (cf. Notes about reimbursement). As a consequence GetCreditor, GetDebitor, GetBalance, GetEsrType and GetEsr or GetEsrRed should be called to retrieve the full pay back information. Alternatively, the IGeneralInvoiceResponseManager::Print method might be called to print a reimbursement invoice.

Calling the iterator pair GetFirstNotification / GetNextNotification is unnecessary as there are no notifications and VARIANT_FALSE would be returned.

If the data stem from loading a lower version XML file, then a compatibility error is issued! If full support is needed for a lower version then there is not resort than using the native COM versions directly.

space
C/C++ calling syntax
HRESULT GetAcceptType( BSTR
StatusType
StatusType
YesNoType
VARIANT_BOOL 		*pbstrExplanation,
*peStatusIn,
*peStatusOut,
*peHasReimbursement,
*pbStatus);
Calling argument description
[out] BSTR *pbstrExplanation An optional explanation.
The explanation is formulated in the data language returned by the GetResponse method
[out] StatusType | *peStatusIn | The status of the invoice/reminder request (given by the topmost object reference) before this response was generated
[out] StatusType | *peStatusOut | The status of the invoice/reminder request (given by the topmost object reference) after this response was generated
[out] YesNoType | *peHasReimbursement | Defines if there the response includes reimbursement information.
[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.


  • IGeneralInvoiceResponse
  • GetBalance

IGeneralInvoiceResponse::GetBalance method
Retrieves the balance information for the reimbursement process.

Call this method only if the main response type returned by the GetResponse method is enResponseAccepted and eHasReimbursement=enYes. In all other circumstance the balance information are undefined.

If the data stem from loading a lower version XML file, then a compatibility error is issued! If full support is needed for a lower version then there is not resort than using the native COM versions directly.

space
C/C++ calling syntax
HRESULT GetBalance( double
double
BSTR
BSTR
long
VARIANT_BOOL 		*pdAmountDue,
*pdAmountVat,
*pbstrCurrency,
*pbstrVatNumber,
*plPaymentPeriod,
*pbStatus);
Calling argument description
[out] double | *pdAmountDue | The reimbursement amount in CHF to pay back
[out] double | *pdAmountVat | The VAT amount in CHF.
[out] BSTR | *pbstrCurrency | The currency - this is fixed to "CHF" - Swiss Francs!
[out] BSTR *pbstrVatNumber The VAT number of the debitor 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] long | *plPaymentPeriod | The payment period in which the reimbursement should be paid back.
[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.


  • IGeneralInvoiceResponse
  • GetBiller

IGeneralInvoiceResponse::GetBiller method |  |  |
Retrieves the EAN number of the biller. Note that this is only a safety measure for a crosscheck. If the data stem from loading a lower version XML file, then a compatibility error is issued! If full support is needed for a lower version then there is not resort than using the native COM versions directly. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetBiller( | BSTR VARIANT_BOOL | *pbstrEAN, *pbStatus); |
Calling argument description |  |  |
[out] BSTR | *pbstrEAN | EAN number of the biller as supplied by medwin.ch |
[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. |  |


  • IGeneralInvoiceResponse
  • GetContact

IGeneralInvoiceResponse::GetContact method |  |  |
Retrieves the EAN number and the structured address of the main contact. The structured address data is read via the methods of the returned IAddress interface. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetContact( | BSTR IAddress VARIANT_BOOL | *pbstrEAN, **ppIAddress, *pbStatus); |
Calling argument description |  |  |
[out] BSTR | *pbstrEAN | EAN number of the main contact as supplied by medwin.ch |
[out] IAddress | **ppIAddress | The ppIAddress is an IAddress interface handle for the primary contact address. The interface handle allows to get the structured address data back. The address is either one of a person, a company, or an employee of an company. In the latter case the employee's full name is coded into the subaddress field. 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. |  |


  • IGeneralInvoiceResponse
  • GetCredit

IGeneralInvoiceResponse::GetCredit method
Retrieves the optional credit object reference parameters. In fact this object reference is mirrored from the corresponding invoice/reminder request infoset.

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

If the data stem from loading a lower version XML file, then a compatibility error is issued! If full support is needed for a lower version then there is not resort than using the native COM versions directly.

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") - mirrored from the request.

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") - mirrored from the request.

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 - mirrored from the request.

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 no credit object reference was defined
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.


  • IGeneralInvoiceResponse
  • GetCreditor

IGeneralInvoiceResponse::GetCreditor method
Retrieves the structured address of the creditor for the reimbursement process.

Call this method only if the main response type returned by the GetResponse method is enResponseAccepted and eHasReimbursement=enYes. In all other circumstance the creditor information are undefined.

If the data stem from loading a lower version XML file, then a compatibility error is issued! If full support is needed for a lower version then there is not resort than using the native COM versions directly.

space
C/C++ calling syntax
HRESULT GetCreditor( IAddress
VARIANT_BOOL 		**ppIAddress,
*pbStatus);
Calling argument description
[out] IAddress **ppIAddress The IAddress interface handle that allows to get the creditor's 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.


  • IGeneralInvoiceResponse
  • GetDebitor

IGeneralInvoiceResponse::GetDebitor method
Retrieves the structured address of the debitor for the reimbursement process.

Call this method only if the main response type returned by the GetResponse method is enResponseAccepted and eHasReimbursement=enYes. In all other circumstance the debitor information are undefined.

If the data stem from loading a lower version XML file, then a compatibility error is issued! If full support is needed for a lower version then there is not resort than using the native COM versions directly.

space
C/C++ calling syntax
HRESULT GetDebitor( IAddress
VARIANT_BOOL 		**ppIAddress,
*pbStatus);
Calling argument description
[out] IAddress **ppIAddress The IAddress interface handle that allows to get the debitor's 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.


  • IGeneralInvoiceResponse
  • GetEsr

IGeneralInvoiceResponse::GetEsr method
Retrieves the ESR 5 or 9 information for the reimbursement process if the ESR type is not enRedPayinSlip

Call this method only if the main response type returned by the GetResponse method is enResponseAccepted and eHasReimbursement=enYes and GetEsrType does not return enRedPayinSlip. In all other circumstance the ESR information are undefined.

If the data stem from loading a lower version XML file, then a compatibility error is issued! If full support is needed for a lower version then there is not resort than using the native COM versions directly.

space
C/C++ calling syntax
HRESULT GetEsr( EsrType
BSTR
BSTR
BSTR
IAddress
VARIANT_BOOL 		*peEsrType,
*pbstrParticipantNumber,
*pbstrReferenceNumber,
*pbstrBankAccount,
**ppIBankAddress,
*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, 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.


  • IGeneralInvoiceResponse
  • GetEsrRed

IGeneralInvoiceResponse::GetEsrRed method
Retrieves the ESR Red (red payin slip) information for the reimbursement process if the ESR type is enRedPayinSlip

Call this method only if the main response type returned by the GetResponse method is enResponseAccepted and eHasReimbursement=enYes and GetEsrType returns enRedPayinSlip. In all other circumstance the ESR Red information are undefined.

If the data stem from loading a lower version XML file, then a compatibility error is issued! If full support is needed for a lower version then there is not resort than using the native COM versions directly.

space
C/C++ calling syntax
HRESULT GetEsrRed( BSTR
BSTR
BSTR
BSTR
IAddress
VARIANT_BOOL 		*pbstrPostAccount,
*pbstrIBAN,
*pbstrReferenceNumber,
*pbstrRemarks,
**ppIBankAddress,
*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, 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.


  • IGeneralInvoiceResponse
  • GetEsrType

IGeneralInvoiceResponse::GetEsrType method
Retrieves the type of the ESR.

Call this method only if the main response type returned by the GetResponse method is enResponseAccepted and eHasReimbursement=enYes. In all other circumstance the ESR is undefined.

If the data stem from loading a lower version XML file, then a compatibility error is issued! If full support is needed for a lower version then there is not resort than using the native COM versions directly.

space
C/C++ calling syntax
HRESULT GetEsrType( EsrType
VARIANT_BOOL 		*peEsrType,
*pbStatus);
Calling argument description
[out] EsrType | *peEsrType | Defines the type of ESR
[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.


  • IGeneralInvoiceResponse
  • GetFirstNotification

IGeneralInvoiceResponse::GetFirstNotification method |  |  |
Retrieves the first notification object. The notification is typed as message if the reponseType= enResponsePending or is typed as error if reponseType= enResponseRejected. The reponseType= enResponseAccepted has no notifications per definition. The responseType is returned in the GetResponse method. VARIANT_FALSE is returned if the end of the object list is reached. If the data stem from loading a lower version XML file, then a compatibility error is issued! If full support is needed for a lower version then there is not resort than using the native COM versions directly. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetFirstNotification( | BSTR BSTR YesNoType long BSTR BSTR VARIANT_BOOL | *pbstrCode, *pbstrText, *peIsAnError, *plRecordID, *pbstrErrorValue, *pbstrValidValue, *pbStatus); |
Calling argument description |  |  |
[out] BSTR | *pbstrCode | A message or error code dependent on the notification type. Note that this code is defined by the "fromEAN" entity and is not standardized. |
[out] BSTR | *pbstrText | A message or error text dependent on the notification type. Note that this text is defined by the "fromEAN" entity and is not standardized. |
[out] YesNoType | *peIsAnError | A Boolean that defines if it is an error or a message. In the latter case bstrErrorValue and bstrValidValue are empty and lRecordID is set to 0. |
[out] long | *plRecordID | A record sequence number from the request uniquely identifying the target service record. If eIsAnError=enYes or the error is not related to a service record lRecordID is 0. |
[out] BSTR | *pbstrErrorValue | The erroneous/incorrect value if the notification is typed as error (eIsAnError=enYes) otherwise 0 |
[out] BSTR | *pbstrValidValue | The valid/correct value if the notification is typed as error (eIsAnError=enYes) otherwise 0 |
[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. |  |


  • IGeneralInvoiceResponse
  • GetGenerator

IGeneralInvoiceResponse::GetGenerator method |  |  |
Retrieves the identification parameters of the senders XML infoset generator software. If the data stem from loading a lower version XML file, then a compatibility error is issued! If full support is needed for a lower version then there is not resort than using the native COM versions directly. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetGenerator( | BSTR long long BSTR VARIANT_BOOL | *pbstrSoftwarePackage, *plSoftwareVersion, *plSoftwareID, *pbstrSoftwareCopyright, *pbStatus); |
Calling argument description |  |  |
[out] BSTR | *pbstrSoftwarePackage | Name of the generator software that uses this DLL |
[out] long | *plSoftwareVersion | Version of the generator software codes as 32-bit value where lSoftwareVersion = 100*Major version + Minor version. |
[out] long | *plSoftwareID | Optional ID of the generator software that uses this DLL |
[out] BSTR | *pbstrSoftwareCopyright | The copyright notice of the developer of generator 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. |  |


  • IGeneralInvoiceResponse
  • GetInsurance

IGeneralInvoiceResponse::GetInsurance method |  |  |
Retrieves the EAN number of the insurance. Note that this is only a safety measure for a crosscheck. If the data stem from loading a lower version XML file, then a compatibility error is issued! If full support is needed for a lower version then there is not resort than using the native COM versions directly. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetInsurance( | BSTR VARIANT_BOOL | *pbstrEAN, *pbStatus); |
Calling argument description |  |  |
[out] BSTR | *pbstrEAN | EAN number of the insurance as supplied by medwin.ch |
[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. |  |


  • IGeneralInvoiceResponse
  • GetInvoice

IGeneralInvoiceResponse::GetInvoice method
Retrieves the invoice object reference parameters. In fact this object reference is mirrored from the corresponding invoice/reminder request infoset.

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

If the data stem from loading a lower version XML file, then a compatibility error is issued! If full support is needed for a lower version then there is not resort than using the native COM versions directly.

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") - mirrored from the request.

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") - mirrored from the request.

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 - mirrored from the request.

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") - mirrored from the request.

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.


  • IGeneralInvoiceResponse
  • GetNextNotification

IGeneralInvoiceResponse::GetNextNotification method |  |  |
Retrieves the next notification object. The notification is typed as message if the reponseType= enResponsePending or is typed as error if reponseType= enResponseRejected. The reponseType= enResponseAccepted has no notifications per definition. The responseType is returned in the GetResponse method. VARIANT_FALSE is returned if the end of the object list is reached. If the data stem from loading a lower version XML file, then a compatibility error is issued! If full support is needed for a lower version then there is not resort than using the native COM versions directly. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetNextNotification( | BSTR BSTR YesNoType long BSTR BSTR VARIANT_BOOL | *pbstrCode, *pbstrText, *peIsAnError, *plRecordID, *pbstrErrorValue, *pbstrValidValue, *pbStatus); |
Calling argument description |  |  |
[out] BSTR | *pbstrCode | A message or error code dependent on the notification type. Note that this code is defined by the "fromEAN" entity and is not standardized. |
[out] BSTR | *pbstrText | A message or error text dependent on the notification type. Note that this text is defined by the "fromEAN" entity and is not standardized. |
[out] YesNoType | *peIsAnError | A Boolean that defines if it is an error or a message. In the latter case bstrErrorValue and bstrValidValue are empty and lRecordID is set to 0. |
[out] long | *plRecordID | A record sequence number from the request uniquely identifying the target service record. If eIsAnError=enYes or the error is not related to a service record lRecordID is 0. |
[out] BSTR | *pbstrErrorValue | The erroneous/incorrect value if the notification is typed as error (eIsAnError=enYes) otherwise 0 |
[out] BSTR | *pbstrValidValue | The valid/correct value if the notification is typed as error (eIsAnError=enYes) otherwise 0 |
[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. |  |


  • IGeneralInvoiceResponse
  • GetPackage

IGeneralInvoiceResponse::GetPackage method
Retrieves the identification parameters of the senders main software.

Since the package information is optionally VARIANT_FALSE is returned if the senders main software is undefined.

If the data stem from loading a lower version XML file, then a compatibility error is issued! If full support is needed for a lower version then there is not resort than using the native COM versions directly.

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 no package data is available
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.


  • IGeneralInvoiceResponse
  • GetPatient

IGeneralInvoiceResponse::GetPatient method
Retrieves the primary parameters and structured address of the patient - these data are mirrored from the request.

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

If the data stem from loading a lower version XML file, then a compatibility error is issued! If full support is needed for a lower version then there is not resort than using the native COM versions directly.

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.


  • IGeneralInvoiceResponse
  • GetPendingType

IGeneralInvoiceResponse::GetPendingType method
This method is called if the main response type returned by the GetResponse method is enResponsePending.

Calling the iterator pair GetFirstNotification / GetNextNotification is only necessary if eHasMessage=enYes.

If the data stem from loading a lower version XML file, then a compatibility error is issued! If full support is needed for a lower version then there is not resort than using the native COM versions directly.

space
C/C++ calling syntax
HRESULT GetPendingType( BSTR
StatusType
StatusType
YesNoType
VARIANT_BOOL 		*pbstrExplanation,
*peStatusIn,
*peStatusOut,
*peHasMessage,
*pbStatus);
Calling argument description
[out] BSTR *pbstrExplanation An optional explanation.
The explanation is formulated in the data language returned by the GetResponse method
[out] StatusType | *peStatusIn | The status of the invoice/reminder request (given by the topmost object reference) before this response was generated
[out] StatusType | *peStatusOut | The status of the invoice/reminder request (given by the topmost object reference) after this response was generated
[out] YesNoType | *peHasMessage | A Boolean that defines if messages are available in which case the iterator pair GetFirstNotification / GetNextNotification should be called.
[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.


  • IGeneralInvoiceResponse
  • GetProvider

IGeneralInvoiceResponse::GetProvider method |  |  |
Retrieves the EAN number of the provider. Note that this is only a safety measure for a crosscheck. If the data stem from loading a lower version XML file, then a compatibility error is issued! If full support is needed for a lower version then there is not resort than using the native COM versions directly. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetProvider( | BSTR VARIANT_BOOL | *pbstrEAN, *pbStatus); |
Calling argument description |  |  |
[out] BSTR | *pbstrEAN | EAN number of the provider as supplied by medwin.ch |
[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. |  |


  • IGeneralInvoiceResponse
  • GetRejectType

IGeneralInvoiceResponse::GetRejectType method
This method is called if the main response type returned by the GetResponse method is enResponseRejected.

Calling the iterator pair GetFirstNotification / GetNextNotification is only necessary if eHasError=enYes.

If the data stem from loading a lower version XML file, then a compatibility error is issued! If full support is needed for a lower version then there is not resort than using the native COM versions directly.

space
C/C++ calling syntax
HRESULT GetRejectType( BSTR
StatusType
StatusType
YesNoType
VARIANT_BOOL 		*pbstrExplanation,
*peStatusIn,
*peStatusOut,
*peHasError,
*pbStatus);
Calling argument description
[out] BSTR *pbstrExplanation An optional explanation.
The explanation is formulated in the data language returned by the GetResponse method
[out] StatusType | *peStatusIn | The status of the invoice/reminder request (given by the topmost object reference) before this response was generated
[out] StatusType | *peStatusOut | The status of the invoice/reminder request (given by the topmost object reference) after this response was generated
[out] YesNoType | *peHasError | A Boolean that defines if errors are available in which case the iterator pair GetFirstNotification / GetNextNotification should be called.
[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.


  • IGeneralInvoiceResponse
  • GetReminder

IGeneralInvoiceResponse::GetReminder method
Retrieves the reminder object reference parameters. In fact this object reference is mirrored from the corresponding reminder request infoset.

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

If the data stem from loading a lower version XML file, then a compatibility error is issued! If full support is needed for a lower version then there is not resort than using the native COM versions directly.

space
C/C++ calling syntax
HRESULT GetReminder( BSTR
DATE
long
long
VARIANT_BOOL 		*pbstrRequestReminderID,
*pdRequestReminderDate,
*plRequestReminderTimestamp,
*plReminderLevel,
*pbStatus);
Calling argument description
[out] BSTR *pbstrRequestReminderID The request ID is the main software's identification of the reminder ("Mahnnummer") - mirrored from the request.

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") - mirrored from the request.

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 - mirrored from the request.

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 - mirrored from the request.
[out, retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE then no reminder object reference was defined
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.


  • IGeneralInvoiceResponse
  • GetResponse

IGeneralInvoiceResponse::GetResponse method
Returns the primary parameters of the response infoset, namely the operation modus, the language the infoset is formulated, and most important the type of the response.

Based on the response type one of the following methods should be called:
GetAcceptType | Per definition this means that the corresponding request is fully accepted and will be processed to a final stage. An optional explanation might be supplied but no messages.
GetPendingType | Per definition this means that the corresponding request can not be processed to a final stage as some data are missing. An optional explanation and [0,n] messages (instructions) are supplied to "unfreeze" the request.
GetRejectType | Per definition this means that the corresponding request is rejected and as a consequence the status of the request goes to the "canceled" state. An optional explanation and [0,n] errors are supplied to justify the decision.

If the data stem from loading a lower version XML file, then a compatibility error is issued! If full support is needed for a lower version then there is not resort than using the native COM versions directly.

space
C/C++ calling syntax
HRESULT GetResponse( LanguageType
YesNoType
YesNoType
ResponseType
ModusType
VARIANT_BOOL 		*peDataLanguage,
*peIsStorno,
*peIsCopy,
*peResponseType,
*peModusType,
*pbStatus);
Calling argument description
[out] LanguageType *peDataLanguage The language in which the response is formulated.

Note, that the data language and the module language (given by IGeneralInvoiceResponseManager::SetModuleLanguage) are independent and can be different!

[out] YesNoType *peIsStorno Boolean value that defines the "storno" status of the sent request.

Note that this is the initial value of the request mirrored in the response

[out] YesNoType *peIsCopy Boolean value that defines the "copy" status of the sent request.

Note that this is the initial value of the request mirrored in the response

[out] ResponseType | *peResponseType | The main response type.
[out] ModusType *peModusType The operation modus.

The default modus is enProduction whereas for developing/debugging purposes enTest has to 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.


  • IGeneralInvoiceResponse
  • GetTransport

IGeneralInvoiceResponse::GetTransport method |  |  |
Returns the transport information that defines the routing of the infoset. In fact the meaning and the data is mirrored from the corresponding request thus the initial sender becomes the recipient and the initial recipient becomes the sender. Furthermore the chain of intermediates from the request is reversed and the infoset is sent to the first intermediate of the reversed list. The given intermediate here is therefore the last one before reaching the receiver. All the involved parties are defined by EAN numbers as defined by www.medwin.ch. If the data stem from loading a lower version XML file, then a compatibility error is issued! If full support is needed for a lower version then there is not resort than using the native COM versions directly. |  |  | space
C/C++ calling syntax |  |  |
HRESULT GetTransport( | BSTR BSTR BSTR BSTR VARIANT_BOOL | *pbstrFromEAN, *pbstrViaEAN, *pbstrToEAN, *pbstrToBinDERFile, *pbStatus); |
Calling argument description |  |  |
[out] BSTR | *pbstrFromEAN | The EAN number of the sender as supplied by medwin.ch Note that this is the initial receiver of the request since the transport information from the request is mirrored in the response |
[out] BSTR | *pbstrViaEAN | The EAN number of the last intermediate as supplied by medwin.ch Note that this is the initial (first) intermediate of the request since the transport information from the request is mirrored in the response |
[out] BSTR | *pbstrToEAN | The EAN number of the receiver as supplied by medwin.ch Note that this is the initial sender of the request since the transport information from the request is mirrored in the response |
[out] BSTR | *pbstrToBinDERFile | If the XML infoset was signed then bstrToBinDERFile is a full file name (path + name) to the extracted binary DER certificate that is the public certificate of the "from" entity. The certificate file named X509DER_FromEAN.cer must be copied to a save place since the used temporary directory is emptied when the module shuts down. Note that this certificate can be used to encrypt a request XML infoset for the "from" 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. |  |


  • IGeneralInvoiceResponseManager

IGeneralInvoiceResponseManager interface |  | V4.30/26 Aug 2010
The IGeneralInvoiceResponseManager provides methods to load and analyze XML infosets of type generalInvoiceResponse_430. These infosets are responses to a previously sent invoice or reminder where the topmost object reference defines target request. The subchapter object reference provides an in-depth description of the concept of "object reference". |  | space
Methods |  | 8 methods
GetAbortInfo | Get the abort information string with the error coded in the module language |
GetLogSettings | Get the log settings for the module. |
GetXMLInfo | Preloads and analyzes a XML infoset regarding the accepted schema and other important information |
LoadXML | Loads a received XML infoset of an accepted type into memory for further processing via the returned interface handle |
Print | The Print method prints the response data of an accepted XML type 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. |
SetLogSettings | Set the log settings for the module |
Properties |  | 4 properties
[get/put] ModuleLanguage | Get/Set the language for the module i.e |
[get] ModuleVersion | Gets the version of the GeneralInvoiceResponseManager module. |
[get] ModuleVersionText | Get the textual version of the GeneralInvoiceResponseManager module. |
[get/put] PrintCopies | Get/Set the number of copies to print. |


  • IGeneralInvoiceResponseManager
  • GetAbortInfo

IGeneralInvoiceResponseManager::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 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. |  |


  • IGeneralInvoiceResponseManager
  • GetLogSettings

IGeneralInvoiceResponseManager::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 The log activity level where
lLogLevel = 0 | Logging is turned off
lLogLevel = 1 | Normal log activity
lLogLevel > 1 | Debug log activity. Use this level only for debugging purposes
[out] long | *plMaxSizeKB | The maximum size in KB of the log file.
[out] YesNoType | *peDoArchive | eDoArchive defines if the log file is recycled if the maximum size is reached (enNo) or if the log file is archived (enYes).
[out] BSTR | *pbstrArchiveDir | The base directory where log files are archived. bstrArchiveDir is only defined if eDoArchive=enYes otherwise bstrArchiveDir is empty.
[out, retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE then an error occurred and GetAbortInfo should be called to retrieve the error string.
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.


  • IGeneralInvoiceResponseManager
  • GetXMLInfo

IGeneralInvoiceResponseManager::GetXMLInfo method
Preloads and analyzes a XML infoset regarding the accepted schema and other important information.

If the XML infoset is of an accepted type then the fromEAN, toEAN as well as the encryption status are additionally extracted. The accepted XML types are

  • generalInvoiceResponse_430.xsd - full support
  • generalInvoiceResponse_410.xsd - only load and print support
  • hospitalInvoiceResponse_400.xsd - only load and print support
  • mdInvoiceResponse_400.xsd - only load and print support
Since the data space of the V430 and V410/V410 versions are disjoint a lower version can not be upgraded to V430. Therefore the lower version can only be loaded and printed with the LoadXML / Print methods. As a consequence all IGeneralInvoiceResponse methods return a compatibility error if called after loading a lower version than V430. If full support is needed for the lower versions then there is not resort than using the native COM versions directly.
The XSD name is set even if an error is generated.

This method should be called before calling the full XML loader LoadXML since the infoset is possibly encrypted. In this situation the corresponding PFX certificate and password must be supplied in the XML loader.

space
C/C++ calling syntax
HRESULT GetXMLInfo( BSTR
BSTR
BSTR
BSTR
YesNoType
VARIANT_BOOL 		bstrInputFile,
*pbstrUsedSchema,
*pbstrFromEAN,
*pbstrToEAN,
*peIsEncrypted,
*pbStatus);
Calling argument description
[in] BSTR | bstrInputFile | The full file name (path + name) of a XML infoset of type generalInvoiceResponse_430.xsd, generalInvoiceResponse_410.xsd, hospitalInvoiceResponse_400.xsd, or mdInvoiceResponse_400.xsd.
[out] BSTR | *pbstrUsedSchema | The full XSD name of the loaded XML file.
[out] BSTR *pbstrFromEAN The EAN number of the sender as supplied by medwin.ch
Note that this is the initial receiver of the request since the transport information from the request is mirrored in the response
[out] BSTR *pbstrToEAN The EAN number of the receiver as supplied by medwin.ch
Note that this is the initial sender of the request since the transport information from the request is mirrored in the response
[out] YesNoType *peIsEncrypted A Boolean that defines if the XML infoset is encrypted.

If true the private PFX certificate/password of the "toEAN" entity must be given in the LoadXML method otherwise the infoset can not be decrypted.

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


  • IGeneralInvoiceResponseManager
  • LoadXML

IGeneralInvoiceResponseManager::LoadXML method
Loads a received XML infoset of an accepted type into memory for further processing via the returned interface handle. The accepted XML types are
  • generalInvoiceResponse_430.xsd - full support
  • generalInvoiceResponse_410.xsd - only load and print support
  • hospitalInvoiceResponse_400.xsd - only load and print support
  • mdInvoiceResponse_400.xsd - only load and print support
Since the data space of the V430 and V410/V410 versions are disjoint a lower version can not be upgraded to V430. Therefore the lower version can only be loaded and printed with the LoadXML / Print methods. As a consequence all IGeneralInvoiceResponse methods return a compatibility error if called after loading a lower version than V430. If full support is needed for the lower versions then there is not resort than using the native COM versions directly.

Since the infoset is possibly encrypted, call GetXMLInfo to decide if and which PFX certificate to supply.

space
C/C++ calling syntax
HRESULT LoadXML( BSTR
BSTR
BSTR
IGeneralInvoiceResponse
VARIANT_BOOL 		bstrInputFile,
bstrToPFXFile,
bstrToPFXPassword,
**ppIGeneralInvoiceResponse,
*pbStatus);
Calling argument description
[in] BSTR | bstrInputFile | The full file name (path + name) of a XML infoset of type generalInvoiceResponse_430.xsd, generalInvoiceResponse_410.xsd, hospitalInvoiceResponse_400.xsd, or mdInvoiceResponse_400.xsd.
[in] BSTR bstrToPFXFile The file name of the PFX certificate that is the private certificate of the "toEAN" entity.
This variable is not used if the XML infoset is not encrypted.
[in] BSTR bstrToPFXPassword The password to open the PFX certificate.
This variable is not used if the XML infoset is not encrypted.
[out] IGeneralInvoiceResponse **ppIGeneralInvoiceResponse The IGeneralInvoiceResponse 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.


  • IGeneralInvoiceResponseManager
  • Print

IGeneralInvoiceResponseManager::Print method
The Print method prints the response data of an accepted XML type 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 producing PDFs or changing print object dynamically.

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

IMPORTANT LICENSE NOTE The report engine used is Hexatech's ViewPro (www.hexatech.com). If you supply your own template files then you must have your own ViewPro license. By using this COM module you implicitly agree upon this restriction!! 		space
C/C++ calling syntax
HRESULT Print( BSTR
YesNoType
long
VARIANT_BOOL 		bstrPrintTemplate,
ePrintPreview,
lEsrExcludeAttributes,
*pbStatus);
Calling argument description
[in] BSTR | bstrPrintTemplate | Either empty for default printing or special formed argument (cf. above) for individual printing and/or changing of static texts [PATCH]
[in] YesNoType | ePrintPreview | A Boolean that defines if print preview is used (enYes) or printing is done (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.

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


  • IGeneralInvoiceResponseManager
  • PrintAdjust

IGeneralInvoiceResponseManager::PrintAdjust method
Shows the print object adjustment dialog that allows to move print objects of a .vps report generator file. | 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:

Detail_language

where
  • language is one of {dt, fr, it}.
For example the logical name "Detail_fr" is the French print template.
[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.


  • IGeneralInvoiceResponseManager
  • PrintSetup

IGeneralInvoiceResponseManager::PrintSetup method
Shows the printer setup dialog that allows to define printer settings connected with a .vps report generator file. | 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:

Detail_language

where
  • language is one of {dt, fr, it}.
For example the logical name "Detail_fr" is the French print template.
[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.


  • IGeneralInvoiceResponseManager
  • SetLogSettings

IGeneralInvoiceResponseManager::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.


  • IGeneralInvoiceResponseManager
  • ModuleLanguage

IGeneralInvoiceResponseManager::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 IGeneralInvoiceResponse::GetResponse) 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


  • IGeneralInvoiceResponseManager
  • ModuleVersion

IGeneralInvoiceResponseManager::ModuleVersion property
Gets the version of the GeneralInvoiceResponseManager 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


  • IGeneralInvoiceResponseManager
  • ModuleVersionText

IGeneralInvoiceResponseManager::ModuleVersionText property
Get the textual version of the GeneralInvoiceResponseManager 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


  • IGeneralInvoiceResponseManager
  • PrintCopies

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


  • 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 |  | 17 types
[enumeration] AddressType | Enumerates the defined address categories. |
[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 |
[builtin] DATE | A value denoting a date and time was specified |
[builtin] double | An 8-byte IEEE real value. |
[enumeration] EsrExcludeAttributes | List of ESR printing excludes |
[enumeration] EsrType | Enumerates the defined ESR categories. |
[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] IGeneralInvoiceResponse | Invoice response object |
[enumeration] LanguageType | Enumerates all supported languages. |
[builtin] long | A 4-byte integer value. |
[enumeration] ModusType | Enumerates the defined operation modus types |
[enumeration] ResponseType | Enumerates the defined response types. |
[enumeration] SexType | Enumerates the defined gender categories. |
[enumeration] StatusType | Enumerates the defined status types that request object can posses |
[builtin] VARIANT_BOOL | A 16 bit Boolean (True/False) value was specified |
[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
  • 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
  • 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
  • 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 |
en9to16or27plus: 1 | ESR+ 9/16 or 9/27 (without amount) |
en5to15: 2 | ESR 5/15 |
en5to15plus: 3 | ESR+ 5/15 (without amount) |
enRedPayinSlip: 4 | Red pay-in slip (actually this is not a real ESR) |


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

IGeneralInvoiceResponse type |
Invoice response object | 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
  • long

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


  • Type definitions
  • ModusType

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


  • Type definitions
  • ResponseType

ResponseType enumeration type |  |
Enumerates the defined response types. |  | space
Set of enumeration values |  | 3 elements
enResponsePending: 1 | The response is of type pending - the corresponding request can not be processed to a final stage as some data are missing. |
enResponseRejected: 2 | The response is of type rejected - the corresponding request is rejected and as a consequence the status of the request goes to the "canceled" state |
enResponseAccepted: 3 | The response is of type accepted - the corresponding request is fully accepted and will be processed to a final stage. |


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

StatusType enumeration type |  |
Enumerates the defined status types that request object can posses |  | space
Set of enumeration values |  | 9 elements
enStatusUnknown: 2 | The status is unknown meaning that the given object reference is unknown. |
enStatusAmbiguous: 3 | The status is ambiguous meaning that the given object reference delivers more than one result. |
enStatusReceived: 4 | The status is received meaning that nothing has been done so far except receiving the request. |
enStatusFrozen: 5 | The status is frozen meaning that the request is not processed until further data is provided - an appropriate response of that type was sent. |
enStatusProcessed: 6 | The status is processed meaning that the request has passed all processing and analysis but has not reached the granted or canceled state. |
enStatusGranted: 7 | The status is granted meaning that the request is accepted and archived as well as the requested amount was paid to the biller. |
enStatusCanceled: 8 | The status is canceled meaning that the request is canceled and archived with reject status - an appropriate response of that type was sent |
enStatusClaimed: 9 | The status is claimed meaning that a previously initiated reimbursement process was successfully accomplished as the money was paid back. |
enStatusReimbursed: 10 | The status is reimbursed meaning that a reimbursement process was initiated. This situation is reached if an invoice/reminder that was already paid (enStatusClaimed) was canceled by using the storno attribute. Or the sent invoice was in fact a credit advice (a "negative invoice"). In both cases the insurance sends back the full billing information (creditor, debitor, amounts and ESR data) that allows to generated a pay-back invoice. The IGeneralInvoiceResponseManager::LoadXML method does print the correctly formatted ESR information at the page end. |


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

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


 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 which is the mirrored transport@from attribute of the request
  • 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 generalInvoiceResponse module does understand these boundary conditions. If the response XML is encrypted (cf. IGeneralInvoiceResponseManager::GetXMLInfo) then decryption is done by loading the private PFX certificate and password of the "toEAN" (with is the mirrored "fromEAN" of the request).


 VB code snippet for using the generalInvoiceResponseManager

Private Sub GeneralInvoiceResponseExampleButton_Click()

On Error GoTo Err_Trap

Dim bStatus As Boolean

'### GeneralInvoiceResponseManager interface
Dim generalInvoiceRequestManagerEx As GENERALINVOICERESPONSEMANAGER430Lib.GeneralInvoiceResponseManager
Set generalInvoiceRequestManagerEx = New GeneralInvoiceResponseManager

'### GeneralInvoiceResponse interface
Dim generalInvoiceResponseEx As GeneralInvoiceResponse

Dim strXML As String
Dim strXSD As String
Dim lVersion As Long
Dim strFromEAN As String
Dim strToEAN As String
Dim bIsEncrypted As YesNoType

strXML = "Response430_Accepted01.xml"

bStatus = generalInvoiceRequestManagerEx.GetXMLInfo(strXML, strXSD, strFromEAN,strToEAN,bIsEncrypted)
If bStatus And Not bIsEncrypted Then

    bStatus = generalInvoiceRequestManagerEx.LoadXML(strXML, "", "",generalInvoiceResponseEx)
    If bStatus Then
        Dim strCode As String
        Dim strText As String
        Dim bIsAnError As YesNoType
        Dim lRecordID As Long
        Dim strErrorValue As String
        Dim strValidValue As String
        Dim strOutput As String
        strOutput = ""
        bStatus = generalInvoiceResponseEx.GetFirstNotification(strCode, strText, bIsAnError, lRecordID,  _
                                                                strErrorValue, strValidValue)
        If bStatus Then
            strOutput = strOutput + "strCode=[" + strCode + "]strText=[" + strText + "]recordID=[" +  _
                        lRecordID + "]strErrorValue=[" + strErrorValue + "]strValidValue=[" +  _
                        strValidValue + "]" + vbCrLf
            Do While generalInvoiceResponseEx.GetNextNotification(strCode, strText, bIsAnError,  _
                                                                  lRecordID,strErrorValue, strValidValue)
                strOutput = strOutput + "strCode=[" + strCode + "]strText=[" + strText + "]recordID=[" +  _
                            lRecordID + "]strErrorValue=[" + strErrorValue + "]strValidValue=[" +
                            strValidValue + "]" + vbCrLf
            Loop
            MsgBox (strOutput)
        End If
    End If
    '### get amount
    Dim dAmountDue As Double
    Dim dAmountVat As Double
    Dim strCurrency As String
    Dim strVatNumber As String
    Dim lPaymentPeriod As Long
    bStatus = generalInvoiceResponseEx.GetBalance(dAmountDue,dAmountVat,strCurrency,strVatNumber,lPaymentPeriod)
    strOutput = "amountDue=[" & dAmountDue & "]dAmountVat=[" & dAmountVat & "]strCurrency=[" & strCurrency &  _
                "]strVatNumber=[" & strVatNumber & "]lPaymentPeriod=[" & lPaymentPeriod & "]"

    MsgBox (strOutput)

End If

'### relase resources
Set generalInvoiceResponseEx = Nothing
Set generalInvoiceRequestManagerEx = Nothing

Exit Sub

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

'### relase resources
Set generalInvoiceResponseEx = Nothing
Set generalInvoiceRequestManagerEx = Nothing

End Sub


 General use of the generalInvoiceResponse ATL COM module

The generalInvoiceResponse provides all the necessary tools for loading and thereafter analyzing XML infosets of type generalInvoiceResponse_430. These infosets are responses to a previously sent invoices or reminders where the topmost object reference defines target request/response. The generalInvoiceResponse handles all roles and places.

The subchapter object reference provides an in-depth description of the concept of "object reference".

To get the results of such an infoset, firstly the XML file is loaded into the module by the IGeneralInvoiceResponseManager::LoadXML method. Upon successful analyzing the file the method returns a IGeneralInvoiceResponse interface. All response data and parameters of one invoice can be retrieved by the supplied interface methods as e.g. IGeneralInvoiceResponse:GetPatient,...

The IGeneralInvoiceResponseManager::Print method can be used to visualize the whole response content.

An auxiliary interface IAddress is available for getting the address related data in a structured way.

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


 How to generate PDF archive files of a invoice/reminder response

To generate PDF archive files of a invoice/reminder response in the generalInvoiceResponseManager use a special print object name (cf. Syntax of the printTemplate variable for an overview).

(PDF=PDF_file_to_generate;)
or
(PDF_NOPRINT=PDF_file_to_generate;)
is used as a print object name on the printTemplate variable of the Print method.

The "PDF" token means to print the response and generate the PDF files, whereas the "PDF_NOPRINT" token only generates the PDF file without physical printing.
This object definition is only used while printing and is ignored in the preview mode!

In its simplest form this means

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

     IGeneralInvoiceResponseManager::Print(bstrPrintTemplate,...);
in order to generate a PDF archive file of response.

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 must not exist
  • The directory where the PDF is stored must be writable


 Syntax of the printTemplate variable of the Print method

bstrPrintTemplate argument of the IGeneralInvoiceResponseManager::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) 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][(objectName1=text;...)][=printTemplateFile][#INIPATH=inipath]

where a [] pair defines an optional part. The commands are case insensitive.
  • logTpl: is the logical template name. Currently only logTpl=Detail is allowed.
  • 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 are enclosed in a () pair.

    There is a predefined pseudo print object with a special meaning:

    • PDF for generating PDF files

  • 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 files. 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
  • bstrPrintTemplate: (DOCUMENT_TITLE=Alternate title for the invoice;) prints a substituted title 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.


 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.

The description is made from the request point of view. But keep in mind that all defined object references of the request must be copied unaltered into the response.

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

A reimbursement process is a process always initiated directly or indirectly by the biller where the money flow is reversed that is the biller pays money to the insurance.

There are 2 situations where such an reimbursement process:

  • "direct" reimbursement: the biller generated a credit advice that is an invoice with negative quantities and amounts (but the storno process attribute=enNo!) With the credit advice the biller signals to the insurance that money for certain services must be paid back.
  • "indirect" reimbursement: the biller generated an normal invoice and some time later does cancel that invoice. To do so the invoice is resent but with the storno process attribute set (this will produce negative quantities and amounts as well but with the storno flag enabled)! If the insurance has already paid the invoice in question the reimbursement must be initiated.
In such a situation the response XML includes a creditor (=the initial biller), a debitor (=the insurance), the amount in question, and the appropriate ESR information. By using these information a "reverse-invoice" can be produced e.g. by the IGeneralInvoiceResponseManager::Print method.


 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 which is the mirrored transport@to attribute of the request

  • the URI attribute of the reference element must use a XPointer syntax of the payload element, e.g. <ds:Reference URI="#xpointer(/invoice:response/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 generalInvoiceResponse module does understand these boundary conditions. If the response XML is signed then the module extracts the X509Data element and transforms it to a binary DER format. Using the certificate the signature chain is checked. The IGeneralInvoiceResponse::GetTransport method returns a binary DER file named X509DER_from_EAN.cer. This is exactly the certificate to use for encrypting an invoice (or all other V4.3) request XML infosets!