public string xusHash(string s) { DdrLister query = buildXusHashQuery(s); string[] response = query.execute(); return(StringUtils.piece(response[0], StringUtils.CARET, 2)); }
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); }
public ProstheticClaim[] getProstheticClaimsForClaimant(string dfn) { DdrLister query = buildGetProstheticClaimsForPatientQuery(dfn); string[] response = query.execute(); return(toProstheticClaims(response)); }
public void getRecords(AbstractConnection cxn) { DdrLister query = buildGetRecordsQuery(cxn); string[] response = query.execute(); toRecords(cxn, response); }
/// <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)); }
/// <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)); }
public IList <ImagingExam> getExamsByPatient(string dfn) { DdrLister query = buildGetExamsListQuery(dfn); string[] response = query.execute(); IList <ImagingExam> examList = toExamListFromDDR(response); supplementExamDetails(dfn, examList); return(examList); }
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]); }
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]); }
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]); }
/// <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); } }
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)); }
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]); }
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); }
public string isRpcAvailable(string target, string context, string localRemote, string version) { if (!isRpcAvailableAtSite(target, localRemote, version)) { return("Not installed at site"); } KeyValuePair <string, string>[] rpcList = getRpcList(target); string rpcIEN = rpcList[0].Key; VistaUserDao userDao = new VistaUserDao(cxn); string optIEN = userDao.getOptionIen(context); if (!StringUtils.isNumeric(optIEN)) { return("Error getting context IEN: " + optIEN); } DdrLister query = buildGetOptionRpcsQuery(optIEN); string[] optRpcs = query.execute(); if (!isRpcIenPresent(optRpcs, rpcIEN)) { return("RPC not in context"); } return("YES"); }
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; }
public string getCountyName(string stateIen, string countyIen) { if (!VistaUtils.isWellFormedIen(stateIen)) { throw new InvalidlyFormedRecordIdException("State IEN: " + stateIen); } // countyIen allows 0 if (!StringUtils.isNumeric(countyIen)) { throw new InvalidlyFormedRecordIdException("County IEN: " + countyIen); } DdrLister query = new DdrLister(cxn); query.File = "5.01"; query.Fields = ".01"; query.Flags = "IP"; query.Iens = "," + stateIen + ","; query.From = VistaUtils.adjustForNumericSearch(countyIen); query.Xref = "#"; string[] response = query.execute(); if (response.Length == 0) return ""; return StringUtils.piece(response[0], StringUtils.CARET, 2); }
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; }
public Patient[] matchByNameCityStateIEN(string name, string city, string stateIEN) { DdrLister query = new DdrLister(cxn); query.File = "2"; query.Fields = ".01;.02;.03;.09;.111;.112;.113;.114;.115E;.116;.117;.131;991.01;991.02"; query.Flags = "IP"; query.From = VistaUtils.adjustForNameSearch(name.ToUpper()); query.Part = name.ToUpper(); query.Xref = "B"; query.Screen = "I $D(^(.11))=1, " + "$P(^(.11),U,4)[\"" + city.ToUpper() + "\", " + "$P(^(.11),U,5)=" + stateIEN; string[] response = query.execute(); return toPatientsFromNameCityState(response, stateIEN); }
public string[] matchByNameDOBGender(string name, string dob, string gender) { DdrLister query = new DdrLister(cxn); query.File = "2"; query.Fields = ".01;.02;.03;.09;.111;.112;.113;.114;.115E;.116;.117;.131;991.01;991.02"; query.Flags = "IP"; query.From = VistaUtils.adjustForNameSearch(name); query.Part = name; query.Xref = "B"; query.Screen = "I $P(^(0),U,3)=" + VistaTimestamp.fromUtcString(dob) + ", $P(^(0),U,2)=\"" + gender + "\""; string[] response = query.execute(); return response; }