예제 #1
0
        private void butShowXhtml_Click(object sender, EventArgs e)
        {
            string ccd = "";

            try {
                FormEhrExportCCD FormEEC = new FormEhrExportCCD(PatCur);
                FormEEC.ShowDialog();
                if (FormEEC.DialogResult == DialogResult.OK)
                {
                    ccd = FormEEC.CCD;
                }
                else
                {
                    return;
                }
            }
            catch (Exception ex) {
                MessageBox.Show(ex.Message);
                return;
            }
            bool didPrint = FormEhrSummaryOfCare.DisplayCCD(ccd);

            if (didPrint)
            {
                //we are printing a ccd so add new measure event.
                EhrMeasureEvent measureEvent = new EhrMeasureEvent();
                measureEvent.DateTEvent = DateTime.Now;
                measureEvent.EventType  = EhrMeasureEventType.ClinicalSummaryProvidedToPt;
                measureEvent.PatNum     = PatCur.PatNum;
                EhrMeasureEvents.Insert(measureEvent);
                FillGridEHRMeasureEvents();
            }
        }
예제 #2
0
        private void butShowXhtml_Click(object sender, EventArgs e)
        {
            string ccd = "";

            try {
                ccd = EhrCCD.GenerateElectronicCopy(PatCur);
            }
            catch (Exception ex) {
                MessageBox.Show(ex.Message);
                return;
            }
            FormEhrSummaryOfCare.DisplayCCD(ccd);
        }
예제 #3
0
        private void OpenFile()
        {
            EmailAttach emailAttach       = _listEmailAttachDisplayed[gridAttachments.SelectedIndices[0]];
            string      strFilePathAttach = FileAtoZ.CombinePaths(EmailAttaches.GetAttachPath(), emailAttach.ActualFileName);

            try {
                if (EhrCCD.IsCcdEmailAttachment(emailAttach))
                {
                    string strTextXml = FileAtoZ.ReadAllText(strFilePathAttach);
                    if (EhrCCD.IsCCD(strTextXml))
                    {
                        Patient patEmail = null;                      //Will be null for most email messages.
                        if (_emailMessage.SentOrReceived == EmailSentOrReceived.ReadDirect || _emailMessage.SentOrReceived == EmailSentOrReceived.ReceivedDirect)
                        {
                            patEmail = _patCur;                          //Only allow reconcile if received via Direct.
                        }
                        string strAlterateFilPathXslCCD = "";
                        //Try to find a corresponding stylesheet. This will only be used in the event that the default stylesheet cannot be loaded from the EHR dll.
                        for (int i = 0; i < _listEmailAttachDisplayed.Count; i++)
                        {
                            if (Path.GetExtension(_listEmailAttachDisplayed[i].ActualFileName).ToLower() == ".xsl")
                            {
                                strAlterateFilPathXslCCD = FileAtoZ.CombinePaths(EmailAttaches.GetAttachPath(), _listEmailAttachDisplayed[i].ActualFileName);
                                break;
                            }
                        }
                        FormEhrSummaryOfCare.DisplayCCD(strTextXml, patEmail, strAlterateFilPathXslCCD);
                        return;
                    }
                }
                else if (IsORU_R01message(strFilePathAttach))
                {
                    if (DataConnection.DBtype == DatabaseType.Oracle)
                    {
                        MsgBox.Show(this, "Labs not supported with Oracle.  Opening raw file instead.");
                    }
                    else
                    {
                        FormEhrLabOrderImport FormELOI = new FormEhrLabOrderImport();
                        FormELOI.Hl7LabMessage = FileAtoZ.ReadAllText(strFilePathAttach);
                        FormELOI.ShowDialog();
                        return;
                    }
                }
                FileAtoZ.OpenFile(FileAtoZ.CombinePaths(EmailAttaches.GetAttachPath(), emailAttach.ActualFileName), emailAttach.DisplayedFileName);
            }
            catch (Exception ex) {
                MessageBox.Show(ex.Message);
            }
        }