internal MdoQuery buildCancelRadiologyOrderRequest(String orderId, String reasonIen, String holdDescription) { VistaQuery vq = new VistaQuery("RAMAG ORDER CANCEL"); vq.addParameter(vq.LITERAL, orderId); vq.addParameter(vq.LITERAL, reasonIen); if (!String.IsNullOrEmpty(holdDescription)) { String[] holdDescrLines = StringUtils.split(holdDescription, StringUtils.CRLF); DictionaryHashList miscOptionDHL = new DictionaryHashList(); String currentLineNo = "1"; foreach (String line in holdDescrLines) { miscOptionDHL.Add(currentLineNo, String.Format("HOLDESC^{0}^{1}", currentLineNo, line)); currentLineNo = Convert.ToString(Convert.ToInt32(currentLineNo) + 1); } vq.addParameter(vq.LIST, miscOptionDHL); } else { vq.addParameter(vq.LIST, new DictionaryHashList()); } return(vq); }
internal MdoQuery buildGetPendingAppointmentsRequest(string pid, string startDate) { VistaQuery request = new VistaQuery("SD GET PATIENT PENDING APPTS"); request.addParameter(request.LITERAL, pid); request.addParameter(request.LITERAL, startDate); return(request); }
internal MdoQuery buildGetCancellationReasonsRequest() { VistaQuery vq = new VistaQuery("SD LIST CANCELLATION REASONS"); vq.addParameter(vq.LITERAL, ""); // search vq.addParameter(vq.LITERAL, ""); // start vq.addParameter(vq.LITERAL, ""); // number return(vq); }
internal MdoQuery buildGetAllClinicsRequest() { VistaQuery query = new VistaQuery("SD GET CLINICS BY NAME"); query.addParameter(query.LITERAL, ""); // SEARCH query.addParameter(query.LITERAL, ""); // START - LEAVING BLANK SEEMS TO START AT BEGINNING OF ALPHABET query.addParameter(query.LITERAL, ""); // NUMBER OF RESULTS - LEAVE BLANK SEEMS TO RETURN ALL return(query); }
internal MdoQuery buildGetAppointmentTypesRequest(string search, string start, string number) { VistaQuery request = new VistaQuery("SD APPOINTMENT LIST BY NAME"); request.addParameter(request.LITERAL, search); request.addParameter(request.LITERAL, start); request.addParameter(request.LITERAL, number); return(request); }
internal MdoQuery buildGetEwlQuery(string pid, string status, string startDate, string stopDate) { VistaQuery vq = new VistaQuery(""); vq.addParameter(vq.LITERAL, pid); vq.addParameter(vq.LITERAL, status); vq.addParameter(vq.LITERAL, startDate); vq.addParameter(vq.LITERAL, stopDate); return(vq); }
internal MdoQuery buildGetAppointmentCheckRequest(string dfn, string clinicIen, string startDate, string apptLength) { VistaQuery request = new VistaQuery("SD APPOINTMENT CHECK"); request.addParameter(request.LITERAL, clinicIen); request.addParameter(request.LITERAL, dfn); request.addParameter(request.LITERAL, startDate); request.addParameter(request.LITERAL, apptLength); return(request); }
public MdoQuery buildRequest() { if (String.IsNullOrEmpty(this.Operation)) { throw new ArgumentNullException("Must have an operation"); } VistaQuery vq = new VistaQuery("DDR FILER"); vq.addParameter(vq.LITERAL, Operation); vq.addParameter(vq.LIST, this.Params); return(vq); }
internal MdoQuery buildGetProblemsRequest(String status, String pid) { VistaQuery vq = new VistaQuery("ORQQPL PROBLEM LIST"); vq.addParameter(vq.LITERAL, pid); if (String.IsNullOrEmpty(status)) { status = "B"; } vq.addParameter(vq.LITERAL, status); return(vq); }
internal MdoQuery buildIsRpcAvailableAtSiteRequest(string target, string localRemote, string version) { localRemote = localRemote.ToUpper(); if (localRemote != "R" && localRemote != "L" && localRemote != "") { throw new Exception("Invalid localRemote param, must be empty, R or L"); } VistaQuery vq = new VistaQuery("XWB IS RPC AVAILABLE"); vq.addParameter(vq.LITERAL, target); vq.addParameter(vq.LITERAL, localRemote); vq.addParameter(vq.LITERAL, (version == "" ? "0" : version)); return(vq); }
internal MdoQuery buildGetTestsQuery(string target) { VistaQuery vq = new VistaQuery("ORWLRR ALLTESTS"); if (String.IsNullOrEmpty(target)) { vq.addParameter(vq.LITERAL, ""); } else { vq.addParameter(vq.LITERAL, target); } vq.addParameter(vq.LITERAL, "1"); return(vq); }
internal MdoQuery buildGetConsultNoteRequest(string consultIen) { VistaUtils.CheckRpcParams(consultIen); VistaQuery vq = new VistaQuery("ORQQCN DETAIL"); vq.addParameter(vq.LITERAL, consultIen); return vq; }
internal MdoQuery buildGetParameterValueRequest(String arg) { VistaQuery vq = new VistaQuery("ORWU PARAM"); vq.addParameter(vq.LITERAL, arg); return(vq); }
internal MdoQuery buildRequest() { if (String.IsNullOrEmpty(File)) { throw new MdoException(MdoExceptionCode.ARGUMENT_NULL, "Must have a file!"); } if (String.IsNullOrEmpty(Iens)) { throw new MdoException(MdoExceptionCode.ARGUMENT_NULL, "Must have an IENS!"); } if (String.IsNullOrEmpty(Fields)) { throw new MdoException(MdoExceptionCode.ARGUMENT_NULL, "Must have a field!"); } VistaQuery vq = new VistaQuery("DDR GETS ENTRY DATA"); DictionaryHashList paramLst = new DictionaryHashList(); paramLst.Add("\"FILE\"", File); paramLst.Add("\"IENS\"", Iens); paramLst.Add("\"FIELDS\"", Fields); if (!String.IsNullOrEmpty(Flags)) { paramLst.Add("\"FLAGS\"", Flags); } vq.addParameter(vq.LIST, paramLst); return(vq); }
internal MdoQuery buildGetClinicalProceduresQuery1(string pid) { VistaQuery query = new VistaQuery("ORWMC PATIENT PROCEDURES1"); query.addParameter(query.LITERAL, pid); return(query); }
internal MdoQuery buildHasClinicAccessRequest(string clinicId) { VistaQuery vq = new VistaQuery("SD VERIFY CLINIC ACCESS"); vq.addParameter(vq.LITERAL, clinicId); // clinic IEN return(vq); }
public MdoQuery buildRpcRequest(string rpcName, string[] paramValues, int[] paramTypes, bool[] paramEncrypted) { if (String.IsNullOrEmpty(rpcName)) { throw new MdoException(MdoExceptionCode.ARGUMENT_INVALID, "rpcName must be specified"); } if (paramValues.Length != paramTypes.Length || paramValues.Length != paramEncrypted.Length) { throw new MdoException(MdoExceptionCode.ARGUMENT_INVALID, "paramValues, paramTypes and paramEncrpted must be the same size"); } VistaQuery vq = new VistaQuery(rpcName); for (int n = 0; n < paramValues.Length; n++) { if (paramEncrypted[n]) { vq.addEncryptedParameter(paramTypes[n], paramValues[n]); } else { vq.addParameter(paramTypes[n], paramValues[n]); } } return(vq); }
internal MdoQuery buildGetTimestampRequest() { VistaQuery vq = new VistaQuery("ORWU DT"); vq.addParameter(vq.LITERAL, "NOW"); return(vq); }
internal MdoQuery buildGetRpcListRequest(string target) { VistaQuery vq = new VistaQuery("XWB RPC LIST"); vq.addParameter(vq.LITERAL, target); return(vq); }
public string execute() { if (File == "") { throw new Exception("Must have a file!"); } if (Iens == "") { throw new Exception("Must have IENS!"); } if (Field == "") { throw new Exception("Must have a field!"); } if (Value == "") { throw new Exception("Must have a value!"); } VistaQuery vq = new VistaQuery("DDR VALIDATOR"); DictionaryHashList paramLst = new DictionaryHashList(); paramLst.Add("\"FILE\"", File); paramLst.Add("\"IENS\"", Iens); paramLst.Add("\"FIELD\"", Field); paramLst.Add("\"VALUE\"", Value); vq.addParameter(vq.LIST, paramLst); DdrQuery query = new DdrQuery(cxn); string response = query.execute(vq); return(buildResult(response)); }
// Do not check DFN here. This is called by getChemHemReports which checks DFN. // Also, all this will be replaced by the NHIN RPC. internal MdoQuery buildGetChemHemReportRequest(string dfn, string nextDate) { VistaUtils.CheckRpcParams(dfn); //if (String.IsNullOrEmpty(nextDate) || !VistaTimestamp.isValid(nextDate)) //{ // throw new MdoException(MdoExceptionCode.ARGUMENT_INVALID, "Invalid 'next' date: " + nextDate); //} VistaQuery vq = new VistaQuery("ORWLRR INTERIMG"); vq.addParameter(vq.LITERAL, dfn); vq.addParameter(vq.LITERAL, nextDate); vq.addParameter(vq.LITERAL, "1"); vq.addParameter(vq.LITERAL, "1"); return(vq); }
internal MdoQuery builtGetPatientListForReminderReportRequest(string rptId) { VistaQuery vq = new VistaQuery("AMOJVL CPGPI GETPLIST"); vq.addParameter(vq.LITERAL, rptId); return(vq); }
internal MdoQuery buildGetEligibilityRequest(string eligibilityIen) { VistaQuery request = new VistaQuery("SD GET ELIGIBILITY DETAILS"); request.addParameter(request.LITERAL, "EMPLOYEE"); return(request); }
internal MdoQuery buildGetTestDescriptionQuery(string identifierString) { VistaQuery vq = new VistaQuery("ORWLRR INFO"); vq.addParameter(vq.LITERAL, identifierString); return(vq); }
internal MdoQuery buildGetClinicsByNameRequest(string name) { VistaQuery vq = new VistaQuery("AMOJVL CPGPI CLLOOK"); vq.addParameter(vq.LITERAL, name); return(vq); }
internal MdoQuery buildGetClinicAvailabilityRequest(string clinicIen) { VistaQuery request = new VistaQuery("SD GET CLINIC AVAILABILITY"); request.addParameter(request.LITERAL, clinicIen); return(request); }
internal MdoQuery buildGetClinicDetailsRequest(string locationIen) { VistaQuery query = new VistaQuery("SD GET CLINIC DETAILS"); query.addParameter(query.LITERAL, locationIen); return(query); }
internal MdoQuery buildHasValidStopCodeRequest(string clinicId) { VistaQuery vq = new VistaQuery("SD VALID CLINIC STOP CODE"); vq.addParameter(vq.LITERAL, clinicId); // clinic IEN return(vq); }
internal MdoQuery buildCheckInAppointmentRequest(Appointment appointment) { VistaQuery request = new VistaQuery("SD APPOINTMENT CHECK-IN"); request.addParameter(request.LITERAL, appointment.Id); return(request); }
internal MdoQuery buildGetAppointmentTypeDetailsRequest(string apptTypeIen) { VistaQuery request = new VistaQuery("SD GET APPOINTMENT TYPE"); request.addParameter(request.LITERAL, apptTypeIen); return(request); }
internal MdoQuery buildHasPatchRequest(string patchId) { VistaQuery vq = new VistaQuery("ORWU PATCH"); vq.addParameter(vq.LITERAL, patchId); return(vq); }
public MdoQuery buildGetSurgeryReportTextRequest(string dfn, string ien) { VistaQuery vq = new VistaQuery("ORWRP REPORT TEXT"); vq.addParameter(vq.LITERAL, dfn); vq.addParameter(vq.LITERAL, "28:SURGERY (LOCAL ONLY)~"); vq.addParameter(vq.LITERAL, ""); vq.addParameter(vq.LITERAL, ""); vq.addParameter(vq.LITERAL, ien); vq.addParameter(vq.LITERAL, "0"); vq.addParameter(vq.LITERAL, "0"); return vq; }
internal MdoQuery buildRequest() { if (Operation == null || Operation == "") { throw new ArgumentNullException("Must have an operation"); } VistaQuery vq = new VistaQuery("DDR FILER"); vq.addParameter(vq.LITERAL, Operation); DictionaryHashList lst = new DictionaryHashList(); for (int i = 0; i < Args.Length; i++) { lst.Add(Convert.ToString(i+1), Args[i]); } vq.addParameter(vq.LIST, lst); return vq; }
public MdoQuery buildCancelAppointmentRequest(Appointment appointment, string cancellationReason, string remarks) { VistaQuery request = new VistaQuery("SD APPOINTMENT CANCEL"); request.addParameter(request.LITERAL, cxn.Pid); request.addParameter(request.LITERAL, appointment.Clinic.Id); request.addParameter(request.LITERAL, appointment.Timestamp); request.addParameter(request.LITERAL, appointment.AppointmentType.ID); request.addParameter(request.LITERAL, cancellationReason); request.addParameter(request.LITERAL, remarks); return request; }
public MdoQuery buildRpcRequest(string rpcName, string[] paramValues, int[] paramTypes, bool[] paramEncrypted) { if (String.IsNullOrEmpty(rpcName)) { throw new MdoException(MdoExceptionCode.ARGUMENT_INVALID, "rpcName must be specified"); } if (paramValues.Length != paramTypes.Length || paramValues.Length != paramEncrypted.Length) { throw new MdoException(MdoExceptionCode.ARGUMENT_INVALID, "paramValues, paramTypes and paramEncrpted must be the same size"); } VistaQuery vq = new VistaQuery(rpcName); for (int n = 0; n < paramValues.Length; n++) { if (paramEncrypted[n]) vq.addEncryptedParameter(paramTypes[n], paramValues[n]); else vq.addParameter(paramTypes[n], paramValues[n]); } return vq; }
internal MdoQuery buildGetOrderRequest(string orderIen) { VistaUtils.CheckRpcParams(orderIen); VistaQuery vq = new VistaQuery("ORWORR GETBYIFN"); vq.addParameter(vq.LITERAL, orderIen); return vq; }
internal MdoQuery buildGetOrderIdsForPatientRequest(string dfn) { VistaUtils.CheckRpcParams(dfn); VistaQuery vq = new VistaQuery("ORWORR AGET"); vq.addParameter(vq.LITERAL, dfn); vq.addParameter(vq.LITERAL, "2^0"); vq.addParameter(vq.LITERAL, "1"); vq.addParameter(vq.LITERAL, "-1"); vq.addParameter(vq.LITERAL, "0"); vq.addParameter(vq.LITERAL, ""); return vq; }
internal string getComplexOrderMsg(string ien) { VistaQuery vq = new VistaQuery("ORWDXA OFCPLX"); vq.addParameter(vq.LITERAL, ien); return (string)cxn.query(vq); }
internal string[] getMenu(string ien) { VistaUtils.CheckRpcParams(ien); VistaQuery vq = new VistaQuery("ORWDXM MENU"); vq.addParameter(vq.LITERAL, ien); string response = (string)cxn.query(vq); return StringUtils.split(response, StringUtils.CRLF); }
internal MdoQuery buildUnlockOrdersForPatientRequest(string dfn) { VistaQuery vq = new VistaQuery("ORWDX UNLOCK"); vq.addParameter(vq.LITERAL, dfn); return vq; }
internal MdoQuery buildSaveOrderRequest( string pid, string duz, string locationIEN, string dlgBaseName, OrderDialog dlg, string orderIEN, string startDate) { VistaQuery vq = new VistaQuery("ORWDX SAVE"); vq.addParameter(vq.LITERAL, pid); vq.addParameter(vq.LITERAL, duz); vq.addParameter(vq.LITERAL, locationIEN); vq.addParameter(vq.LITERAL, dlgBaseName); vq.addParameter(vq.LITERAL, dlg.DisplayGrp); vq.addParameter(vq.LITERAL, orderIEN); vq.addParameter(vq.LITERAL, ""); DictionaryHashList lst = new DictionaryHashList(); OrderResponse[] responses = dlg.Responses; for (int i = 0; i < responses.Length; i++) { lst.Add(responses[i].Index, responses[i].Ivalue); } vq.addParameter(vq.LIST, lst); vq.addParameter(vq.LITERAL, ""); vq.addParameter(vq.LITERAL, ""); vq.addParameter(vq.LITERAL, ""); vq.addParameter(vq.LITERAL, "0"); return vq; }
internal MdoQuery buildIsQuickOrderGrpRequest(string orderIen) { VistaQuery vq = new VistaQuery("ORWDPS2 QOGRP"); vq.addParameter(vq.LITERAL, orderIen); return vq; }
internal MdoQuery buildGetOrderStatusForPatient(string dfn, string orderableItemId) { VistaUtils.CheckRpcParams(dfn); VistaUtils.CheckRpcParams(orderableItemId); VistaQuery vq = new VistaQuery("AMOJVL CPGPI OSCAN"); vq.addParameter(vq.LITERAL, dfn); vq.addParameter(vq.LITERAL, orderableItemId); return vq; }
internal MdoQuery buildGetOrdersRequest(IndexedHashtable t) { VistaQuery vq = new VistaQuery("ORWORR GET4LST"); vq.addParameter(vq.LITERAL, "2"); vq.addParameter(vq.LITERAL, VistaTimestamp.fromDateTime(DateTime.Now)); DictionaryHashList lst = new DictionaryHashList(); for (int i = 0; i < t.Count; i++) { lst.Add(Convert.ToString(i + 1), ((Order)t.GetValue(i)).Id); } vq.addParameter(vq.LIST, lst); return vq; }
internal MdoQuery buildGetOrderResponsesRequest(string responseIen) { VistaQuery vq = new VistaQuery("ORWDX LOADRSP"); vq.addParameter(vq.LITERAL, responseIen); return vq; }
internal MdoQuery buildCheckReleaseOrderRequest(Order order, string dfn) { VistaQuery vq = new VistaQuery("ORWDXC SESSION"); vq.addParameter(vq.LITERAL, dfn); DictionaryHashList lst = new DictionaryHashList(); lst.Add("1", order.Id + "^^1"); vq.addParameter(vq.LIST, lst); return vq; }
internal MdoQuery buildGetOrdersRequest1(string dfn) { VistaQuery vq = new VistaQuery("ORWORR AGET"); vq.addParameter(vq.LITERAL, dfn); vq.addParameter(vq.LITERAL, "2^0"); vq.addParameter(vq.LITERAL, "1"); vq.addParameter(vq.LITERAL, "0"); vq.addParameter(vq.LITERAL, "0"); vq.addParameter(vq.LITERAL, ""); vq.addParameter(vq.LITERAL, "0"); return vq; }
internal MdoQuery buildGetDisabledMsgRequest(string dlgIen) { VistaQuery vq = new VistaQuery("ORWDX DISMSG"); vq.addParameter(vq.LITERAL, dlgIen); return vq; }
internal MdoQuery buildIsIvQuickOrderRequest(string orderIen) { VistaQuery vq = new VistaQuery("ORIMO ISIVQO"); vq.addParameter(vq.LITERAL, orderIen); return vq; }
internal MdoQuery buildGetNewDlgIenRequest(string type, string locationIen) { VistaQuery vq = new VistaQuery("ORWDCN32 NEWDLG"); vq.addParameter(vq.LITERAL, type); vq.addParameter(vq.LITERAL, locationIen); return vq; }
internal MdoQuery buildIsUnitDoseQuickOrderRequest(string orderIen) { VistaQuery vq = new VistaQuery("ORWDXM3 ISUDQO"); vq.addParameter(vq.LITERAL, orderIen); return vq; }
internal MdoQuery buildGetOrderableItemsByNameRequest(string name) { VistaQuery vq = new VistaQuery("AMOJVL CPGPI OILOOK"); vq.addParameter(vq.LITERAL, name); return vq; }
internal MdoQuery buildSendOrderByPolicyRequest(string dfn, string locIen, string esig, Order order) { VistaQuery vq = new VistaQuery("ORWDX SEND"); vq.addParameter(vq.LITERAL, dfn); vq.addParameter(vq.LITERAL, "0"); vq.addParameter(vq.LITERAL, locIen); vq.addEncryptedParameter(vq.LITERAL, ' ' + esig); //' ' apparently needed to avoid a bug in Vista? See CPRS. DictionaryHashList lst = new DictionaryHashList(); String value = order.Id + '^' + VistaConstants.SS_ESIGNED + '^' + VistaConstants.RS_RELEASE + '^' + VistaConstants.NO_POLICY; lst.Add("1", value); vq.addParameter(vq.LIST, lst); return vq; }
internal MdoQuery buildGetOrderDetailRequest(string orderIen, string dfn) { VistaUtils.CheckRpcParams(dfn); VistaQuery vq = new VistaQuery("ORQOR DETAIL"); vq.addParameter(vq.LITERAL, orderIen); vq.addParameter(vq.LITERAL, dfn); return vq; }
internal string checkReleaseOrder(Order order) { VistaQuery vq = new VistaQuery("ORWDXC SESSION"); vq.addParameter(vq.LITERAL, cxn.Pid); DictionaryHashList lst = new DictionaryHashList(); lst.Add("1", order.Id + "^^1"); vq.addParameter(vq.LIST, lst); return (string)cxn.query(vq); }
internal MdoQuery buildGetOrderDialogNameRequest(string orderIen) { VistaQuery vq = new VistaQuery("ORWDXM DLGNAME"); vq.addParameter(vq.LITERAL, orderIen); return vq; }
internal string[] getDialogList(string loc) { VistaUtils.CheckRpcParams(loc); VistaQuery vq = new VistaQuery("ORWDX WRLST"); vq.addParameter(vq.LITERAL, loc); string response = (string)cxn.query(vq); return StringUtils.split(response, StringUtils.CRLF); }
internal MdoQuery buildGetOrderDialogRequest(string dlgIen) { VistaUtils.CheckRpcParams(dlgIen); VistaQuery vq = new VistaQuery("ORWDXM MENU"); vq.addParameter(vq.LITERAL, dlgIen); return vq; }
internal string[] getOrderChecks(string dfn, string dlgType) { VistaQuery vq = new VistaQuery("ORWDXC DISPLAY"); vq.addParameter(vq.LITERAL, dfn); vq.addParameter(vq.LITERAL, dlgType); string rtn = (string)cxn.query(vq); if (StringUtils.isEmpty(rtn)) { return new string[0]; } return StringUtils.split(rtn, StringUtils.CRLF); }
internal MdoQuery buildGetOrderDialogsForDisplayGroupRequest(string displayGroupId) { VistaUtils.CheckRpcParams(displayGroupId); VistaQuery vq = new VistaQuery("AMOJVL CPGPI GDIADG"); vq.addParameter(vq.LITERAL, displayGroupId); return vq; }