private void button1_Click(object sender, EventArgs e) { string str = _rcvCtrl.GetXmlString(); HL7 msg = XObjectManager.CreateObject <HL7>(str); MessageBox.Show(this, msg.ToXMLString()); }
private int MIN_LINE_LENGHT_TO_SHOW_TOOLTIP = 5; //40; private void tvHL7_NodeMouseHover(object sender, TreeNodeMouseHoverEventArgs e) { if (TooltipEnable == true) { try { TreenodeHL7Base node = (TreenodeHL7Base)e.Node; //activeTooltipnode = (TreenodeHL7Base)e.Node; string strTmp = node._MsgNode.ErrorMsg; if (!string.IsNullOrEmpty(strTmp)) { strTmp += "\r\n"; // Legger til lnjeskift hvis noden har error status. } strTmp += HL7.InsertLinebreaks(node._MsgNode.Value, TOOLTIP_LINE_LENGTH_BEFORE_LINEBREAK); if (strTmp.Length > MIN_LINE_LENGHT_TO_SHOW_TOOLTIP) { toolTipTreenode.RemoveAll(); toolTipTreenode.SetToolTip(tvHL7, strTmp); // MsgNode.Value); } else { toolTipTreenode.RemoveAll(); } } catch (Exception ex) { //MessageBox.Show("Exception (Ikke kritisk): " + ex.Message + "\r\n\n" + ex.StackTrace, "Internal warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } }
private void buttonGenerateXML_Click(object sender, EventArgs e) { HL7 msg = new HL7(); msg.MSH = new MSH() { MessageControlID = "102108", SendingApplication = new EI() { EntityIdentifier = "RISMALL_ADT" }, SendingFacility = new EI() { EntityIdentifier = "MESA" }, ReceivingApplication = new EI() { EntityIdentifier = "RIS_CSH_GC" }, ReceivingFacility = new EI() { EntityIdentifier = "CSH" }, MessageType = new MSG() { MessageCode = "ADT", TriggerEvent = "A01", MessageStructure = "ADT_A01" }, ProcessingID = new PT() { ProcessingID = "P" }, VersionID = new VID() { VersionID = "2.3.1" }, }; string str = msg.ToXMLString(HL7ObjectsHelper.XmlNamespace); _rcvCtrl.Open("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" + str); }