IGLib
1.5
The IGLib base library EXTENDED - with other lilbraries and applications.
|
Class for holding and manipulating the data about observation order. Includes parsing an XML file, storing data internally, and transcription of read data to a PADO object that enables saving data to a database. More...
Public Member Functions | |
MsgObervationOrder () | |
Default constructor, sets the type information. More... | |
override void | Read () |
Reads msg data from the internal XML document containing the msg. More... | |
override void | Read (XmlParser data) |
Read msg data from an XML document containing the msg. More... | |
override void | CheckConsistency (AccummulatedReport rep) |
Check correctness and consistency of data and creates a report on this. More... | |
string | GetBisOrderId () |
Returns BIS Order Id for this msg. More... | |
override string | ToString () |
override XmlDocument | ToXml () |
Converts a msg to Xml and returns it. More... | |
![]() | |
void | SetSenderLabex () |
Sets msg data such that sender is Labex and receiver is Bis. More... | |
void | SetSenderBis () |
Sets msg data such that sender is Bis and receiver is Labex. More... | |
![]() | |
virtual void | Save (string filename) |
Saves contents of the msg to an xml file. More... | |
virtual void | CreateXml () |
Creates msg Xml from the current msg data and stores it in this object. More... | |
virtual void | Load (string filename) |
Loads msg data from a file containing the XML msg. More... | |
virtual void | LoadXml (string doc) |
Loads msg data from a string containing the XML msg. More... | |
virtual void | LoadXml (XmlDocument doc) |
Loads msg data from an XmlDocument containing XML msg. More... | |
virtual void | WriteToConsole () |
Writes cntents of the msg in a human readable form to the system console. More... | |
virtual void | Write (string filename, bool append) |
Writes cntents of the msg in a human readable form to a file. More... | |
Static Public Member Functions | |
static void | PrepareOoNullify (ref string message, string comment) |
Prepares the observation order message to be sent to the Calypso web service as response to another observation order message, for the case where message is specified a string. Sender, receiver and responder are re-set consistently such that Labex becomes sender of the message, action is set to Nullify and comment is set in addition. More... | |
static void | PrepareOoNullify (ref XmlDocument msg, string comment) |
Prepares the observation order message to be sent to the Calypso web service as response to another observation order message, for the case where message is specified a string. Sender, receiver and responder are re-set consistently such that Labex becomes sender of the message, action is set to Nullify and comment is set in addition. More... | |
static void | PrepareOoNullify (ref XmlDocument msg, string comment, out bool changed) |
Prepares the observation order message to be sent to the Calypso web service as response to another observation order message, for the case where message is specified a string. Sender, receiver and responder are re-set consistently such that Labex becomes sender of the message, action is set to Nullify and comment is set in addition. More... | |
static void | PrepareOoNullify (ref XmlBuilder data, string comment) |
Prepares the observation order message to be sent to the Calypso web service as nullify request for another observation order message. Sender, receiver and responder are re-set consistently such that Labex becomes sender of the message, action is set to Nullify and comment is set in addition. More... | |
static void | PrepareOoNullify (ref XmlBuilder data, string comment, out bool changed) |
Prepares the observation order message to be sent to the Calypso web service as nullify request for another observation order message. Sender, receiver and responder are re-set consistently such that Labex becomes sender of the message, action is set to Nullify and comment is set in addition. More... | |
static void | PrepareOoResponse (ref string message, OoAction action, string comment, string sender, string receiver, string responder, out bool changed) |
Prepares the observation order message to be sent to the Calypso web service as response to another observation order message. Contents of the message is modified according to parameters. More... | |
static void | PrepareOoResponse (ref XmlDocument msg, OoAction action, string comment, string sender, string receiver, string responder, out bool changed) |
Prepares the observation order message to be sent to the Calypso web service as response to another observation order message. Contents of the message is modified according to parameters. More... | |
static void | PrepareOoResponse (ref XmlBuilder data, OoAction action, string comment, string sender, string receiver, string responder, out bool changed) |
Prepares the observation order message to be sent to the Calypso web service as response to another observation order message. Contents of the message is modified according to parameters. More... | |
static void | SetOoComment (ref XmlBuilder data, string comment, out bool changed) |
Sets the comment in the the Xml document containing the SpecimenObservationOrter message (this is contained in the "text" element of the message body) More... | |
static void | SetOoAction (ref string message, OoAction action, out bool changed) |
Sets the receiver of the communication msg stored in msg to the specified receiver, and indicates through an output argument whether the receiver has been changed in msg. If the receiver stated in the msg already equals to the specified one then nothing changes in the msg and the output indicator becomes false. More... | |
static void | SetOoAction (ref XmlDocument msg, OoAction action, out bool changed) |
Sets the receiver of the communication msg stored in msg to the specified receiver, and indicates through an output argument whether the receiver has been changed in msg. If the receiver stated in the msg already equals to the specified one then nothing changes in the msg and the output indicator becomes false. More... | |
static void | SetOoAction (ref XmlBuilder data, OoAction action, out bool changed) |
Sets the action code of the Xml document containing the SpecimenObservationOrter message. Action code is set consistently in such a way that both dependent elements are set (also the "message code"). More... | |
![]() | |
static void | SetMessageReceiverOld (ref XmlDocument msg, string receiver, out bool changed) |
Sets the receiver of the communication msg stored in msg to the specified receiver, and indicates through an output argument whether the receiver has been changed in msg. If the receiver stated in the msg already equals to the specified one then nothing changes in the msg and the output indicator becomes false. WARNING: searching for receiver element is done through an XPath expression, which may fail due to default namespaces that were not detected. More... | |
static void | SetMessageReceiver (ref string message, string receiver, out bool changed) |
Sets the receiver of the communication msg stored in msg to the specified receiver, and indicates through an output argument whether the receiver has been changed in msg. If the receiver stated in the msg already equals to the specified one then nothing changes in the msg and the output indicator becomes false. More... | |
static void | SetMessageReceiver (ref XmlDocument msg, string receiver, out bool changed) |
Sets the receiver of the communication msg stored in msg to the specified receiver, and indicates through an output argument whether the receiver has been changed in msg. If the receiver stated in the msg already equals to the specified one then nothing changes in the msg and the output indicator becomes false. More... | |
static void | SetMessageReceiver (ref XmlBuilder data, string receiver, out bool changed) |
Sets the receiver of the communication msg stored in an Xml builder to the specified receiver, and indicates through an output argument whether the receiver has been changed in msg. If the receiver stated in the msg already equals to the specified one then nothing changes in the msg and the output indicator becomes false. More... | |
static void | SetMessageSender (ref XmlBuilder data, string sender, out bool changed) |
Sets the sender of the communication msg stored in an Xml builder to the specified sender, and indicates through an output argument whether the sender has been changed in msg. If the Sender stated in the msg already equals to the specified one then nothing changes in the msg and the output indicator becomes false. More... | |
static void | SetMessageResponder (ref XmlBuilder data, string responder, out bool changed) |
Sets the responder of the communication msg stored in an Xml builder to the specified responder, and indicates through an output argument whether the responder has been changed in msg. If the responder stated in the msg already equals to the specified one then nothing changes in the msg and the output indicator becomes false. More... | |
static MessageType | GetMessageType (string msgstring) |
Infers the msg type from the XML string containing the msg, and returns it. More... | |
static MessageType | GetMessageType (XmlDocument msg) |
Infers the msg type from the XML document containing the msg, and returns it. More... | |
static MessageType | GetMessageType (XmlParser data) |
Infers the msg type from the XML parser containing the msg, and returns it. More... | |
Public Attributes | |
List< Observation > | Observations = new List<Observation>() |
List< Sample > | Samples = new List<Sample>() |
List< Patient > | Patients = new List<Patient>() |
List< Author > | Authors = new List<Author>() |
List< DiagnosisText > | DiagnosisTexts = new List<DiagnosisText>() |
List< DiagnosisCodeClass > | DiagnosisCodes = new List<DiagnosisCodeClass>() |
AutopsyDeathReason | AutopsyDeathReason = null |
Obduction declaration data: More... | |
AutopsyBasicDisease | AutopsyBasicDisease = null |
AutopsyAssociatedDisease | AutopsyAssociatedDisease = null |
AutopsyOtherInformation | AutopsyOtherInformation = null |
![]() | |
MessageType | Type = MessageType.Unknown |
Message type. Helps with general methods that operate on any datatype of msg. More... | |
string | MessageId = null |
Message ID, obtained form the web service. More... | |
string | MessageFile = null |
Specifies the file where message has been backed up. Warning: this file may be deleted at any time! More... | |
string | MessageNumber = null |
![]() | |
string | XmlString = null |
Properties | |
int | NumSamples [get] |
Gets number of samples. More... | |
bool | PatientIsAlive [get] |
Indicates whether patient is alive. More... | |
![]() | |
static MsgConst | Const [get] |
Gets objects that contains all constants related to communication messages. More... | |
string | MessageXml [get, set] |
Complete msg as obtained from the web service. More... | |
![]() | |
virtual IReporter | R [get] |
Reporter for this class. More... | |
XmlDocument | Doc [get] |
Returns the XML document representing the msg. More... | |
Private Attributes | |
OoAction | Action = OoAction.Unknown |
string | ActionRoot = null |
string | ActionCode = null |
DateTime | CreationTime = null |
DateTime | Ordertime = null |
string | MessageCode = null |
string | MessageCodeSystem = null |
string | BisOrderId = null |
string | BisOrderIdOid = null |
string | ObservationType = null |
string | RsrTypeCodeSystem = null |
string | OrderStatus = null |
string | OrderComment = null |
string | Priority = null |
string | PriorityCodeSystem = null |
Additional Inherited Members | |
![]() | |
XmlBuilder | Data = new XmlBuilder() |
![]() | |
static string | LabexIdLowercase = null |
Class for holding and manipulating the data about observation order. Includes parsing an XML file, storing data internally, and transcription of read data to a PADO object that enables saving data to a database.
|
inline |
Default constructor, sets the type information.
|
inlinevirtual |
Reads msg data from the internal XML document containing the msg.
Implements IG.Lib.ParsableXmlObject.
Referenced by IGTest.ProgramIGTest.TestCalypsoWs(), IGTest.ProgramIGTest.TestMsgObservationOrder(), and IGTest.ProgramIGTest.TestMsgObservationOrderNullify().
|
inlinevirtual |
Read msg data from an XML document containing the msg.
doc | Document containing the msg. |
Implements IG.Lib.ParsableXmlObject.
References IG.Lib.XmlParser.Attribute(), IG.Lib.MedicalData.AttributeValue, IG.Lib.MedicalData.AutopsyAssociatedDisease, IG.Lib.MedicalData.AutopsyBasicDisease, IG.Lib.MedicalData.AutopsyDeathReason, IG.Lib.MedicalData.AutopsyOtherInformation, IG.Lib.XmlParser.Back(), IG.Lib.XmlParser.BackToMark(), IG.Lib.Patient.BirthDate, IG.Lib.Patient.BirthDateStr, IG.Lib.Patient.Birthplace, IG.Lib.Sample.BisId, IG.Lib.Patient.BisId, IG.Lib.Author.BisId, IG.Lib.Sample.BisIdOid, IG.Lib.Patient.BisIdOid, IG.Lib.Author.BisIdOid, IG.Lib.Author.BisIdOrganization, IG.Lib.Author.BisIdOrganizationOid, IG.Lib.Patient.City, IG.Lib.Author.City, IG.Lib.MedicalData.Code, IG.Lib.MedicalData.CodeSystem, IG.Lib.Patient.CountryCode, IG.Lib.Author.CountryCode, IG.Lib.Sample.CreationTime, IG.Lib.Sample.CreationTimeString, IG.Lib.XmlParser.Current, IG.Lib.MedicalData.DataKind, IG.Lib.MedicalData.DataType, IG.Lib.MedicalData.DiagnosisText, IG.Lib.MedicalData.DiagonsisCode, IG.Lib.XmlParser.Doc, IG.Lib.MedicalData.ElementValue, IG.Lib.Sample.FixativeCode, IG.Lib.Sample.FixativeCodeDescription, IG.Lib.Sample.FixativeCodeSystem, IG.Lib.XmlParser.GoToMark(), IG.Lib.XmlParser.GoToRoot(), IG.Lib.Patient.HealthSecurityId, IG.Lib.Patient.IsAlive, IG.Lib.MedicalData.IsAutopsyAssociatedDisease, IG.Lib.MedicalData.IsAutopsyBasicDisease, IG.Lib.MedicalData.IsAutopsyDeathReason, IG.Lib.MedicalData.IsAutopsyOtherInformation, IG.Lib.MedicalData.IsDiagnosisCode, IG.Lib.MedicalData.IsDiagnosisText, IG.Lib.Patient.IsMale, IG.Lib.Patient.Name, IG.Lib.Author.Name, IG.Lib.XmlParser.Name, IG.Lib.XmlParser.NextElement(), IG.Lib.XmlParser.NextOrCurrentElement(), IG.Lib.Sample.NumPieces, IG.Lib.Sample.OrganCode, IG.Lib.Sample.OrganCodeDescription, IG.Lib.Sample.OrganCodeSystem, IG.Lib.Author.OrganizationName, IG.Lib.Patient.PostalCode, IG.Lib.Author.PostalCode, IG.Lib.Author.Prefix, IG.Lib.XmlParser.RemoveMark(), IG.Lib.XmlParser.RemoveMarks(), IG.Lib.ParsableXmlObject.AccummulatedReport.Report(), IG.Lib.ReporterBase.ReviseException(), IG.Lib.Sample.RightSide, IG.Lib.Sample.SampleBarcode, IG.Lib.Sample.SampleBarcodeSystem, IG.Lib.Sample.SampleCode, IG.Lib.Sample.SampleCodeDescription, IG.Lib.Sample.SampleCodeSystem, IG.Lib.XmlParser.SetMark(), IG.Lib.Sample.SideCode, IG.Lib.Sample.SideCodeDescription, IG.Lib.Sample.SideCodeSystem, IG.Lib.XmlParser.StepIn(), IG.Lib.XmlParser.StepOut(), IG.Lib.Patient.StreetAddress, IG.Lib.Author.StreetAddress, IG.Lib.Author.Suffix, IG.Lib.Patient.Surname, IG.Lib.Author.Surname, IG.Lib.Patient.TimeOfDeath, IG.Lib.Patient.TimeOfDeathStr, and IG.Lib.XmlParser.Value.
|
inlinevirtual |
Check correctness and consistency of data and creates a report on this.
rep | Object where error, warning and info reports are accumulated. |
Reimplemented from IG.Lib.ParsableXmlObject.
References IG.Lib.ParsableXmlObject.AccummulatedReport.AddError(), IG.Lib.ParsableXmlObject.AccummulatedReport.AddWarning(), IG.Lib.Sample.BisId, IG.Lib.Patient.BisId, IG.Lib.Author.BisId, IG.Lib.Author.BisIdOrganization, IG.Lib.Author.City, IG.Lib.Author.CountryCode, IG.Lib.Patient.IsAlive, IG.Lib.Patient.IsMale, IG.Lib.Patient.Name, IG.Lib.Author.Name, IG.Lib.Sample.NumPieces, IG.Lib.Author.PostalCode, IG.Lib.Sample.SampleCode, IG.Lib.Author.StreetAddress, IG.Lib.Patient.Surname, IG.Lib.Author.Surname, IG.Lib.DiagnosisText.Text, IG.Lib.AutopsyBase.Text, IG.Lib.Patient.TimeOfDeath, and IG.Lib.Patient.TimeOfDeathStr.
|
inline |
Returns BIS Order Id for this msg.
Referenced by IGTest.ProgramIGTest.ReceiveSpecimenObservationOrder().
|
inline |
References IG.Lib.AutopsyBase.ToString().
|
inlinevirtual |
Converts a msg to Xml and returns it.
Implements IG.Lib.ParsableXmlObject.
|
inlinestatic |
Prepares the observation order message to be sent to the Calypso web service as response to another observation order message, for the case where message is specified a string. Sender, receiver and responder are re-set consistently such that Labex becomes sender of the message, action is set to Nullify and comment is set in addition.
message | String containing the message. |
comment | Comment to be set on the message (if null then comment is not set, i.e. eventual current comment is preserved). |
Referenced by LabexBis.Calypso.SendOoNullifyToBis(), and IGTest.ProgramIGTest.TestMsgObservationOrderNullify().
|
inlinestatic |
Prepares the observation order message to be sent to the Calypso web service as response to another observation order message, for the case where message is specified a string. Sender, receiver and responder are re-set consistently such that Labex becomes sender of the message, action is set to Nullify and comment is set in addition.
msg | XmlDocument containing the message. |
comment | Comment to be set on the message (if null then comment is not set, i.e. eventual current comment is preserved). |
References IG.Lib.XmlUtilityBase.LoadXml().
|
inlinestatic |
Prepares the observation order message to be sent to the Calypso web service as response to another observation order message, for the case where message is specified a string. Sender, receiver and responder are re-set consistently such that Labex becomes sender of the message, action is set to Nullify and comment is set in addition.
msg | XmlDocument containing the message. |
comment | Comment to be set on the message (if null then comment is not set, i.e. eventual current comment is preserved). |
changed | Output flag indicating whether message contents has been changed by this function. |
References IG.Lib.XmlUtilityBase.LoadXml().
|
inlinestatic |
Prepares the observation order message to be sent to the Calypso web service as nullify request for another observation order message. Sender, receiver and responder are re-set consistently such that Labex becomes sender of the message, action is set to Nullify and comment is set in addition.
data | XmlBuilder containing the message. |
comment | Comment to be set on the message (if null then comment is not set, i.e. eventual current comment is preserved). |
References IG.Lib.MsgConst.Const, and IG.Lib.MsgConstCommon.LabexId.
|
inlinestatic |
Prepares the observation order message to be sent to the Calypso web service as nullify request for another observation order message. Sender, receiver and responder are re-set consistently such that Labex becomes sender of the message, action is set to Nullify and comment is set in addition.
data | XmlBuilder containing the message. |
comment | Comment to be set on the message (if null then comment is not set, i.e. eventual current comment is preserved). |
changed | Output flag indicating whether message contents has been changed by this function. |
References IG.Lib.MsgConst.Const, and IG.Lib.MsgConstCommon.LabexId.
|
inlinestatic |
Prepares the observation order message to be sent to the Calypso web service as response to another observation order message. Contents of the message is modified according to parameters.
message | String containing the message. |
action | Action to be set on the message (if OoAction.Unknown then message is not modified!) |
comment | Comment to be set on the message (if null then comment is not set, i.e. eventual current comment is preserved). |
sender | Sender to be set on the message. If null or empty string then sender is not modified on the message. |
receiver | Receiver to be set on the message. If null or empty string then receiver is not modified on the message. |
responder | Responder to be set on the message. If null or empty string then responder is not modified on the message. |
changed | Output flag indicating whether message contents has been changed by this function. |
|
inlinestatic |
Prepares the observation order message to be sent to the Calypso web service as response to another observation order message. Contents of the message is modified according to parameters.
msg | XmlDocument containing the message. |
action | Action to be set on the message (if OoAction.Unknown then message is not modified!) |
comment | Comment to be set on the message (if null then comment is not set, i.e. eventual current comment is preserved). |
sender | Sender to be set on the message. If null or empty string then sender is not modified on the message. |
receiver | Receiver to be set on the message. If null or empty string then receiver is not modified on the message. |
responder | Responder to be set on the message. If null or empty string then responder is not modified on the message. |
changed | Output flag indicating whether message contents has been changed by this function. |
References IG.Lib.XmlUtilityBase.LoadXml().
|
inlinestatic |
Prepares the observation order message to be sent to the Calypso web service as response to another observation order message. Contents of the message is modified according to parameters.
data | XmlBuilder containing the message. |
action | Action to be set on the message (if OoAction.Unknown then message is not modified!) |
comment | Comment to be set on the message (if null then comment is not set, i.e. eventual current comment is preserved). |
sender | Sender to be set on the message. If null or empty string then sender is not modified on the message. |
receiver | Receiver to be set on the message. If null or empty string then receiver is not modified on the message. |
responder | Responder to be set on the message. If null or empty string then responder is not modified on the message. |
changed | Output flag indicating whether message contents has been changed by this function. |
|
inlinestatic |
Sets the comment in the the Xml document containing the SpecimenObservationOrter message (this is contained in the "text" element of the message body)
data | XML builder containing the message where comment text is to be set. |
comment | The new comment to be set on the message. |
changed | Indicates whether the underlying XML message has been changed (i.e., whether the new comment replaced the old one in the message). Message is not changed only when the new message equals the old one or when an error occurs that prevents setting the message. |
|
inlinestatic |
Sets the receiver of the communication msg stored in msg to the specified receiver, and indicates through an output argument whether the receiver has been changed in msg. If the receiver stated in the msg already equals to the specified one then nothing changes in the msg and the output indicator becomes false.
msg | Message document in which receiver should be set. |
receiver | The new receiver of the msg. |
changed | Indicates whether the msg has been changed (i.e., whether the new receiver has been written to the msg). |
|
inlinestatic |
Sets the receiver of the communication msg stored in msg to the specified receiver, and indicates through an output argument whether the receiver has been changed in msg. If the receiver stated in the msg already equals to the specified one then nothing changes in the msg and the output indicator becomes false.
msg | Message in which receiver should be set. |
receiver | The new receiver of the msg. |
changed | Indicates whether the msg has been changed (i.e., whether the new receiver has been written to the msg). |
References IG.Lib.XmlUtilityBase.LoadXml().
|
inlinestatic |
Sets the action code of the Xml document containing the SpecimenObservationOrter message. Action code is set consistently in such a way that both dependent elements are set (also the "message code").
data | XML builder containing the message where action code is to be set. |
action | The new action code to be set on the message. |
changed | Indicates whether the msg has been changed (i.e., whether the new receiver has been written to the msg). |
List<Observation> IG.Lib.MsgObervationOrder.Observations = new List<Observation>() |
List<DiagnosisText> IG.Lib.MsgObervationOrder.DiagnosisTexts = new List<DiagnosisText>() |
List<DiagnosisCodeClass> IG.Lib.MsgObervationOrder.DiagnosisCodes = new List<DiagnosisCodeClass>() |
AutopsyDeathReason IG.Lib.MsgObervationOrder.AutopsyDeathReason = null |
Obduction declaration data:
AutopsyBasicDisease IG.Lib.MsgObervationOrder.AutopsyBasicDisease = null |
AutopsyAssociatedDisease IG.Lib.MsgObervationOrder.AutopsyAssociatedDisease = null |
AutopsyOtherInformation IG.Lib.MsgObervationOrder.AutopsyOtherInformation = null |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
get |
Gets number of samples.
|
get |
Indicates whether patient is alive.