 API browser of drugValidator100 COM module
Interface version: | 1.00
Interface date: | 22 Nov 2004

The drugValidator is an ATL COM module which provides methods to browse, to query, and to validate records against the SL drug catalog. |  | space
Interfaces |  | 2 interface
IDrugValidator | database handling and global settings |
IValidate | Validation of service records according to the rules |
Types |  |
type definitions | List of all used builtin, composite and enumeration types |
Important documents about the usage and handling |  |
Document | What to do in a 64bit environment - is there a 64bit Sumex1 COM dll? |
Document | Very important notice aubout the drug database and its price history - please read! |
Document | Notice about the "configuration parameters" in the drugValidator |
Document | General usage of the drugValidator100 COM module - an overview |
Document | drugValidatorServer100: Introduction, overview and usage of the Restful Webservice Server |

© by sumex1.net - all rights reserved


  • drugValidator100
  • IDrugValidator

IDrugValidator interface |  | V1.00/22 Nov 2004
The IDrugValidator interface handles connections to the drug database. It provides a means to open and close database connections, and set and retrieve general database parameters, such as the database or module versions. A connection to the database must be opened via IDrugValidator before methods from any of the other interfaces can be used. |  | space
space
Methods |  | 8 methods
Close | Closes the drug database. |
GetAbortInfo | Get the abort information. |
GetFirstTPValue | Retrieves the first tax point value information. |
GetNextTPValue | Retrieves the next tax point value information. |
GetTreatment | Get the treatment input data. |
Open | Opens the drug database. |
OpenEx | Opens the drug database. |
SetTreatment | Set the treatment input data. |
space
Properties |  | 17 properties
[get] CreateDrugValidator | Creates an instance of the main IDrugValidator interface |
[get] CreateValidate | Creates an instance of the IValidate interface |
[get/put] Date | Get and Set the current date for the drugValidator module |
[get] DBVersion | Get the version of the drugValidator database. |
[get] DBVersionDate | Get the version date of the drugValidator database. |
[get] DBVersionText | Get the textual version of the drugValidator database. |
[put] DestructDrugValidator | Destructs/invalidates a main instance of the IDrugValidator interface |
[put] DestructValidate | Destructs/invalidates this IValidate interface instance |
[get/put] EnableLog | Get and Set the log activity for the module |
[get/put] ExternalFactor | External scaling factor for the service. |
[get/put] Language | Get and Set the language for the drugValidator module |
[get] ModuleVersion | Get the version of the drugValidator module. |
[get] ModuleVersionText | Get the textual version of the drugValidator module. |
[get/put] PlaceType | Get and Set the place where the service is provided. |
[get/put] RoleType | Role type of the service provider. |
[get/put] WildCard | Get and Set the match-all wildcard character for SQL queries |
[get/put] WildCharacter | Get and Set the "match any single character" wildcard character for SQL queries |
space |


  • IDrugValidator
  • Close

IDrugValidator::Close method |  |  | space
Closes the drug database. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IDrugValidator/Close
[JSON input data] | pIDrugValidator: | longValue, //interface address
[JSON result data] | pbStatus: | booleanValue
[HTTP result status] | 200 | Return status 200 signals a successful method call |
 | 204 | Return status 204 (noContent) signals that the end of an iteration is reached |
 | >= 400 | Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do. |
space
C/C++ calling syntax |  |  |
HRESULT Close( | VARIANT_BOOL | *pbStatus); |
[C/C++ return value] | S_OK | This value is returned if the function call was successful. |
 | S_FALSE | This value is returned if the end of an iteration is reached |
 | E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |
space
Calling argument description |  |  |
[out,retval] VARIANT_BOOL | *pbStatus | Boolean return status |
space |


  • IDrugValidator
  • GetAbortInfo

IDrugValidator::GetAbortInfo method |  |  | space
Get the abort information. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IDrugValidator/GetAbortInfo
[JSON input data] | pIDrugValidator: | longValue, //interface address
[JSON result data] | pbstrAbort: pbStatus: | "utf8StringValue", booleanValue
[HTTP result status] | 200 | Return status 200 signals a successful method call |
 | 204 | Return status 204 (noContent) signals that the end of an iteration is reached |
 | >= 400 | Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do. |
space
C/C++ calling syntax |  |  |
HRESULT GetAbortInfo( | BSTR VARIANT_BOOL | *pbstrAbort, *pbStatus); |
[C/C++ return value] | S_OK | This value is returned if the function call was successful. |
 | S_FALSE | This value is returned if the end of an iteration is reached |
 | E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |
space
Calling argument description |  |  |
[out] BSTR | *pbstrAbort | Abort error information string |
[out,retval] VARIANT_BOOL | *pbStatus | Boolean return status |
space |


  • IDrugValidator
  • GetFirstTPValue

IDrugValidator::GetFirstTPValue method |  |  | space
Retrieves the first tax point value information. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IDrugValidator/GetFirstTPValue
[JSON input data] | pIDrugValidator: | longValue, //interface address
[JSON result data] | pdTPValue: pdValidFrom: pdValidTo: pbStatus: | doubleValue, "stringISODateValue", "stringISODateValue", booleanValue
[HTTP result status] | 200 | Return status 200 signals a successful method call |
 | 204 | Return status 204 (noContent) signals that the end of an iteration is reached |
 | >= 400 | Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do. |
space
C/C++ calling syntax |  |  |
HRESULT GetFirstTPValue( | double DATE DATE VARIANT_BOOL | *pdTPValue, *pdValidFrom, *pdValidTo, *pbStatus); |
[C/C++ return value] | S_OK | This value is returned if the function call was successful. |
 | S_FALSE | This value is returned if the end of an iteration is reached |
 | E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |
space
Calling argument description |  |  |
[out] double | *pdTPValue | Tax point value |
[out] DATE | *pdValidFrom | Validity start date |
[out] DATE | *pdValidTo | Validity end date |
[out,retval] VARIANT_BOOL | *pbStatus | Boolean return status |
space |


  • IDrugValidator
  • GetNextTPValue

IDrugValidator::GetNextTPValue method |  |  | space
Retrieves the next tax point value information. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IDrugValidator/GetNextTPValue
[JSON input data] | pIDrugValidator: | longValue, //interface address
[JSON result data] | pdTPValue: pdValidFrom: pdValidTo: pbStatus: | doubleValue, "stringISODateValue", "stringISODateValue", booleanValue
[HTTP result status] | 200 | Return status 200 signals a successful method call |
 | 204 | Return status 204 (noContent) signals that the end of an iteration is reached |
 | >= 400 | Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do. |
space
C/C++ calling syntax |  |  |
HRESULT GetNextTPValue( | double DATE DATE VARIANT_BOOL | *pdTPValue, *pdValidFrom, *pdValidTo, *pbStatus); |
[C/C++ return value] | S_OK | This value is returned if the function call was successful. |
 | S_FALSE | This value is returned if the end of an iteration is reached |
 | E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |
space
Calling argument description |  |  |
[out] double | *pdTPValue | Tax point value |
[out] DATE | *pdValidFrom | Validity start date |
[out] DATE | *pdValidTo | Validity end date |
[out,retval] VARIANT_BOOL | *pbStatus | Boolean return status |
space |


  • IDrugValidator
  • GetTreatment

IDrugValidator::GetTreatment method |  |  | space
Get the treatment input data. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IDrugValidator/GetTreatment
[JSON input data] | pIDrugValidator: | longValue, //interface address
[JSON result data] | peCanton: peLaw: peSettlement: pbStatus: | longValue, longValue, longValue, booleanValue
[HTTP result status] | 200 | Return status 200 signals a successful method call |
 | 204 | Return status 204 (noContent) signals that the end of an iteration is reached |
 | >= 400 | Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do. |
space
C/C++ calling syntax |  |  |
HRESULT GetTreatment( | CantonType LawType SettlementType VARIANT_BOOL | *peCanton, *peLaw, *peSettlement, *pbStatus); |
[C/C++ return value] | S_OK | This value is returned if the function call was successful. |
 | S_FALSE | This value is returned if the end of an iteration is reached |
 | E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |
space
Calling argument description |  |  |
[out] CantonType | *peCanton | Used Canton |
[out] LawType | *peLaw | Used Law |
[out] SettlementType | *peSettlement | Used Settlement |
[out,retval] VARIANT_BOOL | *pbStatus | Boolean return status |
space |


  • IDrugValidator
  • Open

IDrugValidator::Open method |  |  | space
Opens the drug database. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IDrugValidator/Open
[JSON input data] | pIDrugValidator: eLanguage: | longValue, //interface address longValue
[JSON result data] | pbStatus: | booleanValue
[HTTP result status] | 200 | Return status 200 signals a successful method call |
 | 204 | Return status 204 (noContent) signals that the end of an iteration is reached |
 | >= 400 | Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do. |
space
C/C++ calling syntax |  |  |
HRESULT Open( | LanguageType VARIANT_BOOL | eLanguage, *pbStatus); |
[C/C++ return value] | S_OK | This value is returned if the function call was successful. |
 | S_FALSE | This value is returned if the end of an iteration is reached |
 | E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |
space
Calling argument description |  |  |
[in] LanguageType | eLanguage | Language that is used for error messages |
[out,retval] VARIANT_BOOL | *pbStatus | Boolean return status |
space |


  • IDrugValidator
  • OpenEx

IDrugValidator::OpenEx method |  |  | space
Opens the drug database. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IDrugValidator/OpenEx
[JSON input data] | pIDrugValidator: bstrConnect: | longValue, //interface address "utf8StringValue"
[JSON result data] | pbStatus: | booleanValue
[HTTP result status] | 200 | Return status 200 signals a successful method call |
 | 204 | Return status 204 (noContent) signals that the end of an iteration is reached |
 | >= 400 | Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do. |
space
C/C++ calling syntax |  |  |
HRESULT OpenEx( | BSTR VARIANT_BOOL | bstrConnect, *pbStatus); |
[C/C++ return value] | S_OK | This value is returned if the function call was successful. |
 | S_FALSE | This value is returned if the end of an iteration is reached |
 | E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |
space
Calling argument description |  |  |
[in] BSTR | bstrConnect | Connect string for the database. See the Open method for the ADO Connection object for a detailed description. |
[out,retval] VARIANT_BOOL | *pbStatus | Boolean return status |
space |


  • IDrugValidator
  • SetTreatment

IDrugValidator::SetTreatment method |  |  | space
Set the treatment input data. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IDrugValidator/SetTreatment
[JSON input data] | pIDrugValidator: eCanton: eLaw: eSettlement: | longValue, //interface address longValue, longValue, longValue
[JSON result data] | pbStatus: | booleanValue
[HTTP result status] | 200 | Return status 200 signals a successful method call |
 | 204 | Return status 204 (noContent) signals that the end of an iteration is reached |
 | >= 400 | Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do. |
space
C/C++ calling syntax |  |  |
HRESULT SetTreatment( | CantonType LawType SettlementType VARIANT_BOOL | eCanton, eLaw, eSettlement, *pbStatus); |
[C/C++ return value] | S_OK | This value is returned if the function call was successful. |
 | S_FALSE | This value is returned if the end of an iteration is reached |
 | E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |
space
Calling argument description |  |  |
[in] CantonType | eCanton | Canton where treatment is taking place |
[in] LawType | eLaw | Law that is applicable for the treatment |
[in] SettlementType | eSettlement | Settlement type that is used for the treatment |
[out,retval] VARIANT_BOOL | *pbStatus | Boolean return status |
space |


  • IDrugValidator
  • CreateDrugValidator

IDrugValidator::CreateDrugValidator property |  |  | space
This property has a Restful Webservice representation only! Creates an instance of the main IDrugValidator interface. To delete/invalidate this interface instance, the counterpart property PutDestructDrugValidator must be explicitly called, since the pIDrugValidator address has a global scope and is not automatically destructed. |  |  |
space
Restful webservice calling syntax |  |  |
[GET] | /baseURL/ IDrugValidator/GetCreateDrugValidator
[JSON result data] | pIDrugValidator: | longValue //interface address
[HTTP result status] | 200 | Return status 200 signals a successful method call |
 | 204 | Return status 204 (noContent) signals that the end of an iteration is reached |
 | >= 400 | Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do. |
space
Remarks |  |  |
This property has a Restful Webservice representation only! |  |  |
space |


  • IDrugValidator
  • CreateValidate

IDrugValidator::CreateValidate property | space
Creates an instance of the IValidate interface

Please note, that under the Restful Webservice paradigma this interface instance must be deleted/invalidated explicitly by the counterpart property IDrugValidator::PutDestructValidate (or alternatively IValidate::PutDestructValidate) must be explicitly called, since the pIValidate address has a global scope and is not automatically destructed.
space
Restful webservice calling syntax
[GET] | /baseURL/ IDrugValidator/GetCreateValidate?param
[param] pIDrugValidator= longValue
[JSON result data] pIValidate: longValue //interface address
[HTTP result status] | 200 | Return status 200 signals a successful method call
204 | Return status 204 (noContent) signals that the end of an iteration is reached
>= 400 | Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do.
space
C/C++ calling syntax
[get] HRESULT | CreateValidate( IValidate **peCreateValidate );
[C/C++ return value] | S_OK | This value is returned if the function call was successful.
S_FALSE | This value is returned if the end of an iteration is reached
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions.
space
Calling argument description
[out,retval] IValidate | **peCreateValidate
space
Remarks
If SmartPointers are used than the function names and calls are rewritten by Microsoft into the form
  • IValidate **GetCreateValidate(void);
space


  • IDrugValidator
  • Date

IDrugValidator::Date property | space
Get and Set the current date for the drugValidator module. This date will be used for each method where no explicit date must be specified, for example the SearchCode method in the ISearch interface. The default is the current date.
space
Restful webservice calling syntax
[GET] | /baseURL/ IDrugValidator/GetDate?param
[param] pIDrugValidator= longValue
[JSON result data] pdDate: "stringISODateValue"
[PUT] | /baseURL/ IDrugValidator/PutDate
[JSON input data] pIDrugValidator:
dDate: 		longValue, //interface address
variantDateValue | "stringISODateValue"
[HTTP result status] | 200 | Return status 200 signals a successful method call
204 | Return status 204 (noContent) signals that the end of an iteration is reached
>= 400 | Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do.
space
C/C++ calling syntax
[get] HRESULT | Date( DATE *pdDate );
[put] HRESULT | Date( DATE dDate );
[C/C++ return value] | S_OK | This value is returned if the function call was successful.
S_FALSE | This value is returned if the end of an iteration is reached
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions.
space
Calling argument description
[out,retval] DATE | *pdDate
[in] DATE | dDate
space
Remarks
If SmartPointers are used than the function names and calls are rewritten by Microsoft into the form
  • DATE *GetDate(void);
  • void PutDate( DATE dDate);
space


  • IDrugValidator
  • DBVersion

IDrugValidator::DBVersion property | space
Get the version of the drugValidator database.
space
Restful webservice calling syntax
[GET] | /baseURL/ IDrugValidator/GetDBVersion?param
[param] pIDrugValidator= longValue
[JSON result data] pbstrDBVersion: "utf8StringValue"
[HTTP result status] | 200 | Return status 200 signals a successful method call
204 | Return status 204 (noContent) signals that the end of an iteration is reached
>= 400 | Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do.
space
C/C++ calling syntax
[get] HRESULT | DBVersion( BSTR *pbstrDBVersion );
[C/C++ return value] | S_OK | This value is returned if the function call was successful.
S_FALSE | This value is returned if the end of an iteration is reached
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions.
space
Calling argument description
[out,retval] BSTR | *pbstrDBVersion
space
Remarks
If SmartPointers are used than the function names and calls are rewritten by Microsoft into the form
  • BSTR *GetDBVersion(void);
space


  • IDrugValidator
  • DBVersionDate

IDrugValidator::DBVersionDate property | space
Get the version date of the drugValidator database.
space
Restful webservice calling syntax
[GET] | /baseURL/ IDrugValidator/GetDBVersionDate?param
[param] pIDrugValidator= longValue
[JSON result data] pdDBVersionDate: "stringISODateValue"
[HTTP result status] | 200 | Return status 200 signals a successful method call
204 | Return status 204 (noContent) signals that the end of an iteration is reached
>= 400 | Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do.
space
C/C++ calling syntax
[get] HRESULT | DBVersionDate( DATE *pdDBVersionDate );
[C/C++ return value] | S_OK | This value is returned if the function call was successful.
S_FALSE | This value is returned if the end of an iteration is reached
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions.
space
Calling argument description
[out,retval] DATE | *pdDBVersionDate
space
Remarks
If SmartPointers are used than the function names and calls are rewritten by Microsoft into the form
  • DATE *GetDBVersionDate(void);
space


  • IDrugValidator
  • DBVersionText

IDrugValidator::DBVersionText property | space
Get the textual version of the drugValidator database.
space
Restful webservice calling syntax
[GET] | /baseURL/ IDrugValidator/GetDBVersionText?param
[param] pIDrugValidator= longValue
[JSON result data] pbstrDBVersionText: "utf8StringValue"
[HTTP result status] | 200 | Return status 200 signals a successful method call
204 | Return status 204 (noContent) signals that the end of an iteration is reached
>= 400 | Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do.
space
C/C++ calling syntax
[get] HRESULT | DBVersionText( BSTR *pbstrDBVersionText );
[C/C++ return value] | S_OK | This value is returned if the function call was successful.
S_FALSE | This value is returned if the end of an iteration is reached
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions.
space
Calling argument description
[out,retval] BSTR | *pbstrDBVersionText
space
Remarks
If SmartPointers are used than the function names and calls are rewritten by Microsoft into the form
  • BSTR *GetDBVersionText(void);
space


  • IDrugValidator
  • DestructDrugValidator

IDrugValidator::DestructDrugValidator property |  |  | space
This property has a Restful Webservice representation only! Destructs/invalidates a main instance of the IDrugValidator interface. Please note, that all dependent, active interface instances generated with IDrugValidator::GetCreateValidate under this main instances, are automatically destructed as well. The counterpart property to generate a main interface instance is IDrugValidator::GetCreateDrugValidator. |  |  |
space
Restful webservice calling syntax |  |  |
[PUT] | /baseURL/ IDrugValidator/PutDestructDrugValidator
[JSON input data] | pIDrugValidator: | longValue, //interface address
[HTTP result status] | 200 | Return status 200 signals a successful method call |
 | 204 | Return status 204 (noContent) signals that the end of an iteration is reached |
 | >= 400 | Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do. |
space
Remarks |  |  |
This property has a Restful Webservice representation only! |  |  |
space |


  • IDrugValidator
  • DestructValidate

IDrugValidator::DestructValidate property |  |  | space
This property has a Restful Webservice representation only! Destructs/invalidates this IValidate interface instance. The counterpart property to generate an IValidate interface instance is IDrugValidator::GetCreateValidate. |  |  |
space
Restful webservice calling syntax |  |  |
[PUT] | /baseURL/ IDrugValidator/PutDestructValidate
[JSON input data] | pIDrugValidator: pIValidate: | longValue, //interface address longValue, //interface address
[HTTP result status] | 200 | Return status 200 signals a successful method call |
 | 204 | Return status 204 (noContent) signals that the end of an iteration is reached |
 | >= 400 | Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do. |
space
Remarks |  |  |
This property has a Restful Webservice representation only! |  |  |
space |


  • IDrugValidator
  • EnableLog

IDrugValidator::EnableLog property | space
Get and Set the log activity for the module. The default log activity is enYes.
space
Restful webservice calling syntax
[GET] | /baseURL/ IDrugValidator/GetEnableLog?param
[param] pIDrugValidator= longValue
[JSON result data] peEnableLog: longValue
[PUT] | /baseURL/ IDrugValidator/PutEnableLog
[JSON input data] pIDrugValidator:
eEnableLog: 		longValue, //interface address
longValue
[HTTP result status] | 200 | Return status 200 signals a successful method call
204 | Return status 204 (noContent) signals that the end of an iteration is reached
>= 400 | Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do.
space
C/C++ calling syntax
[get] HRESULT | EnableLog( YesNoType *peEnableLog );
[put] HRESULT | EnableLog( YesNoType eEnableLog );
[C/C++ return value] | S_OK | This value is returned if the function call was successful.
S_FALSE | This value is returned if the end of an iteration is reached
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions.
space
Calling argument description
[out,retval] YesNoType | *peEnableLog
[in] YesNoType | eEnableLog
space
Remarks
If SmartPointers are used than the function names and calls are rewritten by Microsoft into the form
  • YesNoType *GetEnableLog(void);
  • void PutEnableLog( YesNoType lEnableLog);
space


  • IDrugValidator
  • ExternalFactor

IDrugValidator::ExternalFactor property | space
External scaling factor for the service.
space
Restful webservice calling syntax
[GET] | /baseURL/ IDrugValidator/GetExternalFactor?param
[param] pIDrugValidator= longValue
[JSON result data] pdExternalFactor: doubleValue
[PUT] | /baseURL/ IDrugValidator/PutExternalFactor
[JSON input data] pIDrugValidator:
dExternalFactor: 		longValue, //interface address
doubleValue
[HTTP result status] | 200 | Return status 200 signals a successful method call
204 | Return status 204 (noContent) signals that the end of an iteration is reached
>= 400 | Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do.
space
C/C++ calling syntax
[get] HRESULT | ExternalFactor( double *pdExternalFactor );
[put] HRESULT | ExternalFactor( double dExternalFactor );
[C/C++ return value] | S_OK | This value is returned if the function call was successful.
S_FALSE | This value is returned if the end of an iteration is reached
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions.
space
Calling argument description
[out,retval] double | *pdExternalFactor
[in] double | dExternalFactor
space
Remarks
If SmartPointers are used than the function names and calls are rewritten by Microsoft into the form
  • double *GetExternalFactor(void);
  • void PutExternalFactor( double dExternalFactor);
space


  • IDrugValidator
  • Language

IDrugValidator::Language property | space
Get and Set the language for the drugValidator module. The default language is enGerman.
space
Restful webservice calling syntax
[GET] | /baseURL/ IDrugValidator/GetLanguage?param
[param] pIDrugValidator= longValue
[JSON result data] peLanguage: longValue
[PUT] | /baseURL/ IDrugValidator/PutLanguage
[JSON input data] pIDrugValidator:
eLanguage: 		longValue, //interface address
longValue
[HTTP result status] | 200 | Return status 200 signals a successful method call
204 | Return status 204 (noContent) signals that the end of an iteration is reached
>= 400 | Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do.
space
C/C++ calling syntax
[get] HRESULT | Language( LanguageType *peLanguage );
[put] HRESULT | Language( LanguageType eLanguage );
[C/C++ return value] | S_OK | This value is returned if the function call was successful.
S_FALSE | This value is returned if the end of an iteration is reached
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions.
space
Calling argument description
[out,retval] LanguageType | *peLanguage
[in] LanguageType | eLanguage
space
Remarks
If SmartPointers are used than the function names and calls are rewritten by Microsoft into the form
  • LanguageType *GetLanguage(void);
  • void PutLanguage( LanguageType lLanguage);
space


  • IDrugValidator
  • ModuleVersion

IDrugValidator::ModuleVersion property | space
Get the version of the drugValidator module.
space
Restful webservice calling syntax
[GET] | /baseURL/ IDrugValidator/GetModuleVersion?param
[param] pIDrugValidator= longValue
[JSON result data] pbstrModuleVersion: "utf8StringValue"
[HTTP result status] | 200 | Return status 200 signals a successful method call
204 | Return status 204 (noContent) signals that the end of an iteration is reached
>= 400 | Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do.
space
C/C++ calling syntax
[get] HRESULT | ModuleVersion( BSTR *pbstrModuleVersion );
[C/C++ return value] | S_OK | This value is returned if the function call was successful.
S_FALSE | This value is returned if the end of an iteration is reached
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions.
space
Calling argument description
[out,retval] BSTR | *pbstrModuleVersion
space
Remarks
If SmartPointers are used than the function names and calls are rewritten by Microsoft into the form
  • BSTR *GetModuleVersion(void);
space


  • IDrugValidator
  • ModuleVersionText

IDrugValidator::ModuleVersionText property | space
Get the textual version of the drugValidator module.
space
Restful webservice calling syntax
[GET] | /baseURL/ IDrugValidator/GetModuleVersionText?param
[param] pIDrugValidator= longValue
[JSON result data] pbstrModuleVersionText: "utf8StringValue"
[HTTP result status] | 200 | Return status 200 signals a successful method call
204 | Return status 204 (noContent) signals that the end of an iteration is reached
>= 400 | Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do.
space
C/C++ calling syntax
[get] HRESULT | ModuleVersionText( BSTR *pbstrModuleVersionText );
[C/C++ return value] | S_OK | This value is returned if the function call was successful.
S_FALSE | This value is returned if the end of an iteration is reached
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions.
space
Calling argument description
[out,retval] BSTR | *pbstrModuleVersionText
space
Remarks
If SmartPointers are used than the function names and calls are rewritten by Microsoft into the form
  • BSTR *GetModuleVersionText(void);
space


  • IDrugValidator
  • PlaceType

IDrugValidator::PlaceType property | space
Get and Set the place where the service is provided.
space
Restful webservice calling syntax
[GET] | /baseURL/ IDrugValidator/GetPlaceType?param
[param] pIDrugValidator= longValue
[JSON result data] pePlaceType: longValue
[PUT] | /baseURL/ IDrugValidator/PutPlaceType
[JSON input data] pIDrugValidator:
ePlaceType: 		longValue, //interface address
longValue
[HTTP result status] | 200 | Return status 200 signals a successful method call
204 | Return status 204 (noContent) signals that the end of an iteration is reached
>= 400 | Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do.
space
C/C++ calling syntax
[get] HRESULT | PlaceType( PlaceType *pePlaceType );
[put] HRESULT | PlaceType( PlaceType ePlaceType );
[C/C++ return value] | S_OK | This value is returned if the function call was successful.
S_FALSE | This value is returned if the end of an iteration is reached
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions.
space
Calling argument description
[out,retval] PlaceType | *pePlaceType
[in] PlaceType | ePlaceType
space
Remarks
If SmartPointers are used than the function names and calls are rewritten by Microsoft into the form
  • PlaceType *GetPlaceType(void);
  • void PutPlaceType( PlaceType lPlaceType);
space


  • IDrugValidator
  • RoleType

IDrugValidator::RoleType property | space
Role type of the service provider.
space
Restful webservice calling syntax
[GET] | /baseURL/ IDrugValidator/GetRoleType?param
[param] pIDrugValidator= longValue
[JSON result data] peRoleType: longValue
[PUT] | /baseURL/ IDrugValidator/PutRoleType
[JSON input data] pIDrugValidator:
eRoleType: 		longValue, //interface address
longValue
[HTTP result status] | 200 | Return status 200 signals a successful method call
204 | Return status 204 (noContent) signals that the end of an iteration is reached
>= 400 | Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do.
space
C/C++ calling syntax
[get] HRESULT | RoleType( RoleType *peRoleType );
[put] HRESULT | RoleType( RoleType eRoleType );
[C/C++ return value] | S_OK | This value is returned if the function call was successful.
S_FALSE | This value is returned if the end of an iteration is reached
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions.
space
Calling argument description
[out,retval] RoleType | *peRoleType
[in] RoleType | eRoleType
space
Remarks
If SmartPointers are used than the function names and calls are rewritten by Microsoft into the form
  • RoleType *GetRoleType(void);
  • void PutRoleType( RoleType lRoleType);
space


  • IDrugValidator
  • WildCard

IDrugValidator::WildCard property | space
Get and Set the match-all wildcard character for SQL queries. You can use this property if you have imported the original drug database into another database, which uses a different wildcard character for queries. The default match-all wildcard character is the percent symbol (%). With the drugValidator Module you can always formulate a query using the asterisk symbol (*) as a wildcard, as in each query string a * is replaced by the wildcard character specified by this property before being executed.
space
Restful webservice calling syntax
[GET] | /baseURL/ IDrugValidator/GetWildCard?param
[param] pIDrugValidator= longValue
[JSON result data] pbstrWildCard: "utf8StringValue"
[PUT] | /baseURL/ IDrugValidator/PutWildCard
[JSON input data] pIDrugValidator:
bstrWildCard: 		longValue, //interface address
"utf8StringValue"
[HTTP result status] | 200 | Return status 200 signals a successful method call
204 | Return status 204 (noContent) signals that the end of an iteration is reached
>= 400 | Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do.
space
C/C++ calling syntax
[get] HRESULT | WildCard( BSTR *pbstrWildCard );
[put] HRESULT | WildCard( BSTR bstrWildCard );
[C/C++ return value] | S_OK | This value is returned if the function call was successful.
S_FALSE | This value is returned if the end of an iteration is reached
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions.
space
Calling argument description
[out,retval] BSTR | *pbstrWildCard
[in] BSTR | bstrWildCard
space
Remarks
If SmartPointers are used than the function names and calls are rewritten by Microsoft into the form
  • BSTR *GetWildCard(void);
  • void PutWildCard( BSTR bstrWildCard);
space


  • IDrugValidator
  • WildCharacter

IDrugValidator::WildCharacter property | space
Get and Set the "match any single character" wildcard character for SQL queries. You can use this property if you have ported the original drug database into another database, which uses a different wild character for the queries. The default match-single-character wildcard character is the underscore symbol (_). With the drugValidator Module you can always formulate a query using the question mark (?) as a wildcard, as in each query string a ? is replaced by the wildcard character specified by this property before execution.
space
Restful webservice calling syntax
[GET] | /baseURL/ IDrugValidator/GetWildCharacter?param
[param] pIDrugValidator= longValue
[JSON result data] pbstrWildCharacter: "utf8StringValue"
[PUT] | /baseURL/ IDrugValidator/PutWildCharacter
[JSON input data] pIDrugValidator:
bstrWildCharacter: 		longValue, //interface address
"utf8StringValue"
[HTTP result status] | 200 | Return status 200 signals a successful method call
204 | Return status 204 (noContent) signals that the end of an iteration is reached
>= 400 | Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do.
space
C/C++ calling syntax
[get] HRESULT | WildCharacter( BSTR *pbstrWildCharacter );
[put] HRESULT | WildCharacter( BSTR bstrWildCharacter );
[C/C++ return value] | S_OK | This value is returned if the function call was successful.
S_FALSE | This value is returned if the end of an iteration is reached
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions.
space
Calling argument description
[out,retval] BSTR | *pbstrWildCharacter
[in] BSTR | bstrWildCharacter
space
Remarks
If SmartPointers are used than the function names and calls are rewritten by Microsoft into the form
  • BSTR *GetWildCharacter(void);
  • void PutWildCharacter( BSTR bstrWildCharacter);
space


  • IValidate

IValidate interface |  | V1.00/22 Nov 2004
The IValidate interface checks whether supplied service data conform to the drug rules. In case of a conflict with another service, the service will be rejected. Textual information explaining why the code was rejected can be retrieved, in order to provide appropriate feedback to the user. |  | space
space
Methods |  | 9 methods
AddService | Adds a new service which will be validated |
CalculateSum | Calculate the sum of all services which have been added through the AddService method. |
GetAbortInfo | Get the information indicating why the service could not be added. |
GetService | Method for collecting all data of the currently focused service in one call without the necessity to call the appropriate properties of this interface |
Initialize | Initializes the validation, clears all the entered records. |
MoveFirst | Positions the record pointer at the first record in the result record set |
MoveLast | Positions the record pointer at the last record in the result record set |
MoveNext | Positions the record pointer at the next record in the result record set |
MovePrevious | Positions the record pointer at the previous record in the result record set |
space
Properties |  | 10 properties
[get] Charge | The charge for the service in CHF. |
[get] Code | Service code. |
[get] Date | Date of the service. |
[put] DestructValidate | Destructs/invalidates this IValidate interface instance |
[get] Hook | The hook of the service (external ID). |
[get] ID | The internal ID of the service. |
[get] IgnoreValidate | Flag indicating whether the validation was ignored. |
[get] Quantity | Quantity. |
[get] TP | Tax points of the service. |
[get] TPValue | Tax point value of the service. |
space |


  • IValidate
  • AddService

IValidate::AddService method | space
Adds a new service which will be validated. If the code passes the validation a true value is returned. If the code was not accepted a value of false is returned and the variable plStatus contains the error code.

The acceptable code types are:
  • a pharma code with a length of 7, zero padded to the left
  • s Swissmedic code with a length of 8, zero padded to the left
  • a swiss EAN13 barcode with a length of 13, beginning with 76
  • a swiss EAN14 barcode with a length of 14, beginning with 76

Please note that if the length is not one of the above than a pharma code is assumed.
space
Restful webservice calling syntax
[POST] | /baseURL/ IValidate/AddService
[JSON input data] pIValidate:
bstrCode:
dQuantity:
dTP:
dTPValue:
dDate:
eIgnoreValidate:
lHook: 		longValue, //interface address
"utf8StringValue",
doubleValue,
doubleValue,
doubleValue,
variantDateValue | "stringISODateValue",
longValue,
longValue
[JSON result data] plStatus:
pbStatus: 		longValue,
booleanValue
[HTTP result status] | 200 | Return status 200 signals a successful method call
204 | Return status 204 (noContent) signals that the end of an iteration is reached
>= 400 | Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do.
space
C/C++ calling syntax
HRESULT AddService( long
BSTR
double
double
double
DATE
YesNoType
long
VARIANT_BOOL 		*plStatus,
bstrCode,
dQuantity,
dTP,
dTPValue,
dDate,
eIgnoreValidate,
lHook,
*pbStatus);
[C/C++ return value] | S_OK | This value is returned if the function call was successful.
S_FALSE | This value is returned if the end of an iteration is reached
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions.
space
Calling argument description
[out] long | *plStatus | A zero value is returned for success. A positive value indicates that a validation rule was not fulfilled, use the GetAbortInfo to get a description string and display an error message. A negative value indicates that the service was not added (see the AbortValidate Enumeration for possible codes). With the GetAbortInfo one can get a description, however preferable the required actions will be performed in the background.
[in] BSTR | bstrCode | Code of the service. The code can either be a pharmaCode (length=7,zero padded on the left), swissmedicCode (length=8,zero padded on the left), a swiss EAN13 barcode (length=13,beginning with 76), or a swiss EAN14 barcode (length=14,beginning with 76) of the drug.
[in] double | dQuantity | Quantity of the service
[in] double dTP Tax point TP of the service.
A zero value means that the TP is auto-expanded using the drug catalog.
[in] double dTPValue Tax point value of the service.
A zero value will be substituted by a TPValue = 1
[in] DATE | dDate | Date of the service
[in] YesNoType | eIgnoreValidate | Flag indicating whether the validation was ignored.In the following situations this flag might be useful. The user wants to add the service even if the validation failed, perhaps he has a special agreement with the insurance or patient. When adding new services to already previously checked records, it is not necessary to check the existing records again.
[in] long lHook External hook ID

The external software can provide a unique recordID for each supplied service. This hook can be used to identify the service later on.

[out,retval] VARIANT_BOOL | *pbStatus | Boolean return status
space


  • IValidate
  • CalculateSum

IValidate::CalculateSum method |  |  | space
Calculate the sum of all services which have been added through the AddService method. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IValidate/CalculateSum
[JSON input data] | pIValidate: | longValue, //interface address
[JSON result data] | pdTotal: pbStatus: | doubleValue, booleanValue
[HTTP result status] | 200 | Return status 200 signals a successful method call |
 | 204 | Return status 204 (noContent) signals that the end of an iteration is reached |
 | >= 400 | Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do. |
space
C/C++ calling syntax |  |  |
HRESULT CalculateSum( | double VARIANT_BOOL | *pdTotal, *pbStatus); |
[C/C++ return value] | S_OK | This value is returned if the function call was successful. |
 | S_FALSE | This value is returned if the end of an iteration is reached |
 | E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |
space
Calling argument description |  |  |
[out] double | *pdTotal | Total amount |
[out,retval] VARIANT_BOOL | *pbStatus | Boolean return status |
space |


  • IValidate
  • GetAbortInfo

IValidate::GetAbortInfo method |  |  | space
Get the information indicating why the service could not be added. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IValidate/GetAbortInfo
[JSON input data] | pIValidate: | longValue, //interface address
[JSON result data] | pbstrAbort: pbStatus: | "utf8StringValue", booleanValue
[HTTP result status] | 200 | Return status 200 signals a successful method call |
 | 204 | Return status 204 (noContent) signals that the end of an iteration is reached |
 | >= 400 | Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do. |
space
C/C++ calling syntax |  |  |
HRESULT GetAbortInfo( | BSTR VARIANT_BOOL | *pbstrAbort, *pbStatus); |
[C/C++ return value] | S_OK | This value is returned if the function call was successful. |
 | S_FALSE | This value is returned if the end of an iteration is reached |
 | E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |
space
Calling argument description |  |  |
[out] BSTR | *pbstrAbort | Abort error information string |
[out,retval] VARIANT_BOOL | *pbStatus | Boolean return status |
space |


  • IValidate
  • GetService

IValidate::GetService method |  |  | space
This property has a Restful Webservice representation only! Method for collecting all data of the currently focused service in one call without the necessity to call the appropriate properties of this interface. The counterpart method to add services is IDrugValidator::AddService |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IValidate/GetService
[JSON input data] | pIValidate: | longValue, //interface address
[JSON result data] | plID: pbstrCode: pdQuantity: pdTP: pdTPValue: pdDate: peIgnoreValidate: plHook: pdCharge: pbStatus: | longValue, "utf8StringValue", doubleValue, doubleValue, doubleValue, "stringISODateValue", longValue, longValue, doubleValue, booleanValue
[HTTP result status] | 200 | Return status 200 signals a successful method call |
 | 204 | Return status 204 (noContent) signals that the end of an iteration is reached |
 | >= 400 | Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do. |
space
Calling argument description |  |  |
[out] long | *plID | The internal ID of the currently focused service |
[out] BSTR | *pbstrCode | The code of the currently focused service |
[out] double | *pdQuantity | The quantity of the currently focused service |
[out] double | *pdTP | The tax point (TP) of the currently focused service |
[out] double | *pdTPValue | The tax point value (TPV) of the currently focused service |
[out] DATE | *pdDate | The treatment date of the currently focused service |
[out] YesNoType | *peIgnoreValidate | The flag indicating whether the currently focused service was ignored in validation (enNo) or not (enYes). |
[out] long | *plHook | The hook of the currently focused service |
[out] double | *pdCharge | The charge in CHF of the currently focused service calculated as: charge = quantity * TP * TPV |
[out,retval] VARIANT_BOOL | *pbStatus | Boolean return status |
space |


  • IValidate
  • Initialize

IValidate::Initialize method |  |  | space
Initializes the validation, clears all the entered records. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IValidate/Initialize
[JSON input data] | pIValidate: | longValue, //interface address
[JSON result data] | pbStatus: | booleanValue
[HTTP result status] | 200 | Return status 200 signals a successful method call |
 | 204 | Return status 204 (noContent) signals that the end of an iteration is reached |
 | >= 400 | Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do. |
space
C/C++ calling syntax |  |  |
HRESULT Initialize( | VARIANT_BOOL | *pbStatus); |
[C/C++ return value] | S_OK | This value is returned if the function call was successful. |
 | S_FALSE | This value is returned if the end of an iteration is reached |
 | E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |
space
Calling argument description |  |  |
[out,retval] VARIANT_BOOL | *pbStatus | Boolean return status |
space |


  • IValidate
  • MoveFirst

IValidate::MoveFirst method |  |  | space
Positions the record pointer at the first record in the result record set. If the action could not be performed false will be returned. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IValidate/MoveFirst
[JSON input data] | pIValidate: | longValue, //interface address
[JSON result data] | pbStatus: | booleanValue
[HTTP result status] | 200 | Return status 200 signals a successful method call |
 | 204 | Return status 204 (noContent) signals that the end of an iteration is reached |
 | >= 400 | Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do. |
space
C/C++ calling syntax |  |  |
HRESULT MoveFirst( | VARIANT_BOOL | *pbStatus); |
[C/C++ return value] | S_OK | This value is returned if the function call was successful. |
 | S_FALSE | This value is returned if the end of an iteration is reached |
 | E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |
space
Calling argument description |  |  |
[out,retval] VARIANT_BOOL | *pbStatus | Boolean return status |
space |


  • IValidate
  • MoveLast

IValidate::MoveLast method |  |  | space
Positions the record pointer at the last record in the result record set. If the action could not be performed false will be returned. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IValidate/MoveLast
[JSON input data] | pIValidate: | longValue, //interface address
[JSON result data] | pbStatus: | booleanValue
[HTTP result status] | 200 | Return status 200 signals a successful method call |
 | 204 | Return status 204 (noContent) signals that the end of an iteration is reached |
 | >= 400 | Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do. |
space
C/C++ calling syntax |  |  |
HRESULT MoveLast( | VARIANT_BOOL | *pbStatus); |
[C/C++ return value] | S_OK | This value is returned if the function call was successful. |
 | S_FALSE | This value is returned if the end of an iteration is reached |
 | E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |
space
Calling argument description |  |  |
[out,retval] VARIANT_BOOL | *pbStatus | Boolean return status |
space |


  • IValidate
  • MoveNext

IValidate::MoveNext method |  |  | space
Positions the record pointer at the next record in the result record set. If the action could not be performed false will be returned. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IValidate/MoveNext
[JSON input data] | pIValidate: | longValue, //interface address
[JSON result data] | pbStatus: | booleanValue
[HTTP result status] | 200 | Return status 200 signals a successful method call |
 | 204 | Return status 204 (noContent) signals that the end of an iteration is reached |
 | >= 400 | Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do. |
space
C/C++ calling syntax |  |  |
HRESULT MoveNext( | VARIANT_BOOL | *pbStatus); |
[C/C++ return value] | S_OK | This value is returned if the function call was successful. |
 | S_FALSE | This value is returned if the end of an iteration is reached |
 | E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |
space
Calling argument description |  |  |
[out,retval] VARIANT_BOOL | *pbStatus | Boolean return status |
space |


  • IValidate
  • MovePrevious

IValidate::MovePrevious method |  |  | space
Positions the record pointer at the previous record in the result record set. If the action could not be performed false will be returned. |  |  |
space
Restful webservice calling syntax |  |  |
[POST] | /baseURL/ IValidate/MovePrevious
[JSON input data] | pIValidate: | longValue, //interface address
[JSON result data] | pbStatus: | booleanValue
[HTTP result status] | 200 | Return status 200 signals a successful method call |
 | 204 | Return status 204 (noContent) signals that the end of an iteration is reached |
 | >= 400 | Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do. |
space
C/C++ calling syntax |  |  |
HRESULT MovePrevious( | VARIANT_BOOL | *pbStatus); |
[C/C++ return value] | S_OK | This value is returned if the function call was successful. |
 | S_FALSE | This value is returned if the end of an iteration is reached |
 | E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. |
space
Calling argument description |  |  |
[out,retval] VARIANT_BOOL | *pbStatus | Boolean return status |
space |


  • IValidate
  • Charge

IValidate::Charge property | space
The charge for the service in CHF.
space
Restful webservice calling syntax
[GET] | /baseURL/ IValidate/GetCharge?param
[param] pIValidate= longValue
[JSON result data] pdCharge: doubleValue
[HTTP result status] | 200 | Return status 200 signals a successful method call
204 | Return status 204 (noContent) signals that the end of an iteration is reached
>= 400 | Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do.
space
C/C++ calling syntax
[get] HRESULT | Charge( double *pdCharge );
[C/C++ return value] | S_OK | This value is returned if the function call was successful.
S_FALSE | This value is returned if the end of an iteration is reached
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions.
space
Calling argument description
[out,retval] double | *pdCharge
space
Remarks
If SmartPointers are used than the function names and calls are rewritten by Microsoft into the form
  • double *GetCharge(void);
space


  • IValidate
  • Code

IValidate::Code property | space
Service code.
space
Restful webservice calling syntax
[GET] | /baseURL/ IValidate/GetCode?param
[param] pIValidate= longValue
[JSON result data] pbstrCode: "utf8StringValue"
[HTTP result status] | 200 | Return status 200 signals a successful method call
204 | Return status 204 (noContent) signals that the end of an iteration is reached
>= 400 | Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do.
space
C/C++ calling syntax
[get] HRESULT | Code( BSTR *pbstrCode );
[C/C++ return value] | S_OK | This value is returned if the function call was successful.
S_FALSE | This value is returned if the end of an iteration is reached
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions.
space
Calling argument description
[out,retval] BSTR | *pbstrCode
space
Remarks
If SmartPointers are used than the function names and calls are rewritten by Microsoft into the form
  • BSTR *GetCode(void);
space


  • IValidate
  • Date

IValidate::Date property | space
Date of the service.
space
Restful webservice calling syntax
[GET] | /baseURL/ IValidate/GetDate?param
[param] pIValidate= longValue
[JSON result data] pdDate: "stringISODateValue"
[HTTP result status] | 200 | Return status 200 signals a successful method call
204 | Return status 204 (noContent) signals that the end of an iteration is reached
>= 400 | Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do.
space
C/C++ calling syntax
[get] HRESULT | Date( DATE *pdDate );
[C/C++ return value] | S_OK | This value is returned if the function call was successful.
S_FALSE | This value is returned if the end of an iteration is reached
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions.
space
Calling argument description
[out,retval] DATE | *pdDate
space
Remarks
If SmartPointers are used than the function names and calls are rewritten by Microsoft into the form
  • DATE *GetDate(void);
space


  • IValidate
  • DestructValidate

IValidate::DestructValidate property |  |  | space
This property has a Restful Webservice representation only! Destructs/invalidates this IValidate interface instance. The counterpart property to generate an IValidate interface instance is IDrugValidator::GetCreateValidate. |  |  |
space
Restful webservice calling syntax |  |  |
[PUT] | /baseURL/ IValidate/PutDestructValidate
[JSON input data] | pIValidate: | longValue, //interface address
[HTTP result status] | 200 | Return status 200 signals a successful method call |
 | 204 | Return status 204 (noContent) signals that the end of an iteration is reached |
 | >= 400 | Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do. |
space
Remarks |  |  |
This property has a Restful Webservice representation only! |  |  |
space |


  • IValidate
  • Hook

IValidate::Hook property | space
The hook of the service (external ID).
space
Restful webservice calling syntax
[GET] | /baseURL/ IValidate/GetHook?param
[param] pIValidate= longValue
[JSON result data] plHook: longValue
[HTTP result status] | 200 | Return status 200 signals a successful method call
204 | Return status 204 (noContent) signals that the end of an iteration is reached
>= 400 | Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do.
space
C/C++ calling syntax
[get] HRESULT | Hook( long *plHook );
[C/C++ return value] | S_OK | This value is returned if the function call was successful.
S_FALSE | This value is returned if the end of an iteration is reached
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions.
space
Calling argument description
[out,retval] long | *plHook
space
Remarks
If SmartPointers are used than the function names and calls are rewritten by Microsoft into the form
  • long *GetHook(void);
space


  • IValidate
  • ID

IValidate::ID property | space
The internal ID of the service.
space
Restful webservice calling syntax
[GET] | /baseURL/ IValidate/GetID?param
[param] pIValidate= longValue
[JSON result data] plID: longValue
[HTTP result status] | 200 | Return status 200 signals a successful method call
204 | Return status 204 (noContent) signals that the end of an iteration is reached
>= 400 | Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do.
space
C/C++ calling syntax
[get] HRESULT | ID( long *plID );
[C/C++ return value] | S_OK | This value is returned if the function call was successful.
S_FALSE | This value is returned if the end of an iteration is reached
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions.
space
Calling argument description
[out,retval] long | *plID
space
Remarks
If SmartPointers are used than the function names and calls are rewritten by Microsoft into the form
  • long *GetID(void);
space


  • IValidate
  • IgnoreValidate

IValidate::IgnoreValidate property | space
Flag indicating whether the validation was ignored.
space
Restful webservice calling syntax
[GET] | /baseURL/ IValidate/GetIgnoreValidate?param
[param] pIValidate= longValue
[JSON result data] peIgnoreValidate: longValue
[HTTP result status] | 200 | Return status 200 signals a successful method call
204 | Return status 204 (noContent) signals that the end of an iteration is reached
>= 400 | Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do.
space
C/C++ calling syntax
[get] HRESULT | IgnoreValidate( YesNoType *peIgnoreValidate );
[C/C++ return value] | S_OK | This value is returned if the function call was successful.
S_FALSE | This value is returned if the end of an iteration is reached
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions.
space
Calling argument description
[out,retval] YesNoType | *peIgnoreValidate
space
Remarks
If SmartPointers are used than the function names and calls are rewritten by Microsoft into the form
  • YesNoType *GetIgnoreValidate(void);
space


  • IValidate
  • Quantity

IValidate::Quantity property | space
Quantity.
space
Restful webservice calling syntax
[GET] | /baseURL/ IValidate/GetQuantity?param
[param] pIValidate= longValue
[JSON result data] pdQuantity: doubleValue
[HTTP result status] | 200 | Return status 200 signals a successful method call
204 | Return status 204 (noContent) signals that the end of an iteration is reached
>= 400 | Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do.
space
C/C++ calling syntax
[get] HRESULT | Quantity( double *pdQuantity );
[C/C++ return value] | S_OK | This value is returned if the function call was successful.
S_FALSE | This value is returned if the end of an iteration is reached
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions.
space
Calling argument description
[out,retval] double | *pdQuantity
space
Remarks
If SmartPointers are used than the function names and calls are rewritten by Microsoft into the form
  • double *GetQuantity(void);
space


  • IValidate
  • TP

IValidate::TP property | space
Tax points of the service.
space
Restful webservice calling syntax
[GET] | /baseURL/ IValidate/GetTP?param
[param] pIValidate= longValue
[JSON result data] pdTP: doubleValue
[HTTP result status] | 200 | Return status 200 signals a successful method call
204 | Return status 204 (noContent) signals that the end of an iteration is reached
>= 400 | Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do.
space
C/C++ calling syntax
[get] HRESULT | TP( double *pdTP );
[C/C++ return value] | S_OK | This value is returned if the function call was successful.
S_FALSE | This value is returned if the end of an iteration is reached
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions.
space
Calling argument description
[out,retval] double | *pdTP
space
Remarks
If SmartPointers are used than the function names and calls are rewritten by Microsoft into the form
  • double *GetTP(void);
space


  • IValidate
  • TPValue

IValidate::TPValue property | space
Tax point value of the service.
space
Restful webservice calling syntax
[GET] | /baseURL/ IValidate/GetTPValue?param
[param] pIValidate= longValue
[JSON result data] pdTPValue: doubleValue
[HTTP result status] | 200 | Return status 200 signals a successful method call
204 | Return status 204 (noContent) signals that the end of an iteration is reached
>= 400 | Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do.
space
C/C++ calling syntax
[get] HRESULT | TPValue( double *pdTPValue );
[C/C++ return value] | S_OK | This value is returned if the function call was successful.
S_FALSE | This value is returned if the end of an iteration is reached
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions.
space
Calling argument description
[out,retval] double | *pdTPValue
space
Remarks
If SmartPointers are used than the function names and calls are rewritten by Microsoft into the form
  • double *GetTPValue(void);
space


  • Type definitions

Builtin, composite & enumeration types |  | V1.00/22 Nov 2004
The following list shows ans defines all used data types either basic builtin, composite or enumeration types that are used in the interface of the ATL COM module. |  | space
space
Data types |  | 15 types
[enumeration] AbortValidateType | Enumerates the defined grounds for an aborted validation attempt. |
[builtin] BSTR | A BSTR, known as basic string or binary string, is a pointer to a wide character string used by Automation data manipulation functions |
[enumeration] CantonType | Enumerates the defined canton categories. |
[builtin] DATE | A value denoting a date and time was specified |
[builtin] double | An 8-byte IEEE real value. |
[builtin] HRESULT | The HRESULT data type is a 32-bit value that is used to describe an error or warning. |
[builtin] IValidate | IValidate interface. |
[enumeration] LanguageType | Enumerates all supported languages. |
[enumeration] LawType | Enumerates the supported legal ruleset. |
[builtin] long | A 4-byte integer value. |
[enumeration] PlaceType | Enumerates the defined principal location of the service provider e.g |
[enumeration] RoleType | Enumerates the defined role categories. |
[enumeration] SettlementType | Enumerates the defined settlement categories. |
[builtin] VARIANT_BOOL | A 16 bit Boolean (True/False) value was specified |
[enumeration] YesNoType | Boolean enumerator. |
space |


  • Type definitions
  • AbortValidateType

AbortValidateType enumeration type |  |
Enumerates the defined grounds for an aborted validation attempt. |  | space
space
Set of enumeration values |  | 8 elements
enServiceNotFound: -100 | No service record found. |
enDatabaseNotOpen: 101 | The database is not open. |
enWrongTP: 401 | Wrong tax point specified. |
enWrongTPValue: 402 | Wrong tax point value specified. |
enNoTPValueFound: 403 | The tax point value could not be determined. |
enTreatmentDataChanged: 404 | Treatment input is not allowed to change. |
enWrongAmount: 405 | Wrong amount specified. |
enValidateFailed: 999 | The validation failed - incompatible database parameters - contact the support. |
space


  • Type definitions
  • BSTR

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


  • Type definitions
  • CantonType

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


  • Type definitions
  • double

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


  • Type definitions
  • HRESULT

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


  • Type definitions
  • IValidate

IValidate type |
IValidate interface. | space
space
space


  • Type definitions
  • LanguageType

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


  • Type definitions
  • LawType

LawType enumeration type |  |
Enumerates the supported legal ruleset. |  | space
space
Set of enumeration values |  | 5 elements
enKVG: 0 | KVG |
enUVG: 1 | UVG |
enMVG: 2 | MVG |
enIVG: 3 | IVG |
enVVG: 4 | VVG |
space


  • Type definitions
  • long

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


  • Type definitions
  • PlaceType

PlaceType enumeration type |  |
Enumerates the defined principal location of the service provider e.g. the principal authority under which the service provider is acting. |  | space
space
Set of enumeration values |  | 6 elements
enPlaceUndefined: 0 | Undefined or unknown place. |
enPlacePractice: 1 | Practice. |
enPlaceHospital: 2 | Hospital |
enPlaceLab: 4 | Lab |
enPlaceAssociation: 8 |  |
enPlaceCompany: 16 |  |
space


  • Type definitions
  • RoleType

RoleType enumeration type |  |
Enumerates the defined role categories. |  | space
space
Set of enumeration values |  | 23 elements
enRoleUndefined: 0 | Undefined or unknown role. |
enRolePhysician: 1 | Physician |
enRolePhysiotherapist: 2 | Physiotherapist |
enRoleChiropractor: 4 | Chiropractor |
enRoleErgotherapist: 8 | Ergotherapist |
enRoleNutritionist: 16 | Nutritionist |
enRoleMidwife: 32 | Midwife |
enRoleLogotherapist: 64 |  |
enRoleHospital: 128 |  |
enRolePharmacist: 256 |  |
enRoleDentist: 512 | Dentist |
enRoleLabTechnician: 1024 |  |
enRoleDentalTechnician: 2048 |  |
enRoleOtherTechnician: 4096 |  |
enRolePsychologist: 16384 |  |
enRoleFlatrateService: 32768 |  |
enRoleWholesaler: 65536 |  |
enRoleNursingStaff: 131072 |  |
enRoleTransport: 262144 |  |
enRoleDruggist: 524288 |  |
enRoleNaturopathicDoctor: 1048576 |  |
enRoleNaturopathicTherapist: 2097152 |  |
enRoleOther: 4194304 |  |
space


  • Type definitions
  • SettlementType

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


  • Type definitions
  • VARIANT_BOOL

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


  • Type definitions
  • YesNoType

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


 Sumex1 under a 64bit architecture...

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

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

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

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


 General use of the drugValidator ATL COM module

  • First create an instance of the drugValidator COM module.
  • Open the drug database with the Open method from the IDrugValidator interface. Set the localization language (if it differs from the default setting of German) using the SetLanguage from the IDrugValidator interface.
  • The following steps may then be performed, until the drugValidator module instance is released:
    • Add the selected services to the AddService method from the IValidate interface.
  • Release the drugValidator COM module instance.


 Very important remark about the drugValidator!!

As the name "drugValidator" might imply, the validator has query and validation services for all pharmaceuticals applicable in Switzerland. This was indeed intended but due to various reasons the implementation did not end this way.

  • Only drug from the "Spezialitätenliste" included
    Since e-mediate as copyright holder of the GalDat database is not willing to give away a basic set of data for free the drugValidator was redesigned to just validate the maximal public prices as given by the BSV/OFAS. The data source for that "reduced" validator is the "Spezialitätenliste"
  • History of prices
    Since we do not have the past prices of the SL drugs the current situation (1. april 2002) is the price basis! From now on changes in pricing will be covered by the drug database. The first date of entry if given by the "Spezialitätenliste" serves as starting date in the price history list. If not supplied by SL 1. jan. 1990 is set!
  • Size of SL - pharma codes
    Since we have no data about the former size of the "Spezialitätenliste" drug included in older lists are therefore not covered in the drug validator.

    Due to the XML schema files of the electronic invoice the drug are referenced either by the pharma codes (as given by e-mediate) or by the EAN-13 codes! However, the current "Spezialitätenliste" does include some drugs without a pharma code. These drugs have been dropped in the drugValidator database. A request for defining pharma codes for these drug is underway.

  • Validation service
    Due to all these short comings the price validation is only applied to drugs that are included in the current "Spezialitätenliste" and further have an official pharma code!

    If a given drug can not be localized in the database, the data is accepted by the validator unaltered, and the validation gives back an OK.


 Notice about the
"configuration parameters" in the drugValidator!!

Please note:

The IDrugValidator module provides the method SetTreatment for setting treatment relevant parameters like the canton, the applied law (UVG, KVG,...), as well as the property RoleType for setting the principal role of the service provider (Physician, Hospital, Laboratory,...).

Currently these parameters are not relevant!
Neither are these parameters used for validating/limiting the set of available services nor is the evaluated tax point value in any way a function of these parameters.

However, the future might be different?
Should that occur, there is no further need for a software company to change any of their code, as the parameters are already supplied to the validator module. Therefore we strongly urge you to use this feature.


 Introduction, overview and usage of the Restful Webservice Server

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

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

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

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

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

As already mentioned, Restful programming is analogous to C++ programming with the addition that each instance of an interface (including the main interface) is created via the corresponding GET function. For example, an instance of the main interface is created with:
baseURL/IDrugValidator/GetCreateDrugValidator | returns the instance address as JSON out{pIDrugValidator: longValue,...}
In every further call of a method or a property of the main interface this instance address must be included as part of the JSON-In. The termination/deletion of an instance must be done via the corresponding PUT Destruct property:
baseURL/IDrugValidator/PutDestructDrugValidator | with JSON-In{pIDrugValidator: longValue}, deletes the corresponding main instance AND all at that moment still active dependent subinstances (subinstances which have been generated by the explicit main instance).
It should be noted that the webserver drugValidatorServer100.exe performs an internal management of the generated instances and automatically deletes instances that have no activity for a defined period of 2 hours. no activity over a defined period of 2 hours. If after this action a rest call with such an instance is made, an error (HTTP Status >= 400) is generated and the instance address is marked as unknown.
Code snippet:
Minimal code snippet to query the version of the module and the associated database:
    http://localhost:34668/drugValidatorServer100/IDrugValidator/GetCreateDrugValidator
        returns JSON-Out{pIDrugValidator: 45467}

    http://localhost:34668/drugValidatorServer100/IDrugValidator/GetModuleVersion?pIDrugValidator=45467
        returns JSON-Out{pbstrModuleVersion: "1.00.008"}

    http://localhost:34668/drugValidatorServer100/IDrugValidator/GetDBVersionText?pIDrugValidator=45467
        returns JSON-Out{pbstrDBVersionText: "3.22"}

    http://localhost:34668/drugValidatorServer100/IDrugValidator/GetDBVersionDate?pIDrugValidator=45467
        returns JSON-Out{pdDBVersionDate: "2021-11-29"}

    http://localhost:34778/drugValidatorServer100/IDrugValidator/GetCreateValidate?pIDrugValidator=45467
        returns JSON-Out{pIValidate: 47008}

    http://localhost:34778/drugValidatorServer100/IValidate/PutDestructValidate
        JSON-IN(pIValidate: 47008}

    http://localhost:34668/drugValidatorServer100/IDrugValidator/PutDestructDrugValidator
        JSON-IN{pIDrugValidator:45467}