public string getFieldAttribute(string file, string fld, string attribute) { string arg = "$P($$GET1^DID(\"" + file + "\",\"" + fld + "\",\"\",\"" + attribute + "\"),U,1)"; string rtn = VistaUtils.getVariableValue(cxn, arg); return(rtn); }
public FileHeader getFileHeader(string globalName) { string arg = "$G(" + globalName + "0))"; string response = VistaUtils.getVariableValue(cxn, arg); return(toFileHeader(response)); }
public string ddiol(string file, string fld, string attribute) { string arg = "$P(D EN^DDIOL($$GET1^DID(\"9000010.23\",\".02\",\"\",\"LABEL\")),U,1)"; string rtn = VistaUtils.getVariableValue(cxn, arg); return(rtn); }
public string getRpcName(string rpcIEN) { string arg = "$P($G(^XWB(8994," + rpcIEN + ",0)),U,1)"; string response = VistaUtils.getVariableValue(cxn, arg); return(response); }
public void TestAdjustForNumericSearchInt64() { string longDfn = "5587247575"; string output = VistaUtils.adjustForNumericSearch(longDfn); Assert.AreEqual("5587247574", output); }
public RemoteApplicationRecord getRecord(AbstractConnection cxn, KeyValuePair <string, string> param) { string ien = ""; string arg = ""; if (param.Key == "IEN") { ien = param.Value; } else if (param.Key == "NAME") { arg = "$O(^XWB(8994.5,\"B\",\"" + param.Value + "\",0))"; ien = VistaUtils.getVariableValue(cxn, arg); } else if (param.Key == "APPLICATIONCODE") { arg = "$O(^XWB(8994.5,\"ACODE\",\"" + param.Value + "\",0))"; ien = VistaUtils.getVariableValue(cxn, arg); } else { throw new ArgumentException("Invalid field name"); } if (ien == "") { return(null); } arg = "$G(^XWB(8994.5," + ien + ",0))"; string response = VistaUtils.getVariableValue(cxn, arg); return(toRecord(cxn, ien, response)); }
internal bool hasMoreProstheticClaimData(string claimId) { string arg = "$D(^RMPR(660," + claimId + ",0))"; string response = VistaUtils.getVariableValue(cxn, arg); return(response == "1"); }
public void testRemoveCtlChars() { string s = "A\x0009B _~\\1\x000A\x000D2\x0001Cv\x001Aend"; string result = VistaUtils.removeCtlChars(s); Assert.AreEqual("A\tB _~\\1\n\r2Cvend", result); }
public void adjustForNameSearch_Emtpy() { string target = ""; string result = VistaUtils.adjustForNameSearch(target); Assert.AreEqual("", result); }
public RadiologyReport[] getRadiologyReports(string dfn, string fromDate, string toDate, int nrpts) { MdoQuery request = VistaUtils.buildReportTextRequest(dfn, fromDate, toDate, nrpts, "OR_R18:IMAGING~RIM;ORDV08;0;"); string response = (string)cxn.query(request); return(toRadiologyReports(response)); }
public void adjustForNumericSearch() { string target = "404"; string result = VistaUtils.adjustForNumericSearch(target); Assert.AreEqual("403", result); }
public void buildFromToDateScreenParam_EmptyFrom() { var result = VistaUtils.buildFromToDateScreenParam("", "20081118.140400", 0, 0); Assert.IsNotNull(result); Assert.AreEqual("", result); }
public void adjustForNumericSearch_Empty() { string target = ""; string result = VistaUtils.adjustForNumericSearch(target); Assert.IsNull(result); }
public void adjustForNameSearch_Null() { string target = null; string result = VistaUtils.adjustForNameSearch(target); Assert.IsNull(result); }
internal MdoQuery buildGetLrDfnRequest(string dfn) { VistaUtils.CheckRpcParams(dfn); string arg = "$G(^DPT(\"" + dfn + "\",\"LR\"))"; return(VistaUtils.buildGetVariableValueRequest(arg)); }
public void adjustForNumericSearch_NAN() { string target = "asdfjk12"; string result = VistaUtils.adjustForNumericSearch(target); Assert.IsNull(result); }
public void adjustForNumericSearch_Null() { string target = null; string result = VistaUtils.adjustForNumericSearch(target); Assert.AreEqual("-1", result); }
internal MdoQuery buildGetLatestVitalSignsRequest(string dfn) { VistaUtils.CheckRpcParams(dfn); VistaQuery vq = new VistaQuery("ORQQVI VITALS"); vq.addParameter(vq.LITERAL, dfn); return(vq); }
public void isWellFormedDuz() { Assert.IsFalse(VistaUtils.isWellFormedDuz(null)); Assert.IsFalse(VistaUtils.isWellFormedDuz("basdf12")); Assert.IsFalse(VistaUtils.isWellFormedDuz("")); Assert.IsFalse(VistaUtils.isWellFormedDuz("!@#$%")); Assert.IsTrue(VistaUtils.isWellFormedDuz("12354")); }
public void toStringDictionary_BadResponse() { VistaUtils.toStringDictionary( new String[] { "nokeyvalue" } ); }
internal MdoQuery buildGetConsultNoteRequest(string consultIen) { VistaUtils.CheckRpcParams(consultIen); VistaQuery vq = new VistaQuery("ORQQCN DETAIL"); vq.addParameter(vq.LITERAL, consultIen); return(vq); }
internal MdoQuery buildGetOrderNumberForConsultRequest(string consultIen) { VistaUtils.CheckRpcParams(consultIen); VistaQuery vq = new VistaQuery("ORQQCN GET ORDER NUMBER"); vq.addParameter(vq.LITERAL, consultIen); return(vq); }
internal MdoQuery buildGetConsultsForPatientRequest(string dfn) { VistaUtils.CheckRpcParams(dfn); VistaQuery vq = new VistaQuery("ORQQCN LIST"); vq.addParameter(vq.LITERAL, dfn); return(vq); }
internal MdoQuery buildGetExamListRequest(string dfn) { VistaUtils.CheckRpcParams(dfn); VistaQuery vq = new VistaQuery("ORWRA IMAGING EXAMS1"); vq.addParameter(vq.LITERAL, dfn); return(vq); }
public override string getServerTimeout() { string arg = "$P($G(^XTV(8989.3,1,\"XWB\")),U)"; MdoQuery request = VistaUtils.buildGetVariableValueRequest(arg); string response = (string)query(request); return(response); }
public void errMsgOr0() { string response = "1^my error^is^not^your error"; Assert.AreEqual("my error", VistaUtils.errMsgOrZero(response)); response = "0^this should be^ok"; Assert.AreEqual("OK", VistaUtils.errMsgOrZero(response)); }
public void reverseKeyValue_ReverseCausesDuplicates() { StringDictionary sd = new StringDictionary(); sd.Add("1", "one"); sd.Add("2", "ONE"); VistaUtils.reverseKeyValue(sd); }
public void toStringDictionary_DuplicateKeys() { VistaUtils.toStringDictionary( new String[] { "lower1^lower1value", "lower2^lower2value", "LOWER1^LOWER1value" } ); }
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]); }
public void getVisitString_BadTS() { Encounter x = new Encounter(); x.LocationId = "my location id"; x.Timestamp = "hubahub"; x.Type = "the third kind"; VistaUtils.getVisitString(x); }