Ignore:
Timestamp:
May 8, 2011, 5:17:53 AM (13 years ago)
Author:
Sam Habiel
Message:

Absorbed all changed from Radiology Support branch.
Patient and Provider classes now serializable to address new bug: Availablity slots cannot be saved b/c these classes are not serializable.

Location:
Scheduling/trunk/cs/bsdx0200GUISourceCode
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Scheduling/trunk/cs/bsdx0200GUISourceCode

    • Property svn:mergeinfo set to (toggle deleted branches)
      /Scheduling/branches/Radiology-Support/cs/bsdx0200GUISourceCode1134-1171
  • Scheduling/trunk/cs/bsdx0200GUISourceCode/DAL.cs

    r1117 r1174  
    1 using System;
     1/* Licensed under LGPL */
     2
     3using System;
    24using System.Collections.Generic;
    35using System.Linq;
     
    187189
    188190        /// <summary>
     191        /// Gets All radiology exams for a Patient in a specific hospital location
     192        /// </summary>
     193        /// <param name="DFN"></param>
     194        /// <param name="SCIEN">Hospital Location IEN</param>
     195        /// <returns>Generic List of type RadiologyExam</returns>
     196        public List<RadiologyExam> GetRadiologyExamsForPatientinHL(int DFN, int SCIEN)
     197        {
     198            string cmd = string.Format("BSDX GET RAD EXAM FOR PT^{0}^{1}", DFN, SCIEN);
     199            DataTable tbl = RPMSDataTable(cmd, "");
     200            return (from row in tbl.AsEnumerable()
     201                    select new RadiologyExam
     202                    {
     203                        IEN = row.Field<int>("BMXIEN"),
     204                        Status = row.Field<string>("STATUS"),
     205                        Procedure = row.Field<string>("PROCEDURE"),
     206                        RequestDate = row.Field<DateTime>("REQUEST_DATE")
     207                    }).ToList();
     208        }
     209
     210        /// <summary>
     211        /// Schedules a Single Radiology Exam for a patient
     212        /// </summary>
     213        /// <param name="DFN"></param>
     214        /// <param name="examIEN">IEN of exam in 75.1 (RAD/NUC MED ORDERS) file</param>
     215        /// <param name="dStart">Start DateTime of appointment</param>
     216        /// <returns>should always return true</returns>
     217        public bool ScheduleRadiologyExam(int DFN, int examIEN, DateTime dStart)
     218        {
     219            string fmStartDate = FMDateTime.Create(dStart).FMDateString;
     220            string result = _thisConnection.bmxNetLib.TransmitRPC("BSDX SCHEDULE RAD EXAM", string.Format("{0}^{1}^{2}", DFN, examIEN, fmStartDate));
     221            return result == "1" ? true : false;
     222        }
     223
     224        /// <summary>
     225        /// Put the radiology exam on Hold because the appointment has been cancelled for it
     226        /// </summary>
     227        /// <param name="DFN"></param>
     228        /// <param name="examIEN">IEN of exam in 75.1 (RAD/NUC MED ORDERS) file</param>
     229        /// <returns>should always return true</returns>
     230        public bool CancelRadiologyExam(int DFN, int examIEN)
     231        {
     232            string result = _thisConnection.bmxNetLib.TransmitRPC("BSDX HOLD RAD EXAM", string.Format("{0}^{1}", DFN, examIEN));
     233            return result == "1" ? true : false;
     234        }
     235
     236        /// <summary>
    189237        /// Save User Preference in DB For Printing Routing Slip
    190238        /// Uses Parameter BSDX AUTO PRINT RS
Note: See TracChangeset for help on using the changeset viewer.