Inheritance: DdrQuery
Ejemplo n.º 1
0
        public string xusHash(string s)
        {
            DdrLister query = buildXusHashQuery(s);

            string[] response = query.execute();
            return(StringUtils.piece(response[0], StringUtils.CARET, 2));
        }
Ejemplo n.º 2
0
        public string[] ddrLister(
            string file,
            string iens,
            string flds,
            string flags,
            string maxRex,
            string from,
            string part,
            string xref,
            string screen,
            string identifier
            )
        {
            DdrLister query = new DdrLister(cxn);

            query.File   = file;
            query.Iens   = iens;
            query.Fields = flds;
            query.Flags  = flags;
            query.Max    = maxRex;
            query.From   = from;
            query.Part   = part;
            query.Xref   = xref;
            query.Screen = screen;
            query.Id     = identifier;
            String[] rtn = query.execute();
            return(rtn);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Currently this dao method is not in use.  Unit test written for this DAO method.
        /// </summary>
        /// <param name="dfn"></param>
        /// <param name="timestamp"></param>
        /// <returns></returns>
        internal ArrayList getExams(string dfn, string timestamp)
        {
            DdrLister query = buildGetExamsQuery(dfn, timestamp);

            string[] response = query.execute();
            return(toExamArrayList(response));
        }
Ejemplo n.º 4
0
        public ProstheticClaim[] getProstheticClaimsForClaimant(string dfn)
        {
            DdrLister query = buildGetProstheticClaimsForPatientQuery(dfn);

            string[] response = query.execute();
            return(toProstheticClaims(response));
        }
Ejemplo n.º 5
0
        public void getRecords(AbstractConnection cxn)
        {
            DdrLister query = buildGetRecordsQuery(cxn);

            string[] response = query.execute();
            toRecords(cxn, response);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Fetch the complications listed in Vista file 78.1 - COMPLICATION TYPES
        /// </summary>
        /// <returns></returns>
        public Dictionary <String, String> getComplications()
        {
            DdrLister request = buildGetComplicationsRequest();

            String[] response = request.execute();
            return(toComplications(response));
        }
        internal DdrLister buildFileQuery(VistaFile file)
        {
            DdrLister query = new DdrLister(myCxn);

            query.File   = file.FileNumber;
            query.Fields = file.getFieldString();
            query.Flags  = "IP";
            query.Xref   = "#";
            return(query);
        }
Ejemplo n.º 8
0
        internal DdrLister buildGetOptionRpcsQuery(string optIEN)
        {
            DdrLister query = new DdrLister(cxn);

            query.File   = "19.05";
            query.Iens   = "," + optIEN + ",";
            query.Fields = ".01";
            query.Flags  = "IP";
            return(query);
        }
 public StringDictionary getLookupTable(string fileNum)
 {
     if (!lookupTables.ContainsKey(fileNum))
     {
         DdrLister query    = buildIenNameQuery(fileNum);
         string[]  response = query.execute();
         lookupTables.Add(fileNum, VistaUtils.toStringDictionary(response));
     }
     return((StringDictionary)lookupTables[fileNum]);
 }
Ejemplo n.º 10
0
 internal DdrLister buildGetSubrecordsQuery(AbstractConnection cxn, string ien)
 {
     DdrLister query = new DdrLister(cxn);
     query.File = FILE_NUMBER;
     query.Iens = ',' + ien + ',';
     query.Fields = ".01;.02;.03;.04";
     query.Flags = "IP";
     query.Xref = "#";
     return query;
 }
        internal DdrLister buildIenNameQuery(string fileNum)
        {
            DdrLister query = new DdrLister(myCxn);

            query.File   = fileNum;
            query.Fields = ".01";
            query.Flags  = "IP";
            query.Xref   = "#";
            return(query);
        }
Ejemplo n.º 12
0
        internal DdrLister buildGetRecordsQuery(AbstractConnection cxn)
        {
            DdrLister query = new DdrLister(cxn);

            query.File   = FileNumber;
            query.Fields = ".01;.02;.03";
            query.Flags  = "IP";
            query.Xref   = "#";
            return(query);
        }
Ejemplo n.º 13
0
        public IList <ImagingExam> getExamsByPatient(string dfn)
        {
            DdrLister query = buildGetExamsListQuery(dfn);

            string[]            response = query.execute();
            IList <ImagingExam> examList = toExamListFromDDR(response);

            supplementExamDetails(dfn, examList);
            return(examList);
        }
Ejemplo n.º 14
0
        internal string setAuthenticationTokenInVista(string token, string duz)
        {
            DdrLister query = buildSetAuthenticationTokenInVistaQuery(token, duz);

            string[] response = query.execute();
            if (response.Length != 1)
            {
                throw new MdoException(MdoExceptionCode.DATA_UNEXPECTED_FORMAT);
            }
            return(response[0]);
        }
Ejemplo n.º 15
0
        internal DdrLister buildGetSubrecordsQuery(AbstractConnection cxn, string ien)
        {
            DdrLister query = new DdrLister(cxn);

            query.File   = FILE_NUMBER;
            query.Iens   = ',' + ien + ',';
            query.Fields = ".01;.02;.03;.04";
            query.Flags  = "IP";
            query.Xref   = "#";
            return(query);
        }
 public Dictionary <string, object> getFile(string fileNum)
 {
     if (!files.ContainsKey(fileNum))
     {
         VistaFile theFile  = (VistaFile)fileDefs[fileNum];
         DdrLister query    = buildFileQuery(theFile);
         string[]  response = query.execute();
         files.Add(fileNum, toMdo(response, theFile));
     }
     return((Dictionary <string, object>)files[fileNum]);
 }
Ejemplo n.º 17
0
        /// <summary>
        /// Loop through exams and make call to DDR GETS ENTRY DATA to
        /// supplement the list of imaging exams with data from subfile 70/70.02/70.03 - EXAMINATIONS
        /// </summary>
        /// <param name="exams"></param>
        internal void supplementExamDetails(String patientId, IList <ImagingExam> exams)
        {
            foreach (ImagingExam exam in exams)
            {
                DdrLister examDetailsRequest = buildGetExamDetailsRequest(patientId, exam);
                String[]  response           = examDetailsRequest.execute();

                //Dictionary<String, String> details = new DdrGetsEntry(null).convertToFieldValueDictionary(examDetailsRequest.execute());
                supplementExamDetailsWithDdrResult(patientId, exam, response);
            }
        }
Ejemplo n.º 18
0
        /// <summary>
        /// .01 - Exam Date
        /// 2 - Type of Imaging (pointer to file 79.2 - IMAGING TYPE)
        /// 3 - Hospital Division (pointer to file 79 - RAD/NUC MED DIVISION)
        /// 4 - Imaging Location (pointer to file 79.1 - IMAGING LOCATION)
        /// 5 - Exam Set (1/0 - yes/no)
        /// </summary>
        /// <param name="dfn"></param>
        /// <returns></returns>
        internal DdrLister buildGetExamsListQuery(string dfn)
        {
            DdrLister result = new DdrLister(cxn);

            result.File   = "70.02";
            result.Iens   = "," + dfn + ",";
            result.Fields = ".01;2;3;4;5";
            result.Flags  = "IP";
            result.Xref   = "#";
            return(result);
        }
Ejemplo n.º 19
0
        internal DdrLister buildGetExamsQuery(string dfn, string timestamp)
        {
            DdrLister result = new DdrLister(cxn);

            result.File   = "70.03";
            result.Iens   = "," + timestamp + "," + dfn + ",";
            result.Fields = ".01;2;3;17";
            result.Flags  = "IP";
            result.Xref   = "";
            return(result);
        }
Ejemplo n.º 20
0
        internal DdrLister buildXusHashQuery(string s)
        {
            DdrLister query = new DdrLister(cxn);

            query.File   = "200";
            query.Flags  = "IP";
            query.Fields = "";
            query.Max    = "1";
            query.Id     = "S X=$$EN^XUSHSH(\"" + s + "\") D EN^DDIOL(X)";
            return(query);
        }
Ejemplo n.º 21
0
        internal MdoQuery buildGetDfnFromLrdfnRequest(string lrdfn)
        {
            DdrLister ddr = new DdrLister(this.cxn);

            ddr.File   = "2";
            ddr.Fields = ".01";
            ddr.Flags  = "IP";
            ddr.Max    = "1";
            ddr.Xref   = "#";
            ddr.Screen = String.Concat("I $P($G(^(\"LR\")),U,1)=", lrdfn);
            return(ddr.buildRequest());
        }
Ejemplo n.º 22
0
        internal MdoQuery buildGetAllChemHemTestsQuery(String lrDfn)
        {
            DdrLister ddr = new DdrLister(this.cxn);

            ddr.Fields = "";
            ddr.File   = "63.04";
            ddr.Flags  = "IP";
            ddr.Iens   = String.Concat(",", lrDfn, ",");
            ddr.Xref   = "#";
            ddr.Id     = "";
            return(ddr.buildRequest());
        }
Ejemplo n.º 23
0
        internal DdrLister buildGetAuthenticationTokenFromVista2Query()
        {
            DdrLister query = new DdrLister(Cxn);

            query.File   = "200";
            query.Fields = ".01";
            query.Flags  = "IP";
            query.Max    = "1";
            query.Xref   = "#";
            query.Id     = "D EN^DDIOL($$HANDLE^XUSRB4(\"XUSBSE\",1))";
            return(query);
        }
Ejemplo n.º 24
0
        internal DdrLister buildGetClinicAvailabilityRequestDdr(string clinicIen)
        {
            DdrLister request = new DdrLister(this.cxn);

            request.File   = "44.005"; // PATTERN subfile of the HOSPITAL LOCATION file
            request.Fields = ".01;1;2;3";
            request.Flags  = "IP";
            //request.From = "3120722";
            request.Iens = "," + clinicIen + ",";
            request.Max  = "30";
            request.Xref = "#";
            return(request);
        }
Ejemplo n.º 25
0
        internal DdrLister buildSetAuthenticationTokenInVistaQuery(string token, string duz)
        {
            DdrLister query = new DdrLister(Cxn);

            query.File   = "200";
            query.Fields = ".01";
            query.Flags  = "IP";
            query.Max    = "1";
            query.Xref   = "#";
            query.Id     = "S ^XTMP(\"" + token + "\",1)=$$GET^XUESSO1(" + duz + ")";
            //"D EN^DDIOL(\"^XMTP(\"" + token + "\",1)";
            return(query);
        }
Ejemplo n.º 26
0
        internal DdrLister buildGetProstheticClaimsForPatientQuery(string dfn)
        {
            DdrLister query = new DdrLister(cxn);

            query.File   = "356";
            query.Fields = ".02;.02E;.06;.09;1.01;1.03";
            query.Flags  = "IP";
            query.Xref   = "C";
            query.From   = VistaUtils.adjustForNumericSearch(dfn);
            query.Part   = dfn;
            query.Screen = "I $P(^(0),U,9)'=\"\"";
            return(query);
        }
Ejemplo n.º 27
0
        internal IndexedHashtable getChemHemSpecimens(string dfn, string fromDate, string toDate, string pieceNum)
        {
            VistaLabsDao labsDao = new VistaLabsDao(cxn);
            string       lrdfn   = labsDao.getLrDfn(dfn);

            if (lrdfn == "")
            {
                return(null);
            }
            DdrLister query = buildGetChemHemSpecimensQuery(lrdfn, fromDate, toDate, pieceNum);

            string[] response = query.execute();
            return(toChemHemSpecimens(response, ref fromDate, ref toDate));
        }
Ejemplo n.º 28
0
        internal DdrLister buildGetProstheticClaimsForPatientQuery(string dfn)
        {
            DdrLister query = new DdrLister(cxn);

            query.File   = "356";
            query.Fields = ".02;.02E;.06;.09;1.01;1.03";
            query.Flags  = "IP";
            query.Xref   = "C";
            query.From   = VistaUtils.adjustForNumericSearch(dfn);
            query.Part   = dfn;
            query.Screen = "I $P(^(0),U,9)'=\"\"";
            //query.Id = "S P1=$P(^(0),U,9) S P2=$P($G(^RMPR(660,P1,1)),U,4) S X=$P($G(^RMPR(661.1,P2,0)),U,2) S C=$P($G(^RMPR(660,P1,0)),U,16) S Y=$P($G(^RMPR(660,P1,10)),U,9) D EN^DDIOL(X_U_C_U_Y)";
            return(query);
        }
Ejemplo n.º 29
0
        internal string getAuthenticationTokenFromVista2()
        {
            DdrLister query = buildGetAuthenticationTokenFromVista2Query();

            string[] response = query.execute();
            if (response == null || response.Length != 1)
            {
                throw new MdoException(MdoExceptionCode.DATA_UNEXPECTED_FORMAT);
            }
            string[] flds = response[0].Split(new char[] { '^' });
            if (flds.Length != 3)
            {
                throw new MdoException(MdoExceptionCode.DATA_UNEXPECTED_FORMAT);
            }
            return(flds[2]);
        }
Ejemplo n.º 30
0
        internal DdrLister buildGetChemHemSpecimensQuery(string lrdfn, string fromDate, string toDate, string pieceNum)
        {
            DateUtils.CheckDateRange(fromDate, toDate);
            DdrLister query = new DdrLister(cxn);

            query.File = "63.04";
            query.Iens = "," + lrdfn + ",";

            // E flag note
            // .01 - DATE/TIME SPECIMEN TAKEN
            // .03 - DATE REPORT COMPLETED
            // .05 - SPECIMEN TYPE
            // .06 - ACCESSION
            // .08 - METHOD OR SITE
            // .112 - ACCESSIONING INSTITUTION
            query.Fields = ".01;.03;.05E;.06;.08;.112E";

            query.Flags  = "IP";
            query.Xref   = "#";
            query.Screen = buildChemHemSpecimensScreenParam(fromDate, toDate, pieceNum);
            query.Id     = "S X=$P(^(0),U,14) I X'= \"\" S Y=$P($G(^DIC(4,X,99)),U,1) D EN^DDIOL(Y)";
            return(query);
        }
Ejemplo n.º 31
0
        public CrudOperation readRange(String file, String fields, String iens, String flags, String xref, String maxRex, String from, String part, String screen, String identifier)
        {
            DdrLister ddr = new DdrLister(this._cxn)
            {
                File   = file,
                Fields = fields,
                Iens   = iens,
                Flags  = flags,
                Xref   = xref,
                Max    = maxRex,
                From   = from,
                Part   = part,
                Screen = screen,
                Id     = identifier
            };
            DateTime startRequest   = DateTime.Now;
            String   rawRpcResponse = ddr.execute(ddr.buildRequest());

            String[] parsed     = ddr.buildResult(rawRpcResponse);
            DateTime endRequest = DateTime.Now;

            CrudOperation result = new CrudOperation()
            {
                RPC = new RPC()
                {
                    Name           = ddr.buildRequest().RpcName,
                    RequestString  = ddr.buildRequest().buildMessage(),
                    ResponseString = rawRpcResponse,
                    RequestTime    = startRequest,
                    ResponseTime   = endRequest
                },
                Result = parsed,
                Type   = CrudOperationType.READ
            };

            return(result);
        }
Ejemplo n.º 32
0
 internal DdrLister buildGetRecordsQuery(AbstractConnection cxn)
 {
     DdrLister query = new DdrLister(cxn);
     query.File = FileNumber;
     query.Fields = ".01;.02;.03";
     query.Flags = "IP";
     query.Xref = "#";
     return query;
 }
Ejemplo n.º 33
0
 internal DdrLister buildXusHashQuery(string s)
 {
     DdrLister query = new DdrLister(cxn);
     query.File = "200";
     query.Flags = "IP";
     query.Fields = "";
     query.Max = "1";
     query.Id = "S X=$$EN^XUSHSH(\"" + s + "\") D EN^DDIOL(X)";
     return query;
 }
Ejemplo n.º 34
0
 internal DdrLister buildGetOptionRpcsQuery(string optIEN)
 {
     DdrLister query = new DdrLister(cxn);
     query.File = "19.05";
     query.Iens = "," + optIEN + ",";
     query.Fields = ".01";
     query.Flags = "IP";
     return query;
 }
Ejemplo n.º 35
0
 public string[] ddrLister(
     string file,
     string iens,
     string flds,
     string flags,
     string maxRex,
     string from,
     string part,
     string xref,
     string screen,
     string identifier
     )
 {
     DdrLister query = new DdrLister(cxn);
     query.File = file;
     query.Iens = iens;
     query.Fields = flds;
     query.Flags = flags;
     query.Max = maxRex;
     query.From = from;
     query.Part = part;
     query.Xref = xref;
     query.Screen = screen;
     query.Id = identifier;
     String[] rtn = query.execute();
     return rtn;
 }
Ejemplo n.º 36
0
 internal DdrLister buildGetLatestOrdersQuery(string fromOrderIEN)
 {
     VistaUtils.CheckRpcParams(fromOrderIEN);
     DdrLister query = new DdrLister(cxn);
     query.File = "100";
     query.Fields = ".02;1;3;4;5;6;7;8.1;10;11;21;22;23;35";
     query.Flags = "IP";
     query.From = VistaUtils.adjustForNumericSearch(fromOrderIEN);
     query.Xref = "#";
     query.Max = "20";
     return query;
 }
Ejemplo n.º 37
0
 public string[] getOrderNamesForPrefix(string prefix)
 {
     DdrLister query = new DdrLister(cxn);
     query.File = "101.41";
     query.Fields = ".01;2";
     query.Flags = "IP";
     query.From = prefix;
     query.Xref = "B";
     query.Max = "20";
     string[] rtn = query.execute();
     return rtn;
 }
Ejemplo n.º 38
0
 internal DdrLister buildGetClinicAvailabilityRequestDdr(string clinicIen)
 {
     DdrLister request = new DdrLister(this.cxn);
     request.File = "44.005"; // PATTERN subfile of the HOSPITAL LOCATION file
     request.Fields = ".01;1;2;3";
     request.Flags = "IP";
     //request.From = "3120722";
     request.Iens = "," + clinicIen + ",";
     request.Max = "30";
     request.Xref = "#";
     return request;
 }
Ejemplo n.º 39
0
 internal DdrLister buildGetExamsQuery(string dfn, string timestamp)
 {
     DdrLister result = new DdrLister(cxn);
     result.File = "70.03";
     result.Iens = "," + timestamp + "," + dfn + ",";
     result.Fields = ".01;2;3;17";
     result.Flags = "IP";
     result.Xref = "";
     return result;
 }
Ejemplo n.º 40
0
 internal DdrLister buildSetAuthenticationTokenInVistaQuery(string token, string duz)
 {
     DdrLister query = new DdrLister(Cxn);
     query.File = "200";
     query.Fields = ".01";
     query.Flags = "IP";
     query.Max = "1";
     query.Xref = "#";
     query.Id = "S ^XTMP(\"" + token + "\",1)=$$GET^XUESSO1(" + duz + ")";
                 //"D EN^DDIOL(\"^XMTP(\"" + token + "\",1)";
     return query;
 }
Ejemplo n.º 41
0
 internal DdrLister buildHasVisitorAliasQuery(string duz)
 {
     DdrLister query = new DdrLister(cxn);
     query.File = "200.04";
     query.Iens = "," + duz + ",";
     query.Fields = ".01";
     query.Flags = "IP";
     query.Xref = "#";
     return query;
 }
Ejemplo n.º 42
0
        internal DdrLister buildGetUniqueInpatientMovementIdsQuery(string fromTS, string toTS)
        {
            DateUtils.CheckDateRange(fromTS, toTS);

            DdrLister query = new DdrLister(cxn);
            query.File = "405";
            query.Fields = ".01;.14";
            query.Flags = "IP";
            string sdate = DateUtils.trimTime(fromTS);
            query.From = VistaTimestamp.fromUtcString(sdate);
            query.Part = VistaTimestamp.fromUtcString(sdate);
            query.Xref = "B";
            return query;
        }
Ejemplo n.º 43
0
 internal DdrLister buildBasicGetInpatientMovesQuery()
 {
     DdrLister query = new DdrLister(cxn);
     query.File = "405";
     query.Fields = ".01;.02;.03;.04;.06;.07;.09;.14;.17;.18;.19;.24;201;202;203;.1;.16;.11;.25";
     query.Flags = "IP";
     query.Id = "S DZ=$P(^(0),U,19) I DZ'=\"\",($D(^VA(200,DZ,0))#10)'=0 D EN^DDIOL($P($G(^VA(200,DZ,0)),U,1))";
     return query;
 }
Ejemplo n.º 44
0
        // Ticket 2752 - also see VistaEncounterX.testTicket2752
        //internal DdrLister buildGetAppointmentsByDdrQueryPre2752(string dfn)
        //{
        //    VistaUtils.CheckRpcParams(dfn);
        //    DdrLister query = new DdrLister(cxn);
        //    query.File = "2.98";

        //    //Took out .01E because it blows up the query when it's a zombie pointer
        //    //We'll get the Hospital Location name conditionally with Id.
        //    //Leaving 9.5E in there since it points to APPOINTMENT TYPE which seems
        //    //like it should be stable.
        //    string sFlds = ".001;.01;3;5;6;7;9;9.5";
        //    query.Fields = sFlds;
        //    query.Flags = "IP";
        //    query.Iens = "," + dfn + ",";
        //    query.Xref = "#";

        //    //NB: the calculation for current status (CURRENT^SDAMU) HAS to happen
        //    //AFTER setting HL
        //    //query.Id = "S D0=DA(1),D1=DA," +
        //    //            "HL=$P(^(0),U,1) " +
        //    //            "D CURRENT^SDAMU D EN^DDIOL(X) " +
        //    //            "I $D(^SC(HL,99))=1 " +
        //    //            "S PH=$P($G(^SC(HL,99)),U,1)," +
        //    //            "DV=$P($G(^SC(HL,0)),U,15) " +
        //    //            "S NM=$P($G(^DG(40.8,DV,0)),U,1) " +
        //    //            "S LN=$$GET1^DIQ(44,HL_\",\",.01) " +
        //    //            "D EN^DDIOL($G(PH)_\"|\"_NM_\"|\"_LN)";
        //    query.Id = "S D0=DA(1),D1=DA,HL=$P(^(0),U,1) " +
        //               "D CURRENT^SDAMU D EN^DDIOL(X) " +
        //               "I $D(^SC(HL,0))'=0 D EN^DDIOL($G(^SC(HL,0))) " +
        //               "I $D(^SC(HL,99))'=0 D EN^DDIOL($G(^SC(HL,99))) ";
        //    return query;
        // }

        internal DdrLister buildGetAppointmentsByDdrQuery(string dfn)
        {
            VistaUtils.CheckRpcParams(dfn);
            DdrLister query = new DdrLister(cxn);
            query.File = "2.98";

            //Took out .01E because it blows up the query when it's a zombie pointer
            //We'll get the Hospital Location name conditionally with Id.
            //Leaving 9.5E in there since it points to APPOINTMENT TYPE which seems
            //like it should be stable.
            string sFlds = ".001;.01;3;5;6;7;9;9.5";
            query.Fields = sFlds;
            query.Flags = "IP";
            query.Iens = "," + dfn + ",";
            query.Xref = "#";

            //NB: the calculation for current status (CURRENT^SDAMU) HAS to happen
            //AFTER setting HL
            //query.Id = "S D0=DA(1),D1=DA," +
            //            "HL=$P(^(0),U,1) " +
            //            "D CURRENT^SDAMU D EN^DDIOL(X) " +
            //            "I $D(^SC(HL,99))=1 " +
            //            "S PH=$P($G(^SC(HL,99)),U,1)," +
            //            "DV=$P($G(^SC(HL,0)),U,15) " +
            //            "S NM=$P($G(^DG(40.8,DV,0)),U,1) " +
            //            "S LN=$$GET1^DIQ(44,HL_\",\",.01) " +
            //            "D EN^DDIOL($G(PH)_\"|\"_NM_\"|\"_LN)";
            query.Id = "S D0=DA(1),D1=DA,HL=$P(^(0),U,1) " +
                "D CURRENT^SDAMU D EN^DDIOL(X) " +
                "I $D(^SC(HL,0))'=0 D EN^DDIOL($P(^SC(HL,0),U,1)_U_$P(^SC(HL,0),U,15)) " + // see ticket #2848 - invalid global ^SC(81,0) at site 556
                "I $D(^SC(HL,99))'=0 D EN^DDIOL(^SC(HL,99))";
            return query;
        }
Ejemplo n.º 45
0
        internal DdrLister buildGetVisitsForDayRequest(string theDate)
        {
            if(!DateUtils.isWellFormedUtcDateTime(theDate))
                throw new MdoException(MdoExceptionCode.ARGUMENT_DATE_FORMAT, "Invalid date: " + theDate);

            DdrLister query = new DdrLister(cxn);
            query.File = "9000010";
            query.Fields = ".01;.05";
            query.Flags = "IP";
            string vistaTS = VistaTimestamp.fromUtcString(theDate);
            query.From = vistaTS;
            query.Part = vistaTS;
            query.Xref = "B";
            //query.Max = "5";
            return query;
        }
Ejemplo n.º 46
0
        internal DdrLister buildUserLookupByNameQuery(string target, string maxRex)
        {
            DdrLister query = new DdrLister(cxn);
            query.File = "200";

            // E flag note
            query.Fields = "@;.01;.132;.137;.141;3;4;5;7;8E;9;13;20.2;20.3;29;29E;53.5;53.5E;53.6;201;201E";

            query.Flags = "IP";
            query.Max = maxRex;
            target = target.ToUpper();
            query.From = VistaUtils.adjustForNameSearch(target);
            query.Part = target;
            query.Xref = "B";
            return query;
        }
Ejemplo n.º 47
0
 internal DdrLister buildGetAuthenticationTokenFromVista2Query()
 {
     DdrLister query = new DdrLister(Cxn);
     query.File = "200";
     query.Fields = ".01";
     query.Flags = "IP";
     query.Max = "1";
     query.Xref = "#";
     query.Id = "D EN^DDIOL($$HANDLE^XUSRB4(\"XUSBSE\",1))";
     return query;
 }
Ejemplo n.º 48
0
        internal DdrLister buildGetOutpatientVisitsRequest(string dfn)
        {
            VistaUtils.CheckRpcParams(dfn);
            DdrLister query = new DdrLister(cxn);
            query.File = "9000010.07";

            // E flag note (10/16/08, joe): this call was only used by MHV SMS which didn't happen.
            // If we ever do find a need for it though, these E flags should be cleaned up.
            query.Fields = ".01;.01E;.019;.02;.02E;.12";
            query.Flags = "IP";
            query.From = VistaUtils.adjustForNumericSearch(cxn.Pid);
            query.Part = cxn.Pid;
            query.Xref = "C";
            query.Max = "20";
            return query;
        }
Ejemplo n.º 49
0
        internal DdrLister buildGetChemHemSpecimensQuery(string lrdfn, string fromDate, string toDate, string pieceNum)
        {
            DateUtils.CheckDateRange(fromDate, toDate);
            DdrLister query = new DdrLister(cxn);
            query.File = "63.04";
            query.Iens = "," + lrdfn + ",";

            // E flag note
            // .01 - DATE/TIME SPECIMEN TAKEN
            // .03 - DATE REPORT COMPLETED
            // .05 - SPECIMEN TYPE
            // .06 - ACCESSION
            // .08 - METHOD OR SITE
            // .112 - ACCESSIONING INSTITUTION
            query.Fields = ".01;.03;.05E;.06;.08;.112E";

            query.Flags = "IP";
            query.Xref = "#";
            query.Screen = buildChemHemSpecimensScreenParam(fromDate, toDate, pieceNum);
            query.Id = "S X=$P(^(0),U,14) I X'= \"\" S Y=$P($G(^DIC(4,X,99)),U,1) D EN^DDIOL(Y)";
            return query;
        }
Ejemplo n.º 50
0
 internal DdrLister buildIenNameQuery(string fileNum)
 {
     DdrLister query = new DdrLister(myCxn);
     query.File = fileNum;
     query.Fields = ".01";
     query.Flags = "IP";
     query.Xref = "#";
     return query;
 }
Ejemplo n.º 51
0
        internal DdrLister buildUserLookupQueryBySsn(string ssn)
        {
            DdrLister query = new DdrLister(cxn);
            query.File = "200";

            // E flag note
            query.Fields = "@;.01;.132;.137;.141;3;4;5;7;8E;9;13;20.2;20.3;29;29E;53.5;53.5E;53.6;201;201E";

            query.Flags = "IP";
            query.Max = "1";
            query.From = VistaUtils.adjustForNumericSearch(ssn);
            query.Part = ssn;
            query.Xref = "SSN";
            return query;
        }
Ejemplo n.º 52
0
 internal DdrLister buildGetProstheticClaimsForPatientQuery(string dfn)
 {
     DdrLister query = new DdrLister(cxn);
     query.File = "356";
     query.Fields = ".02;.02E;.06;.09;1.01;1.03";
     query.Flags = "IP";
     query.Xref = "C";
     query.From = VistaUtils.adjustForNumericSearch(dfn);
     query.Part = dfn;
     query.Screen = "I $P(^(0),U,9)'=\"\"";
     return query;
 }
Ejemplo n.º 53
0
 internal DdrLister buildFileQuery(VistaFile file)
 {
     DdrLister query = new DdrLister(myCxn);
     query.File = file.FileNumber;
     query.Fields = file.getFieldString();
     query.Flags = "IP";
     query.Xref = "#";
     return query;
 }
Ejemplo n.º 54
0
        internal DdrLister buildGetHospitalLocationsQuery()
        {
            DdrLister query = new DdrLister(cxn);
            query.File = "44";

            // E flag note (10/16/08, joe): 3E is institution name.  Leave for now since...
            //  1) should be pretty stable
            //  2) little used function
            //  3) the screen param should skip disused records
            query.Fields = ".01;1;2;2.1;3;3E;3.5;4;6;7;8;9;9.5;10;42;99;1916";
            query.Flags = "IP";
            query.Xref = "#";

            // It would be nice to screen by inactive date instead of checking the name for ZZ  which is
            // only a convention, but inactive date does not seem to be used.
            query.Screen = "I $E($P(^(0),U,1),1,2)'=\"ZZ\"";
            return query;
        }
Ejemplo n.º 55
0
        internal DdrLister buildLookupHospitalLocationsQuery(string target)
        {
            DdrLister query = new DdrLister(cxn);
            query.File = "44";
            query.Fields = ".01";
            query.Flags = "IP";
            query.Xref = "B";
            query.From = VistaUtils.adjustForNameSearch(target);
            query.Part = target;

            // It would be nice to screen by inactive date instead of checking the name for ZZ  which is
            // only a convention, but inactive date does not seem to be used.
            query.Screen = "I $E($P(^(0),U,1),1,2)'=\"ZZ\"";
            return query;
        }
Ejemplo n.º 56
0
 internal DdrLister buildGetDrgRecordsQuery()
 {
     DdrLister query = new DdrLister(cxn);
     query.File = "80.2";
     query.Fields = "@";
     query.Flags = "P";
     query.Id = "D EN^DDIOL($G(^ICD($E($P(^(0),U,1),4,99),1,1,0)))";
     return query;
 }
Ejemplo n.º 57
0
 internal DdrLister buildGetDisplayGroupsQuery()
 {
     DdrLister query = new DdrLister(cxn);
     query.File = "100.98";
     query.Fields = ".01;2;3;4";
     query.Flags = "IP";
     query.Xref = "#";
     return query;
 }
Ejemplo n.º 58
0
 internal DdrLister buildGetSiteDivisionsQuery(string sitecode)
 {
     DdrLister query = new DdrLister(cxn);
     query.File = "4";
     query.Fields = "99;.01;13;100";
     query.Flags = "IP";
     query.From = VistaUtils.adjustForNumericSearch(sitecode);
     query.Part = sitecode;
     query.Xref = "D";
     query.Screen = "I $P(^(99),U,4)'=1";
     return query;
 }
Ejemplo n.º 59
0
 internal DdrLister buildSupplementOrdersQuery(string orderId)
 {
     VistaUtils.CheckRpcParams(orderId);
     DdrLister query = new DdrLister(cxn);
     query.File = "100.045";
     query.Iens = "," + orderId + ",";
     query.Fields = ".02;1";
     query.Flags = "IP";
     query.Xref = "#";
     return query;
 }
Ejemplo n.º 60
0
 internal DdrLister buildGetWardsByDdrQuery()
 {
     DdrLister query = new DdrLister(cxn);
     query.File = "42";
     query.Fields = ".01;.017;.2;44";
     query.Flags = "IP";
     query.Xref = "B";
     query.Id = "N R S HL=$P(^(44),U,1) " +
                 "I HL'=\"\",$D(^SC(HL,0))'=0 S R=$P(^SC(HL,0),U,1)_U_$P(^SC(HL,0),U,2) " +
                 "D EN^DDIOL(R) " +
                 "I HL'=\"\",$D(^SC(HL,99))'=0 S R=U_$P(^SC(HL,99),U,1) " +
                 "D EN^DDIOL(R)";
     return query;
 }