Ejemplo n.º 1
0
 public override void tearDownQuery(MySession session)
 {
     foreach (AbstractConnection cxn in session.ConnectionSet.Connections.Values)
     {
         ConnectionPools.getInstance().checkIn(cxn);
     }
 }
Ejemplo n.º 2
0
 public override void tearDownQuery(MySession session)
 {
     if (Convert.ToBoolean(session.MdwsConfiguration.AllConfigs[MdwsConfigConstants.CONNECTION_POOL_CONFIG_SECTION][MdwsConfigConstants.CONNECTION_POOLING]))
     {
         SessionMgr.getInstance().returnConnections(session);
     }
 }
Ejemplo n.º 3
0
 public override void setUpQuery(MySession session)
 {
     // TODO - need to fix incomplete implementation of query templates before we can use connection pool w/ soap (i.e. baseservice calls)
     //if (Convert.ToBoolean(session.MdwsConfiguration.AllConfigs[MdwsConfigConstants.CONNECTION_POOL_CONFIG_SECTION][MdwsConfigConstants.CONNECTION_POOLING]))
     //{
     //    SessionMgr.getInstance().setConnections(session);
     //}
 }
Ejemplo n.º 4
0
 public override void setUpQuery(MySession session)
 {
     if (base.QuerySites == null || base.QuerySites.Count == 0)
     {
         throw new ArgumentException("No sites specified for stateless query!");
     }
     session.ConnectionSet = new mdo.dao.ConnectionSet();
     foreach (String site in base.QuerySites)
     {
         session.ConnectionSet.Add((AbstractConnection)ConnectionPools.getInstance().checkOutAlive(site));
     }
 }
Ejemplo n.º 5
0
 public virtual object execute(MySession session, Delegate theMethod, object[] methodArgs)
 {
     setUpQuery(session);
     object result = null;
     try
     {
         result = query(theMethod, methodArgs);
     }
     catch (Exception)
     {
         throw;
     }
     finally
     {
         tearDownQuery(session);
     }
     return result;
 }
Ejemplo n.º 6
0
        public BaseService()
        {
            // If not Http request has been made yet Session is null
            // This happens before the Startup page is displayed
            if (HttpContext.Current.Session == null)
            {
                return;
            }

            // At this point a request has been made to a web service page
            if (HttpContext.Current.Session["MySession"] == null)
            {
                MySession = new MySession(this.GetType().Name);
                ApplicationSessions sessions = (ApplicationSessions)Application["APPLICATION_SESSIONS"];
                Application.Lock();
                sessions.ConfigurationSettings = MySession.MdwsConfiguration;
                Application.UnLock();
            }
        }
Ejemplo n.º 7
0
 public VitalsLib(MySession mySession)
 {
     this.mySession = mySession;
 }
Ejemplo n.º 8
0
 public LabsLib(MySession mySession)
 {
     this.mySession = mySession;
 }
Ejemplo n.º 9
0
 public TaggedTextArray getNhinData(string types)
 {
     return((TaggedTextArray)MySession.execute("ClinicalLib", "getNhinData", new object[] { types }));
 }
Ejemplo n.º 10
0
 public NoteLib(MySession mySession)
 {
     this._mySession = mySession;
     this._api = new NoteApi();
 }
Ejemplo n.º 11
0
 /// <summary>
 /// Only constructor requires a MySession.
 /// </summary>
 /// <param name="mySession">Holds credentials, primary permission, default visit method</param>
 public AccountLib(MySession mySession)
 {
     this.mySession = mySession;
 }
Ejemplo n.º 12
0
 public SitesLib(MySession mySession)
 {
     this.mySession = mySession;
 }
Ejemplo n.º 13
0
 public PatientLib(MySession mySession)
 {
     this.mySession = mySession;
 }
Ejemplo n.º 14
0
 public MedsLib(MySession mySession)
 {
     this.mySession = mySession;
 }
Ejemplo n.º 15
0
 public LocationLib(MySession mySession)
 {
     this.mySession = mySession;
 }
Ejemplo n.º 16
0
 public QuestionnaireLib(MySession theSession)
 {
     mySession = theSession;
 }
Ejemplo n.º 17
0
 public ConnectionLib(MySession mySession)
 {
     this.mySession = mySession;
 }
Ejemplo n.º 18
0
        internal void addHomeData(Patient patient)
        {
            if (patient == null)
            {
                return;
            }
            try
            {
                Site site = mySession.SiteTable.getSite(patient.CmorSiteId);
                DataSource src = site.getDataSourceByModality("HIS");

                MySession newMySession = new MySession(mySession.FacadeName);
                AccountLib accountLib = new AccountLib(newMySession);
                UserTO visitUser = accountLib.visitAndAuthorize(mySession.MdwsConfiguration.AllConfigs[ConfigFileConstants.BSE_CONFIG_SECTION][MdwsConfigConstants.SERVICE_ACCOUNT_PASSWORD],
                    patient.CmorSiteId, mySession.ConnectionSet.BaseConnection.DataSource.SiteId.Id, mySession.User.Name.LastNameFirst,
                    mySession.User.Uid, mySession.User.SSN.toString(), "OR CPRS GUI CHART");

                PatientApi patientApi = new PatientApi();
                patient.LocalPid = patientApi.getLocalPid(newMySession.ConnectionSet.BaseConnection, patient.MpiPid);
                patientApi.addHomeDate(newMySession.ConnectionSet.BaseConnection, patient);
                newMySession.ConnectionSet.BaseConnection.disconnect();
            }
            catch (Exception)
            {
                // just pass back patient unchanged
            }
        }
Ejemplo n.º 19
0
 public PatientLib(MySession mySession)
 {
     this.mySession = mySession;
 }
Ejemplo n.º 20
0
 public MhvLib(MySession mySession)
 {
     this.mySession = mySession;
 }
Ejemplo n.º 21
0
 public EncounterLib(MySession mySession)
 {
     this.mySession = mySession;
 }
Ejemplo n.º 22
0
 public static string isAuthorizedConnection(MySession mySession)
 {
     return isAuthorizedConnection(mySession, null);
 }
Ejemplo n.º 23
0
 public abstract void tearDownQuery(MySession session);
Ejemplo n.º 24
0
        public static string isAuthorizedConnection(MySession mySession, string sitecode)
        {
            string msg = sessionHasAuthorizedConnection(mySession);
            if (msg != "OK")
            {
                return msg;
            }

            // At this point we know there is a session, it has a connection manager, the
            // connection manager has a logged in site and the logged in site has a user ID.
            if (sitecode == null)   // null sitecode means caller had no sitecode arg
            {
                sitecode = mySession.ConnectionSet.BaseSiteId;
            }
            if (sitecode == "")
            {
                return "Missing sitecode";
            }
            if (mySession.SiteTable == null)
            {
                return "No site table";
            }
            if (mySession.SiteTable.getSite(sitecode) == null)
            {
                return "No such site in site table";
            }
            //if (!mySession.cxns.IsAuthorizedForSite(sitecode))
            //{
            //    return "No authorized connection for this site";
            //}
            return "OK";
        }
Ejemplo n.º 25
0
 public EncounterLib(MySession mySession)
 {
     this.mySession = mySession;
 }
Ejemplo n.º 26
0
 internal static string sessionHasAuthorizedConnection(MySession mySession)
 {
     if (mySession == null)
     {
         return "No session";
     }
     if (mySession.ConnectionSet == null)
     {
         return "There are no open connections";
     }
     if (mySession.ConnectionSet.BaseConnection is mdo.dao.sql.cdw.CdwConnection)
     {
         return "OK";
     }
     if (!mySession.ConnectionSet.HasBaseConnection ||
         StringUtils.isEmpty(mySession.Credentials.AuthenticationToken))
     {
         return "There is no logged in connection";
     }
     return "OK";
 }
Ejemplo n.º 27
0
 public ClinicalRemindersLib(MySession mySession)
 {
     this.mySession = mySession;
 }
Ejemplo n.º 28
0
 public TextArray getReminderReportTemplates()
 {
     return((TextArray)MySession.execute("ClinicalRemindersLib", "getReminderReportTemplates", new object[] { }));
 }
Ejemplo n.º 29
0
 public SecureMessageLib(MySession mySession)
 {
     _mySession = mySession;
 }
Ejemplo n.º 30
0
 public TaggedTextArray getActiveReminderReports()
 {
     return((TaggedTextArray)MySession.execute("ClinicalRemindersLib", "getActiveReminderReports", new object[] { }));
 }
Ejemplo n.º 31
0
 public SchedulingLib(MySession mySession)
 {
     _mySession = mySession;
 }
Ejemplo n.º 32
0
 public ReminderReportPatientListTO getPatientListForReminderReport(string rptId)
 {
     return((ReminderReportPatientListTO)MySession.execute("ClinicalRemindersLib", "getPatientListForReminderReport", new object[] { rptId }));
 }
Ejemplo n.º 33
0
 public UserLib(MySession mySession)
 {
     this.mySession = mySession;
 }
Ejemplo n.º 34
0
 public TaggedText getPcpForPatient(string pid)
 {
     return((TaggedText)MySession.execute("PatientLib", "getPcpForPatient", new object[] { pid }));
 }
Ejemplo n.º 35
0
 public DataSourceArray connect(string sitelist)
 {
     return((DataSourceArray)MySession.execute("ConnectionLib", "connectToLoginSite", new object[] { sitelist }));
 }
Ejemplo n.º 36
0
 public TaggedTextArray getSitesForStation()
 {
     return((TaggedTextArray)MySession.execute("LocationLib", "getSitesForStation", new object[] { }));
 }
Ejemplo n.º 37
0
 public AthenaLib(MySession mySession)
 {
     this.mySession = mySession;
 }
Ejemplo n.º 38
0
 public TaggedTextArray getClinicsByName(string name)
 {
     return((TaggedTextArray)MySession.execute("LocationLib", "getClinicsByName", new object[] { name }));
 }
Ejemplo n.º 39
0
 public abstract void setUpQuery(MySession session);
Ejemplo n.º 40
0
 public TaggedTextArray getOrderableItemsByName(string name)
 {
     return((TaggedTextArray)MySession.execute("OrdersLib", "getOrderableItemsByName", new object[] { name }));
 }
Ejemplo n.º 41
0
 public static string isAuthorizedConnection(MySession mySession)
 {
     return(isAuthorizedConnection(mySession, null));
 }
Ejemplo n.º 42
0
 public TextTO getOrderStatusForPatient(string pid, string orderableItemId)
 {
     return((TextTO)MySession.execute("OrdersLib", "getOrderStatusForPatient", new object[] { pid, orderableItemId }));
 }
Ejemplo n.º 43
0
 public ConnectionLib(MySession mySession)
 {
     this.mySession = mySession;
 }
Ejemplo n.º 44
0
 public TaggedTextArray getOrderDialogsForDisplayGroup(string displayGroupId)
 {
     return((TaggedTextArray)MySession.execute("OrdersLib", "getOrderDialogsForDisplayGroup", new object[] { displayGroupId }));
 }
Ejemplo n.º 45
0
 public MhvLib(MySession mySession)
 {
     this.mySession = mySession;
 }
Ejemplo n.º 46
0
 public OrderDialogItemArray getOrderDialogItems(string dialogId)
 {
     return((OrderDialogItemArray)MySession.execute("OrdersLib", "getOrderDialogItems", new object[] { dialogId }));
 }
Ejemplo n.º 47
0
 public QuestionnaireLib(MySession theSession)
 {
     mySession = theSession;
 }
Ejemplo n.º 48
0
 public RegionTO getVISN(string regionId)
 {
     return((RegionTO)MySession.execute("SitesLib", "getVISN", new object[] { regionId }));
 }
Ejemplo n.º 49
0
 public abstract void setUpQuery(MySession session);
Ejemplo n.º 50
0
 public TaggedTextArray getUsersWithOption(string optionName)
 {
     return((TaggedTextArray)MySession.execute("UserLib", "getUsersWithOption", new object[] { optionName }));
 }
Ejemplo n.º 51
0
 public SitesLib(MySession mySession)
 {
     this.mySession = mySession;
 }
Ejemplo n.º 52
0
 public ClinicalLib(MySession mySession)
 {
     this.mySession = mySession;
 }
Ejemplo n.º 53
0
 public TbiLib(MySession mySession)
 {
     this.mySession = mySession;
 }
Ejemplo n.º 54
0
 public UserSecurityKeyArray getUserSecurityKeys(string uid)
 {
     return((UserSecurityKeyArray)MySession.execute("UserLib", "getUserSecurityKeys", new object[] { uid }));
 }
Ejemplo n.º 55
0
 public ClaimsLib(MySession mySession)
 {
     this.mySession = mySession;
 }
Ejemplo n.º 56
0
 public TaggedMentalHealthInstrumentAdministrationArrays getMentalHealthInstrumentsForPatient()
 {
     return((TaggedMentalHealthInstrumentAdministrationArrays)MySession.execute("ClinicalLib", "getMentalHealthInstrumentsForPatient", new object[] { }));
 }
Ejemplo n.º 57
0
 public NumiLib(MySession mySession)
 {
     this.mySession = mySession;
 }
Ejemplo n.º 58
0
 public MentalHealthInstrumentResultSetTO getMentalHealthInstrumentResultSet(string sitecode, string administrationId)
 {
     return((MentalHealthInstrumentResultSetTO)MySession.execute("ClinicalLib", "getMentalHealthInstrumentResultSet", new object[] { sitecode, administrationId }));
 }
Ejemplo n.º 59
0
 public BoolTO userHasPermission(string uid, string permissionName)
 {
     return((BoolTO)MySession.execute("UserLib", "hasPermission", new object[] { uid, permissionName }));
 }
Ejemplo n.º 60
0
 public abstract void tearDownQuery(MySession session);