IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
IG.Lib.DocFindings Class Reference

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

+ Inheritance diagram for IG.Lib.DocFindings:
+ Collaboration diagram for IG.Lib.DocFindings:

Public Member Functions

 DocFindings ()
 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...
 
void EnsureCompatibilityBeforeXmlGeneration ()
 Performs the necessary corrections such that other Labex tools will work with the generated XML. This is necessary e.g. to show findings, since methods for doing taht can not cope with absent XML fields. More...
 
override string ToString ()
 Returns a string describing contents of the current object. More...
 
override XmlDocument ToXml ()
 Converts a msg to Xml and returns it. More...
 
- Public Member Functions inherited from IG.Lib.MsgBase
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...
 
- Public Member Functions inherited from IG.Lib.ParsableXmlObject
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 bool IsRtf (string str)
 Returns true if str is a valid rich text, or false otherwise. More...
 
static string ToRtf (string str)
 Returns a rich text that corresponds to the string argument. If the argument is already a rich text then the unchanged argument is returned, otherwise it is wrapped in RTF markup. More...
 
static string ToText (string str)
 Returns plain text that corresponds to the string argument. If the argument is a rich text then then text is extracted from it and returned, otherwise the unchanged argument is returned. More...
 
- Static Public Member Functions inherited from IG.Lib.MsgBase
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

bool CompatibilityMode = false
 When this flag is set, operations are performed in compatible mode, such that results and inputs are compatible with the current state (this mainly refers to what Mirjam produced) More...
 
bool UsePlainText = false
 If true then plain text is used for fields that are otherwise in RTF. More...
 
ObservationType ObservationTypeFlag = ObservationType.Unknown
 
int Id = null
 Id of the Findings database rsr; this is null when Finding data is not read from the database. More...
 
bool XmlCreateInputFormat = false
 If true then XML is created for data in input format, which means that all fields can be read back when parding that XML. Default is false, in this case the generated XML is in output format more suitable for printing and jviewing (i.e. better for human reading), but in this form some fields (data and gender fields) can not be interpreted correctly when such a file is parsed. More...
 
bool XmlAddStyleSheetInstruction = true
 If true then processing instruction is added to the XML documents created from data that enables viewing in browser in a human readable form. More...
 
- Public Attributes inherited from IG.Lib.MsgBase
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
 
- Public Attributes inherited from IG.Lib.ParsableXmlObject
string XmlString = null
 

Properties

new FindingsConst Const [get]
 
string InnerDescription [get, set]
 Inner description. More...
 
string OuterDescription [get, set]
 Outer description. More...
 
string MacroDescription [get, set]
 Macro description. More...
 
string MicroDescription [get, set]
 Micro description. More...
 
string MacroDescription2 [get, set]
 Macro description. More...
 
string MicroDescription2 [get, set]
 Micro description. More...
 
string DiagnosisClinicalText [get, set]
 Free text of clinical diagnosis. More...
 
string DiagnosisPatoHistologicalText [get, set]
 Free text of patohistological diagnosis. More...
 
string TemporaryOpinion [get, set]
 Temporary opinion. More...
 
string Appendix [get, set]
 Appendix. More...
 
string Header [get, set]
 Header. More...
 
string Footer [get, set]
 Footer. More...
 
bool IsHistological [get]
 
bool IsCytological [get]
 
bool IsPatological [get]
 
string SignerPartString [get, private set]
 
string SignerFinishString [get, private set]
 
string SignerAdditionString [get, private set]
 
string SignTimePartString [get, private set]
 
string SignTimeFinishString [get, private set]
 
string SignTimeAdditionString [get, private set]
 
string SampleTimeOutputString [get]
 
string ReceptionTimeOutputString [get]
 
string CompletionTimeOutputString [get]
 
- Properties inherited from IG.Lib.MsgBase
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...
 
- Properties inherited from IG.Lib.ParsableXmlObject
virtual IReporter R [get]
 Reporter for this class. More...
 
XmlDocument Doc [get]
 Returns the XML document representing the msg. More...
 

Private Member Functions

string ConvertRtfField (string str)
 Aoutonomously converts text either to plain text or to RTF, dependent on the value of UsePlainText flag. More...
 
string ConvertRtfFieldSet (string str)
 Aoutonomously converts text either to plain text or to RTF, dependent on the value of UsePlainText flag. More...
 
string DateString (DateTime t)
 Converts date to a string for output. More...
 
string DateString (DateTime?t)
 Converts date to a string for output. More...
 

Static Private Member Functions

static string ToRtfSet (string str)
 Returns a rich text that corresponds to the string argument. If the argument is not a rich text then it is wrapped in RTF markup. If it is a rich text, the oridinal text is filtered through a rixh text box control in order to c correct eventual formatting errors. More...
 

Private Attributes

string _header = null
 
string _footer = null
 
string Heading = null
 
string OrderCode = null
 
string Orderer = null
 
string OrdererAddress = null
 
string SampleTimeString = null
 
string ReceptionTimeString = null
 
string CompletionTimeString = null
 
string _diagnosisClinicalText = null
 
string _innerDescription = null
 
string _outerDescription = null
 
string _macroDescription = null
 
string _microDescription = null
 
string _macroDescription2 = null
 
string _microDescription2 = null
 
string _temporaryOpinion = null
 
string _appendix = null
 
string _diagnosisPatoHistologicalText = null
 
string _signTimePart = null
 
string _signTimeFinish = null
 
string _signTimeAddition = null
 
FindingsPatient Patient = null
 
FindingsPhysician Physician = null
 
FindingsPhysician SignerPart = null
 
FindingsPhysician SignerFinish = null
 
FindingsPhysician SignerAddition = null
 
List< DiagnosisCodeClassDiagnosesClinical = new List<DiagnosisCodeClass>()
 
List< DiagnosisCodeClassDiagnosesPatoHistological = new List<DiagnosisCodeClass>()
 
List< RalatedObservationFormerFindings = new List<RalatedObservation>()
 
List< RalatedObservationParentObservations = new List<RalatedObservation>()
 
List< RalatedObservationChildObservations = new List<RalatedObservation>()
 
DateTime CreationTime = DateTime.Now
 
DateTime SampleTime = null
 
DateTime ReceptionTime = null
 
DateTime CompletionTime = null
 
int MsgEventId = null
 

Static Private Attributes

static object LockRtb = new object()
 
static RichTextBox Rtb = null
 

Additional Inherited Members

- Protected Attributes inherited from IG.Lib.ParsableXmlObject
XmlBuilder Data = new XmlBuilder()
 
- Static Protected Attributes inherited from IG.Lib.MsgBase
static string LabexIdLowercase = null
 

Detailed Description

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.

Constructor & Destructor Documentation

IG.Lib.DocFindings.DocFindings ( )
inline

Default constructor, sets the type information.

Member Function Documentation

override void IG.Lib.DocFindings.CheckConsistency ( AccummulatedReport  rep)
inlinevirtual

Check correctness and consistency of data and creates a report on this.

Parameters
repObject where error, warning and info reports are accumulated.

Reimplemented from IG.Lib.ParsableXmlObject.

References IG.Lib.ParsableXmlObject.AccummulatedReport.AddError(), and IG.Lib.ParsableXmlObject.AccummulatedReport.AddInfo().

void IG.Lib.DocFindings.EnsureCompatibilityBeforeXmlGeneration ( )
inline

Performs the necessary corrections such that other Labex tools will work with the generated XML. This is necessary e.g. to show findings, since methods for doing taht can not cope with absent XML fields.

References IG.Lib.DiagnosisCodeClass.Code, IG.Lib.DiagnosisCodeClass.CodeSystem, IG.Lib.DiagnosisCodeClass.Description, IG.Lib.Patient.IsMale, IG.Lib.Patient.Name, IG.Lib.RalatedObservation.ObservationReference, and IG.Lib.RalatedObservation.Remark.

static bool IG.Lib.DocFindings.IsRtf ( string  str)
inlinestatic

Returns true if str is a valid rich text, or false otherwise.

static string IG.Lib.DocFindings.ToRtf ( string  str)
inlinestatic

Returns a rich text that corresponds to the string argument. If the argument is already a rich text then the unchanged argument is returned, otherwise it is wrapped in RTF markup.

static string IG.Lib.DocFindings.ToText ( string  str)
inlinestatic

Returns plain text that corresponds to the string argument. If the argument is a rich text then then text is extracted from it and returned, otherwise the unchanged argument is returned.

string IG.Lib.DocFindings.ConvertRtfField ( string  str)
inlineprivate

Aoutonomously converts text either to plain text or to RTF, dependent on the value of UsePlainText flag.

static string IG.Lib.DocFindings.ToRtfSet ( string  str)
inlinestaticprivate

Returns a rich text that corresponds to the string argument. If the argument is not a rich text then it is wrapped in RTF markup. If it is a rich text, the oridinal text is filtered through a rixh text box control in order to c correct eventual formatting errors.

string IG.Lib.DocFindings.ConvertRtfFieldSet ( string  str)
inlineprivate

Aoutonomously converts text either to plain text or to RTF, dependent on the value of UsePlainText flag.

string IG.Lib.DocFindings.DateString ( DateTime  t)
inlineprivate

Converts date to a string for output.

string IG.Lib.DocFindings.DateString ( DateTime?  t)
inlineprivate

Converts date to a string for output.

override string IG.Lib.DocFindings.ToString ( )
inline

Returns a string describing contents of the current object.

References IG.Lib.FindingsPatient.ToString().

Member Data Documentation

object IG.Lib.DocFindings.LockRtb = new object()
staticprivate
RichTextBox IG.Lib.DocFindings.Rtb = null
staticprivate
bool IG.Lib.DocFindings.CompatibilityMode = false

When this flag is set, operations are performed in compatible mode, such that results and inputs are compatible with the current state (this mainly refers to what Mirjam produced)

ObservationType IG.Lib.DocFindings.ObservationTypeFlag = ObservationType.Unknown
string IG.Lib.DocFindings._header = null
private
string IG.Lib.DocFindings._footer = null
private
string IG.Lib.DocFindings.Heading = null
private
string IG.Lib.DocFindings.OrderCode = null
private
string IG.Lib.DocFindings.Orderer = null
private
string IG.Lib.DocFindings.OrdererAddress = null
private
string IG.Lib.DocFindings.SampleTimeString = null
private
string IG.Lib.DocFindings.ReceptionTimeString = null
private
string IG.Lib.DocFindings.CompletionTimeString = null
private
string IG.Lib.DocFindings._diagnosisClinicalText = null
private
string IG.Lib.DocFindings._innerDescription = null
private
string IG.Lib.DocFindings._outerDescription = null
private
string IG.Lib.DocFindings._macroDescription = null
private
string IG.Lib.DocFindings._microDescription = null
private
string IG.Lib.DocFindings._macroDescription2 = null
private
string IG.Lib.DocFindings._microDescription2 = null
private
string IG.Lib.DocFindings._temporaryOpinion = null
private
string IG.Lib.DocFindings._appendix = null
private
string IG.Lib.DocFindings._diagnosisPatoHistologicalText = null
private
string IG.Lib.DocFindings._signTimePart = null
private
string IG.Lib.DocFindings._signTimeFinish = null
private
string IG.Lib.DocFindings._signTimeAddition = null
private
FindingsPatient IG.Lib.DocFindings.Patient = null
private
FindingsPhysician IG.Lib.DocFindings.Physician = null
private
FindingsPhysician IG.Lib.DocFindings.SignerPart = null
private
FindingsPhysician IG.Lib.DocFindings.SignerFinish = null
private
FindingsPhysician IG.Lib.DocFindings.SignerAddition = null
private
List<DiagnosisCodeClass> IG.Lib.DocFindings.DiagnosesClinical = new List<DiagnosisCodeClass>()
private
List<DiagnosisCodeClass> IG.Lib.DocFindings.DiagnosesPatoHistological = new List<DiagnosisCodeClass>()
private
List<RalatedObservation> IG.Lib.DocFindings.FormerFindings = new List<RalatedObservation>()
private
List<RalatedObservation> IG.Lib.DocFindings.ParentObservations = new List<RalatedObservation>()
private
List<RalatedObservation> IG.Lib.DocFindings.ChildObservations = new List<RalatedObservation>()
private
DateTime IG.Lib.DocFindings.CreationTime = DateTime.Now
private
DateTime IG.Lib.DocFindings.SampleTime = null
private
DateTime IG.Lib.DocFindings.ReceptionTime = null
private
DateTime IG.Lib.DocFindings.CompletionTime = null
private
int IG.Lib.DocFindings.Id = null

Id of the Findings database rsr; this is null when Finding data is not read from the database.

int IG.Lib.DocFindings.MsgEventId = null
private
bool IG.Lib.DocFindings.XmlCreateInputFormat = false

If true then XML is created for data in input format, which means that all fields can be read back when parding that XML. Default is false, in this case the generated XML is in output format more suitable for printing and jviewing (i.e. better for human reading), but in this form some fields (data and gender fields) can not be interpreted correctly when such a file is parsed.

Referenced by IGTest.ProgramIGTest.TestFindings().

bool IG.Lib.DocFindings.XmlAddStyleSheetInstruction = true

If true then processing instruction is added to the XML documents created from data that enables viewing in browser in a human readable form.

Property Documentation

new FindingsConst IG.Lib.DocFindings.Const
getprotected
string IG.Lib.DocFindings.InnerDescription
getset

Inner description.

string IG.Lib.DocFindings.OuterDescription
getset

Outer description.

string IG.Lib.DocFindings.MicroDescription
getset

Micro description.

string IG.Lib.DocFindings.MacroDescription2
getset

Macro description.

string IG.Lib.DocFindings.MicroDescription2
getset

Micro description.

string IG.Lib.DocFindings.DiagnosisClinicalText
getset

Free text of clinical diagnosis.

string IG.Lib.DocFindings.DiagnosisPatoHistologicalText
getset

Free text of patohistological diagnosis.

string IG.Lib.DocFindings.TemporaryOpinion
getset

Temporary opinion.

string IG.Lib.DocFindings.Appendix
getset

Appendix.

string IG.Lib.DocFindings.Header
getset

Header.

string IG.Lib.DocFindings.Footer
getset

Footer.

bool IG.Lib.DocFindings.IsHistological
get
bool IG.Lib.DocFindings.IsCytological
get
bool IG.Lib.DocFindings.IsPatological
get
string IG.Lib.DocFindings.SignerPartString
getprivate set
string IG.Lib.DocFindings.SignerFinishString
getprivate set
string IG.Lib.DocFindings.SignerAdditionString
getprivate set
string IG.Lib.DocFindings.SignTimePartString
getprivate set
string IG.Lib.DocFindings.SignTimeFinishString
getprivate set
string IG.Lib.DocFindings.SignTimeAdditionString
getprivate set
string IG.Lib.DocFindings.SampleTimeOutputString
get
string IG.Lib.DocFindings.ReceptionTimeOutputString
get
string IG.Lib.DocFindings.CompletionTimeOutputString
get

The documentation for this class was generated from the following file: