IGLib
1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
|
Utilities for communication with the web service Calypso. More...
Public Member Functions | |
void | TestAfterReceiverStarted () |
Performs some tests after the receiver has been started. This function is here for debuggind purposes. It should be called after the receiver is started, and it can be empty in the release version of the application. More... | |
bool | TestWs (out string Id) |
Returns true if the communication web service is responding, and false if it is not. More... | |
bool | TestWs () |
Returns true if the communication web service is responding, and false if it is not. More... | |
string | GetUniqueID () |
Gets a unique ID from the Calypso web service and returns it. More... | |
void | SendMessageToMyself (string message, string msgid) |
Sends a msg that is contained in msg, to the Labex queue. If necessary then the msg is modified such that the right receiver is set in it (i.e. Labex) More... | |
void | SendMessageToBis (string message, string msgid) |
Sends a msg that is contained in msg, to the Bis queue. More... | |
void | SendMessage (string message, string receiver, string msgid) |
Sends a msg to the specified receiver through the calypso WS. More... | |
void | SendOoNullifyToBis (string connectionstring, int IdRsr) |
Sends nullification message for the specified Observation order, to the Bis queue. Original observation order message (as stored in the database) is modified in such a way that the right action code, receiver, sender and responder are set in it, and the specified comment is set in the message. Original message XML is obtained from the message table through the ID in tbl01_RSR. More... | |
void | SendOoNullifyToBis (MsgObervationOrder msg, string comment) |
Sends nullification message for the Observation order that is contained in msg, to the Bis queue. msg is modified in such a way that the right action code, receiver, sender and responder are set in it, and the specified comment is set. More... | |
void | SendOoNullifyToBis (string message, string msgid, string comment) |
Sends nullification message for the Observation order that is contained in message, to the Bis queue. message is modified in such a way that the right action code, receiver, sender and responder are set in it, and the specified comment is set. More... | |
void | ConfirmMessageReceipt (string Id) |
Sends confirmation back to the WS massage queue that the msg with the specified ID has been received and treated and that it doed not need to be kept in the queue any more. More... | |
void | ConfirmMessageReceipt (string Id, string queueName) |
Sends confirmation back to the WS massage queue that the msg with the specified ID has been received and treated and that it doed not need to be kept in the queue any more. More... | |
void | SaveIncomingMessage (MsgBase msg) |
Saves the msg Xml to a file. File name is determined according to seddings. No GUID is added to file name. More... | |
void | SaveIncomingMessage (MsgBase msg, bool addGuid) |
Saves the msg Xml to a file. File name is determined according to seddings. More... | |
void | SaveIncomingMessage (MsgBase msg, string filename) |
Saves the msg Xml to a file with a specified name. More... | |
MsgBase | GetMessage () |
Receives the last msg from the Calypso web service and returns msg object. More... | |
void | GetMessage (out string Id, out string MessageText) |
Receives a msg from the Calypso web service and returns msg Id and Text. More... | |
LabexBis.WebReference.Message | GetNextMessage () |
Receives a new msg from the Calypso web service and returns it. The msg is also stored to a file whose name is determined from the msg ID. More... | |
void | Dispose () |
Public Attributes | |
BisCommunicationSettings | Settings = new BisCommunicationSettings() |
Protected Member Functions | |
MsgBase | GetMessage (string hl7version) |
Receives the last msg from the Calypso web service and returns msg object. The message is also storedto a file whose name is determined from the msg ID. Version of the standard must also be specified. More... | |
void | GetMessage (string HL7Version, out string Id, out string MessageText) |
Receives a msg from the Calypso web service and returns msg Id and Text. More... | |
LabexBis.WebReference.Message | GetNextMessage (string hl7version) |
Receives a new msg from the Calypso web service and returns it. More... | |
Properties | |
static IReporter | R [get] |
Reporter for this class. More... | |
MsgConst | Const [get] |
Gets objects that contains all constants related to communication messages. More... | |
static Calypso | Global [get] |
Global communication object (application-wide). More... | |
LabexBis.WebReference.CalypsoWSNSService | Service [get] |
Web service used for sending messages between systems. More... | |
string | ReceiverBis [get] |
string | ReceiverLabex [get] |
Private Member Functions | |
void | ReceiveAndProcessMessage (bool ReadFromWS) |
Receives and processes one msg from the callypso server. Dependent on Pado server settings, msg can aldo be read from a file (for testing purposes). More... | |
void | ReceiverThreadMain () |
Periodically receives messages from Calypso and works them. More... | |
void | SendMessage (string hl7version, string msg, string receiver, string msgid) |
Sending a msg to WS with HL7 version specification. More... | |
Private Attributes | |
LabexBis.WebReference.CalypsoWSNSService | _service = null |
const string | QueueNameLabex = "Labex" |
const string | QueueNameBis = "" |
const string | HL7Version = "v30" |
bool | _dbCmdInitialized = false |
int | PauseBetweenReads_ms = 5000 |
int | PauseBeforeReads_ms = 400 |
bool | ControlOutputs = true |
bool | ReceiverRun = false |
Static Private Attributes | |
static IReporter | _rep = new ReporterConsole() |
static Calypso | _global = null |
Utilities for communication with the web service Calypso.
|
inlineprivate |
Receives and processes one msg from the callypso server. Dependent on Pado server settings, msg can aldo be read from a file (for testing purposes).
ReadFromWs | If false then msg is not read from the web service but from a file. |
|
inlineprivate |
Periodically receives messages from Calypso and works them.
|
inline |
Performs some tests after the receiver has been started. This function is here for debuggind purposes. It should be called after the receiver is started, and it can be empty in the release version of the application.
|
inline |
Returns true if the communication web service is responding, and false if it is not.
Id | Output parameter through which a unique Id returned by the web service is obtained when the web service is responding properly. |
References LabexBis.Calypso.GetUniqueID().
Referenced by IGTest.ProgramIGTest.TestCalypsoWs().
|
inline |
Returns true if the communication web service is responding, and false if it is not.
|
inline |
Gets a unique ID from the Calypso web service and returns it.
References IG.Lib.IReporterBase.Depth, LabexBis.Calypso.R, IG.Lib.IReporterBase.ReportError(), IG.Lib.IReporterBase.ReportInfo(), IG.Lib.ReporterBase.ReviseException(), LabexBis.Calypso.Service, and IG.Lib.IReporterBase.TreatInfo.
Referenced by IGTest.ProgramIGTest.TestcalypsoWsSimple(), and LabexBis.Calypso.TestWs().
|
inline |
Sends a msg that is contained in msg, to the Labex queue. If necessary then the msg is modified such that the right receiver is set in it (i.e. Labex)
msg | Xml document containing the msg to be sent. |
msgid | Message Id. |
References LabexBis.Calypso.ReceiverLabex, and LabexBis.Calypso.SendMessage().
Referenced by IGTest.ProgramIGTest.TestCalypsoWs().
|
inline |
Sends a msg that is contained in msg, to the Bis queue.
If necessary then the msg is modified such that the right receiver is set in it (i.e. Bis)
msg | Xml document containing the msg to be sent. |
msgid | Message Id. |
References LabexBis.Calypso.ReceiverBis, and LabexBis.Calypso.SendMessage().
Referenced by LabexBis.Calypso.SendOoNullifyToBis(), IGTest.ProgramIGTest.TestMsgFinancialTransaction(), and IGTest.ProgramIGTest.TestMsgObservationEvent().
|
inline |
Sends a msg to the specified receiver through the calypso WS.
msg | Xml document containing the msg to be sent. |
receiver | Code of the application that will receive the msg. |
msgid | Message Id. |
References LabexBis.Calypso.HL7Version.
Referenced by LabexBis.Calypso.SendMessageToBis(), and LabexBis.Calypso.SendMessageToMyself().
|
inlineprivate |
Sending a msg to WS with HL7 version specification.
hl7version | Version of the HL7 specification. |
msg | Xml document containing the msg to be sent. |
receiver | Code of the application that will receive the msg. |
msgid | Message Id. |
References IG.Lib.IReporterBase.Depth, LabexBis.Calypso.HL7Version, LabexBis.BisCommunicationSettings.OutgoingFileName(), LabexBis.Calypso.R, IG.Lib.IReporterBase.ReportError(), IG.Lib.IReporterBase.ReportInfo(), LabexBis.Calypso.Service, IG.Lib.MsgBase.SetMessageReceiver(), and IG.Lib.IReporterBase.TreatInfo.
|
inline |
Sends nullification message for the specified Observation order, to the Bis queue. Original observation order message (as stored in the database) is modified in such a way that the right action code, receiver, sender and responder are set in it, and the specified comment is set in the message. Original message XML is obtained from the message table through the ID in tbl01_RSR.
ConnectionString | |
IdRsR | |
comment |
References LabexBis.Calypso.R, IG.Lib.IReporterBase.ReportError(), and IG.Lib.IReporterBase.ReportInfo().
Referenced by IGTest.ProgramIGTest.TestMsgObservationOrderNullifySend().
|
inline |
Sends nullification message for the Observation order that is contained in msg, to the Bis queue. msg is modified in such a way that the right action code, receiver, sender and responder are set in it, and the specified comment is set.
msg | Xml document containing the original observation order to be nullified. |
msgid | Message Id. |
comment | Comment that is set in the message. |
References IG.Lib.ParsableXmlObject.Doc, IG.Lib.MsgBase.MessageId, IG.Lib.MsgBase.MessageNumber, IG.Lib.MsgObervationOrder.PrepareOoNullify(), LabexBis.Calypso.SendMessageToBis(), and IG.Lib.MsgBase.Type.
|
inline |
Sends nullification message for the Observation order that is contained in message, to the Bis queue. message is modified in such a way that the right action code, receiver, sender and responder are set in it, and the specified comment is set.
message | Xml document containing the original observation order to be nullified. |
msgid | Message Id. Needed to form the file name where message is stored before sending. |
comment | Comment that is set in the message. |
References IG.Lib.MsgObervationOrder.PrepareOoNullify(), and LabexBis.Calypso.SendMessageToBis().
|
inline |
Sends confirmation back to the WS massage queue that the msg with the specified ID has been received and treated and that it doed not need to be kept in the queue any more.
Id | Id of the received msg (as obtained from the web service). |
References LabexBis.Calypso.QueueNameLabex.
Referenced by IGTest.ProgramIGTest.ReceiveSpecimenObservationOrder().
|
inline |
Sends confirmation back to the WS massage queue that the msg with the specified ID has been received and treated and that it doed not need to be kept in the queue any more.
Id | Id of the received msg (as obtained from the web service). |
queuwName | Name of the queue from which the msg has been picked. |
References IG.Lib.IReporterBase.Depth, LabexBis.Calypso.R, IG.Lib.IReporterBase.ReportError(), IG.Lib.IReporterBase.ReportInfo(), LabexBis.Calypso.Service, and IG.Lib.IReporterBase.TreatInfo.
|
inline |
Saves the msg Xml to a file. File name is determined according to seddings. No GUID is added to file name.
msg | Message to be saved. |
References LabexBis.BisCommunicationSettings.IncomingFileName(), and IG.Lib.MsgBase.MessageId.
Referenced by IGTest.ProgramIGTest.ReceiveSpecimenObservationOrder(), and LabexBis.Calypso.SaveIncomingMessage().
|
inline |
Saves the msg Xml to a file. File name is determined according to seddings.
msg | Message to be saved. |
addGuid | If true then GUID is added to file name. |
References LabexBis.BisCommunicationSettings.IncomingFileName(), IG.Lib.MsgBase.MessageId, and LabexBis.Calypso.SaveIncomingMessage().
|
inline |
Saves the msg Xml to a file with a specified name.
msg | Message object whose Xml is saved. |
filename | Name of a file into which the object is saved. |
References IG.Lib.MsgBase.MessageXml.
|
inline |
Receives the last msg from the Calypso web service and returns msg object.
References LabexBis.Calypso.HL7Version.
Referenced by LabexBis.Calypso.GetMessage(), IGTest.ProgramIGTest.ReceiveSpecimenObservationOrder(), IGTest.ProgramIGTest.TestCalypsoWs(), and IGTest.ProgramIGTest.TestcalypsoWsSimple().
|
inlineprotected |
Receives the last msg from the Calypso web service and returns msg object. The message is also storedto a file whose name is determined from the msg ID. Version of the standard must also be specified.
References LabexBis.Calypso.GetMessage(), IG.Lib.MsgBase.GetMessageType(), LabexBis.BisCommunicationSettings.IncomingFileName(), IG.Lib.MsgBase.MessageFile, IG.Lib.MsgBase.MessageId, IG.Lib.MsgBase.MessageXml, LabexBis.Calypso.R, IG.Lib.IReporterBase.ReportError(), IG.Lib.IReporterBase.ReportInfo(), and IG.Lib.IReporterBase.TreatInfo.
|
inline |
Receives a msg from the Calypso web service and returns msg Id and Text.
Id | messagestr ID that is a part of the received msg. |
MessageText | messagestr itself. |
References LabexBis.Calypso.GetMessage(), and LabexBis.Calypso.HL7Version.
|
inlineprotected |
Receives a msg from the Calypso web service and returns msg Id and Text.
hl7version | Version of the HL7 standard according to which the msg is assembled. |
Id | messagestr ID that is a part of the received msg. |
MessageText | messagestr itself. |
References IG.Lib.IReporterBase.Depth, LabexBis.Calypso.GetNextMessage(), LabexBis.Calypso.R, IG.Lib.IReporterBase.ReportError(), IG.Lib.IReporterBase.ReportInfo(), and IG.Lib.IReporterBase.TreatInfo.
|
inline |
Receives a new msg from the Calypso web service and returns it. The msg is also stored to a file whose name is determined from the msg ID.
References LabexBis.Calypso.HL7Version.
Referenced by LabexBis.Calypso.GetMessage().
|
inlineprotected |
Receives a new msg from the Calypso web service and returns it.
hl7version | The version of the HL7 standard used for messages. |
References IG.Lib.IReporterBase.Depth, LabexBis.Calypso.HL7Version, LabexBis.Calypso.QueueNameLabex, LabexBis.Calypso.R, IG.Lib.IReporterBase.ReportError(), IG.Lib.IReporterBase.ReportInfo(), IG.Lib.IReporterBase.ReportWarning(), IG.Lib.ReporterBase.ReviseException(), LabexBis.Calypso.Service, IG.Lib.IReporterBase.TreatInfo, and IG.Lib.IReporterBase.TreatWarning.
|
inline |
|
staticprivate |
|
staticprivate |
|
private |
|
private |
Referenced by LabexBis.Calypso.ConfirmMessageReceipt(), and LabexBis.Calypso.GetNextMessage().
|
private |
|
private |
Referenced by LabexBis.Calypso.GetMessage(), LabexBis.Calypso.GetNextMessage(), and LabexBis.Calypso.SendMessage().
BisCommunicationSettings LabexBis.Calypso.Settings = new BisCommunicationSettings() |
Referenced by IGTest.ProgramIGTest.ReceiveSpecimenObservationOrder(), IGTest.ProgramIGTest.TestCalypsoWs(), IGTest.ProgramIGTest.TestcalypsoWsSimple(), IGTest.ProgramIGTest.TestMsgFinancialTransaction(), IGTest.ProgramIGTest.TestMsgObservationEvent(), IGTest.ProgramIGTest.TestMsgObservationOrder(), IGTest.ProgramIGTest.TestMsgObservationOrderNullify(), and IGTest.ProgramIGTest.TestMsgObservationOrderNullifySend().
|
private |
|
private |
|
private |
|
private |
|
private |
|
staticget |
Reporter for this class.
Referenced by LabexBis.Calypso.ConfirmMessageReceipt(), LabexBis.Calypso.GetMessage(), LabexBis.Calypso.GetNextMessage(), LabexBis.Calypso.GetUniqueID(), LabexBis.Calypso.SendMessage(), and LabexBis.Calypso.SendOoNullifyToBis().
|
getprotected |
Gets objects that contains all constants related to communication messages.
|
staticget |
Global communication object (application-wide).
Referenced by IGTest.ProgramIGTest.ReceiveSpecimenObservationOrder(), IGTest.ProgramIGTest.TestCalypsoWs(), IGTest.ProgramIGTest.TestcalypsoWsSimple(), IGTest.ProgramIGTest.TestMsgFinancialTransaction(), IGTest.ProgramIGTest.TestMsgObservationEvent(), IGTest.ProgramIGTest.TestMsgObservationOrder(), IGTest.ProgramIGTest.TestMsgObservationOrderNullify(), and IGTest.ProgramIGTest.TestMsgObservationOrderNullifySend().
|
getprotected |
Web service used for sending messages between systems.
Referenced by LabexBis.Calypso.ConfirmMessageReceipt(), LabexBis.Calypso.GetNextMessage(), LabexBis.Calypso.GetUniqueID(), and LabexBis.Calypso.SendMessage().
|
get |
Referenced by LabexBis.Calypso.SendMessageToBis().
|
get |
Referenced by LabexBis.Calypso.SendMessageToMyself().