Exemplo n.º 1
0
		///<summary></summary>
		public FormRxEdit(Patient patCur,RxPat rxPatCur){
			//){//
			InitializeComponent();
			RxPatCur=rxPatCur;
			PatCur=patCur;
			Lan.F(this);
		}
Exemplo n.º 2
0
 ///<summary>Launches the program using a combination of command line characters and the patient.Cur data.</summary>
 public static void SendData(Program ProgramCur,Patient pat)
 {
     //Example CerPI.exe -<patNum>;<fname>;<lname>;<birthday DD.MM.YYYY>; (Date format specified in the windows Regional Settings)
     if(pat==null) {
         try {
             Process.Start(ProgramCur.Path);//should start Cerec without bringing up a pt.
         }
         catch {
             MessageBox.Show(ProgramCur.Path+" is not available.");
         }
         return;
     }
     string info= " -" ;
     if(ProgramProperties.GetPropVal(ProgramCur.ProgramNum,"Enter 0 to use PatientNum, or 1 to use ChartNum")=="0") {
         info+=pat.PatNum.ToString()+";";
     }
     else {
         info+=pat.ChartNumber.ToString()+";";
     }
     info+=pat.FName+";"+pat.LName+";"+pat.Birthdate.ToShortDateString()+";";
     try {
         Process.Start(ProgramCur.Path,info);
     }
     catch {
         MessageBox.Show(ProgramCur.Path+" is not available, or there is an error in the command line options.");
     }
 }
Exemplo n.º 3
0
 //<summary>Keeps track of current server time so that user cannot bypass security by altering workstation clock.  Sometimes we compare to nowDate, but sometimes, we're just interested in the date of the adjustment.</summary>
 //private DateTime nowDate;
 ///<summary></summary>
 public FormAdjust(Patient patCur,Adjustment adjustmentCur)
 {
     InitializeComponent();
     PatCur=patCur;
     AdjustmentCur=adjustmentCur;
     Lan.F(this);
 }
Exemplo n.º 4
0
		public static void SendData(Program ProgramCur,Patient pat) {
			if(pat==null) {
				MsgBox.Show("EvaSoft","You must select a patient first.");
				return;
			}
			Process[] evaSoftInstances=Process.GetProcessesByName("EvaSoft");
			if(evaSoftInstances.Length==0) {
				MsgBox.Show("EvaSoft","EvaSoft is not running. EvaSoft must be running before the bridge will work.");
				return;
			}
			ArrayList ForProgram=ProgramProperties.GetForProgram(ProgramCur.ProgramNum);
			UdpClient udpClient=new UdpClient();
			string udpMessage="REQUEST01123581321~~~0.1b~~~pmaddpatient~~~";
			//Patient id can be any string format
			ProgramProperty PPCur=ProgramProperties.GetCur(ForProgram,"Enter 0 to use PatientNum, or 1 to use ChartNum");
			if(PPCur.PropertyValue=="0") {
				udpMessage+=pat.PatNum.ToString();
			}
			else {
				udpMessage+=pat.ChartNumber.Replace(",","").Trim();//Remove any commas. Not likely to exist, but just to be safe.
			}
			udpMessage+=","+pat.FName.Replace(",","").Trim();//Remove commas from data, because they are the separator.
			udpMessage+=","+pat.LName.Replace(",","").Trim();//Remove commas from data, because they are the separator.
			udpMessage+=","+pat.Birthdate.ToString("MM/dd/yyyy");
			udpMessage+=","+((pat.Gender==PatientGender.Female)?"female":"male");
			udpMessage+=","+(pat.Address+" "+pat.Address2).Replace(",","").Trim();//Remove commas from data, because they are the separator.
			udpMessage+=","+pat.City.Replace(",","").Trim();//Remove commas from data, because they are the separator.
			udpMessage+=","+pat.State.Replace(",","").Trim();//Remove commas from data, because they are the separator.
			udpMessage+=","+pat.Zip.Replace(",","").Trim();//Remove commas from data, because they are the separator.
			byte[] udpMessageBytes=Encoding.ASCII.GetBytes(udpMessage);
			udpClient.Send(udpMessageBytes,udpMessageBytes.Length,"localhost",35678);
		}
Exemplo n.º 5
0
		///<summary></summary>
		public static void SendData(Program ProgramCur,Patient pat) {
			_path=Programs.GetProgramPath(Programs.GetCur(ProgramName.DemandForce));
			if(!File.Exists(_path)) {
				MessageBox.Show(_path+" could not be found.");
				return;
			}
			if(MessageBox.Show(Lan.g("DemandForce","This may take 20 minutes or longer")+".  "+Lan.g("DemandForce","Continue")+"?","",MessageBoxButtons.OKCancel)!=DialogResult.OK) {
				return;
			}
			_formProg=new FormProgress();
			_formProg.MaxVal=100;
			_formProg.NumberMultiplication=1;
			_formProg.DisplayText="";
			_formProg.NumberFormat="F";//Show whole percentages, not fractional percentages.
			Thread workerThread=new Thread(new ThreadStart(InstanceBridgeExport));
			workerThread.Start();
			if(_formProg.ShowDialog()==DialogResult.Cancel) {
				workerThread.Abort();
				MessageBox.Show(Lan.g("DemandForce","Export cancelled")+". "+Lan.g("DemandForce","Partially created file has been deleted")+".");
				CheckCreatedFile(CodeBase.ODFileUtils.CombinePaths(Path.GetDirectoryName(_path),"extract.xml"));
				_formProg.Dispose();
				return;
			}
			MessageBox.Show(Lan.g("DemandForce","Export complete")+". "+Lan.g("DemandForce","Press OK to launch DemandForce")+".");
			try {
				Process.Start(_path);//We might have to add extract.xml to launch command in the future.
			}
			catch {
				MessageBox.Show(_path+" is not available.");
			}
			_formProg.Dispose();
		}
Exemplo n.º 6
0
		///<summary>This bridge has not yet been added to the database.  CaptureLink reads the bridge parameters from the clipboard.</summary>
		//Command format: LName FName PatID
		public static void SendData(Program ProgramCur, Patient pat){
			if(pat==null){
				MessageBox.Show("No patient selected.");
				return;
			}
			string path=Programs.GetProgramPath(ProgramCur);
			string info=Tidy(pat.LName)+" ";
			info+=Tidy(pat.FName)+" ";
			if(ProgramProperties.GetPropVal(ProgramCur.ProgramNum,"Enter 0 to use PatientNum, or 1 to use ChartNum")=="0") {
				info+=pat.PatNum.ToString();
			}
			else{
				if(pat.ChartNumber==null || pat.ChartNumber=="") {
					MsgBox.Show("CaptureLink","This patient does not have a chart number.");
					return;
				}
				info+=Tidy(pat.ChartNumber);
			}
			Clipboard.Clear();
			Clipboard.SetText(info,TextDataFormat.Text);
			try {
				Process.Start(path);
			}
			catch(Exception ex) {
				MessageBox.Show(ex.Message);
			}
		}
Exemplo n.º 7
0
		///<summary>Launches the program using command line.</summary>
		private static void SendData4(Program ProgramCur,Patient pat) {
			string path=Programs.GetProgramPath(ProgramCur);
			//Usage: mediadent.exe /P<Patient Name> /D<Practitioner> /L<Language> /F<Image folder> /B<Birthdate>
			//Example: mediadent.exe /PJan Met De Pet /DOtté Gunter /L1 /Fc:\Mediadent\patients\1011 /B27071973
			ArrayList ForProgram=ProgramProperties.GetForProgram(ProgramCur.ProgramNum); ;
			if(pat==null) {
				return;
			}
			string info="/P"+Cleanup(pat.FName+" "+pat.LName);
			Provider prov=Providers.GetProv(Patients.GetProvNum(pat));
			info+=" /D"+prov.FName+" "+prov.LName
				+" /L1 /F";
			ProgramProperty PPCur=ProgramProperties.GetCur(ForProgram,"Image Folder");
			info+=PPCur.PropertyValue;
			PPCur=ProgramProperties.GetCur(ForProgram,"Enter 0 to use PatientNum, or 1 to use ChartNum"); ;
			if(PPCur.PropertyValue=="0") {
				info+=pat.PatNum.ToString();
			}
			else {
				info+=Cleanup(pat.ChartNumber);
			}
			info+=" /B"+pat.Birthdate.ToString("ddMMyyyy");
			//MessageBox.Show(info);
			//not used yet: /inputfile "path to file"
			try {
				Process.Start(path,info);
			}
			catch {
				MessageBox.Show(path+" "+info+" is not available.");
			}
		}
Exemplo n.º 8
0
 /// <summary>Duplicate of the same class in Patients.  Gets nine of the most useful fields from the db for the given patnum.</summary>
 public static Patient GetLim(long patNum)
 {
     if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
         return Meth.GetObject<Patient>(MethodBase.GetCurrentMethod(),patNum);
     }
     if(patNum==0){
         return new Patient();
     }
     string command=
         "SELECT PatNum,LName,FName,MiddleI,Preferred,CreditType,Guarantor,HasIns,SSN "
         +"FROM patient "
         +"WHERE PatNum = '"+patNum.ToString()+"'";
      			DataTable table=Db.GetTable(command);
     if(table.Rows.Count==0){
         return new Patient();
     }
     Patient Lim=new Patient();
     Lim.PatNum     = PIn.Long  (table.Rows[0][0].ToString());
     Lim.LName      = PIn.String(table.Rows[0][1].ToString());
     Lim.FName      = PIn.String(table.Rows[0][2].ToString());
     Lim.MiddleI    = PIn.String(table.Rows[0][3].ToString());
     Lim.Preferred  = PIn.String(table.Rows[0][4].ToString());
     Lim.CreditType = PIn.String(table.Rows[0][5].ToString());
     Lim.Guarantor  = PIn.Long  (table.Rows[0][6].ToString());
     Lim.HasIns     = PIn.String(table.Rows[0][7].ToString());
     Lim.SSN        = PIn.String(table.Rows[0][8].ToString());
     return Lim;
 }
Exemplo n.º 9
0
        // AAD External Call declaration for Owandy bridge (nd)
        //static extern long SendMessage(long hWnd, long Msg, long wParam, string lParam);
        ///<summary>Launches the program using command line, then passes some data using Windows API.</summary>
        public static void SendData(Program ProgramCur,Patient pat)
        {
            //ProgramProperties.GetForProgram();
            string info;
            if(pat != null) {
                try {
                    //formHandle = Parent.Handle;
                    System.Diagnostics.Process.Start(ProgramCur.Path,ProgramCur.CommandLine);//"C /LINK "+ formHandle;
                    if(!IsWindow(hwndLink)) {
                        hwndLink=FindWindow("MjLinkWndClass",null);
                    }
                    // info = "/P:1,DEMO,Patient1";
                    //Patient id can be any string format
                    info = "/P:" + pat.PatNum + "," + pat.LName + "," + pat.FName;
                    if(IsWindow(hwndLink) == true) {
                        IntPtr lResp=SendMessage(hwndLink,WM_SETTEXT,0,info);
                    }

                }
                catch {
                    MessageBox.Show(ProgramCur.Path + " is not available, or there is an error in the command line options.");
                }
            }//if patient is loaded
            else {
                try {
                    Process.Start(ProgramCur.Path);//should start Owandy without bringing up a pt.
                }
                catch {
                    MessageBox.Show(ProgramCur.Path + " is not available.");
                }
            }
        }
Exemplo n.º 10
0
 ///<summary>Launches the program using a combination of command line characters and the patient.Cur data.  They also have an available file based method which passes more information like missing teeth, but we don't use it yet.  Their bridge specs are freely posted on their website.</summary>
 public static void SendData(Program ProgramCur, Patient pat)
 {
     ArrayList ForProgram=ProgramProperties.GetForProgram(ProgramCur.ProgramNum);
     if(pat==null){
         try{
             Process.Start(ProgramCur.Path);//should start Florida Probe without bringing up a pt.
         }
         catch{
             MessageBox.Show(ProgramCur.Path+" is not available.");
         }
         return;
     }
     string info="/search ";
     ProgramProperty PPCur=ProgramProperties.GetCur(ForProgram, "Enter 0 to use PatientNum, or 1 to use ChartNum");
     if(PPCur.PropertyValue=="0"){
         info+="/chart \""+pat.PatNum.ToString()+"\" ";
     }
     else{
         info+="/chart \""+Cleanup(pat.ChartNumber)+"\" ";
     }
     info+="/first \""+Cleanup(pat.FName)+"\" "
         +"/last \""+Cleanup(pat.LName)+"\"";
     //MessageBox.Show(info);
     //not used yet: /inputfile "path to file"
     try{
         Process.Start(ProgramCur.Path,info);
     }
     catch{
         MessageBox.Show(ProgramCur.Path+" is not available.");
     }
 }
Exemplo n.º 11
0
		///<summary>Launches the program using a combination of command line characters and the patient.Cur data.</summary>
		public static void SendData(Program ProgramCur,Patient pat) {
			string path=Programs.GetProgramPath(ProgramCur);
			if(pat==null) {
				try {
					Process.Start(path);//should start HandyDentist without bringing up a pt.
				}
				catch {
					MessageBox.Show(path+" is not available.");
				}
				return;
			}
			string info="-no:\"";
			if(ProgramProperties.GetPropVal(ProgramCur.ProgramNum,"Enter 0 to use PatientNum, or 1 to use ChartNum")=="0") {
				info+=pat.PatNum.ToString();
			}
			else {
				if(pat.ChartNumber==null || pat.ChartNumber=="") {
					MsgBox.Show("HandyDentist","This patient does not have a chart number.");
					return;
				}
				info+=Tidy(pat.ChartNumber);
			}
			info+="\" -fname:\""+Tidy(pat.FName)+"\" ";
			info+="\" -lname:\""+Tidy(pat.LName)+"\" ";
			try {
				Process.Start(path,info);
			}
			catch(Exception ex) {
				MessageBox.Show(ex.Message);
			}
		}
Exemplo n.º 12
0
 /// <summary>When a patient leaves a superfamily, this copies the superfamily level popups to be in both places. Takes pat leaving, and new superfamily. If newSuperFamily is 0, superfamily popups will not be copied from the old superfamily.</summary>
 public static void CopyForMovingSuperFamily(Patient pat,long newSuperFamily)
 {
     if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
         Meth.GetVoid(MethodBase.GetCurrentMethod(),pat);
         return;
     }
     //Get a list of all popups for the super family
     string command="SELECT * FROM popup "
         +"WHERE PopupLevel = "+POut.Int((int)EnumPopupLevel.SuperFamily)+" "
         +"AND PatNum IN (SELECT PatNum FROM patient WHERE SuperFamily = "+POut.Long(pat.SuperFamily)+")";
     List<Popup> SuperFamilyPopups=Crud.PopupCrud.SelectMany(command);
     Popup popup;
     for(int i=0;i<SuperFamilyPopups.Count;i++) {
         popup=SuperFamilyPopups[i].Copy();
         if(popup.PatNum==pat.PatNum) {//if popup is on the patient who's leaving, copy to superfamily head of old superfamily.
             popup.PatNum=pat.SuperFamily;
             if(newSuperFamily==0) {//If they are not going to a superfamily, delete the popup
                 Popups.DeleteObject(SuperFamilyPopups[i]);
             }
         }
         else {//if popup is on some other super family member, then copy to this patient.
             if(newSuperFamily!=0) {//Only if they are moving to a superfamily.
                 popup.PatNum=pat.PatNum;
             }
         }
         Popups.Insert(popup);//changes the PK
     }
 }
Exemplo n.º 13
0
 ///<summary></summary>
 public FormMedical(PatientNote patientNoteCur,Patient patCur)
 {
     InitializeComponent();// Required for Windows Form Designer support
     PatCur=patCur;
     PatientNoteCur=patientNoteCur;
     Lan.F(this);
 }
Exemplo n.º 14
0
		public static void SendData(Program ProgramCur,Patient pat) {
			string path=Programs.GetProgramPath(ProgramCur);
			if(pat==null) {
				try {
					Process.Start(path);//should start rayMage without bringing up a pt.
				}
				catch {
					MessageBox.Show(path+" is not available.");
				}
			}
			else {
				string info=" /PATID \"";
				if(ProgramProperties.GetPropVal(ProgramCur.ProgramNum,"Enter 0 to use PatientNum, or 1 to use ChartNum")=="0"){
					info+=pat.PatNum.ToString();
				}
				else{
					info+=pat.ChartNumber;
				}
				info+="\" /NAME \""+pat.FName.Replace(" ","").Replace("\"","")+"\" /SURNAME \""+pat.LName.Replace(" ","").Replace("\"","")+"\"";
				try {
					Process.Start(path,ProgramCur.CommandLine+info);
				}
				catch {
					MessageBox.Show(path+" is not available, or there is an error in the command line options.");
				}
			}
		}
Exemplo n.º 15
0
		///<summary>Launches the program using the patient.Cur data.</summary>
		public static void SendData(Program ProgramCur, Patient pat){
			string path=Programs.GetProgramPath(ProgramCur);
			ArrayList ForProgram=ProgramProperties.GetForProgram(ProgramCur.ProgramNum);;
			if(pat==null){
				MessageBox.Show("Please select a patient first");
				return;
			}
			string info="";
			//Patient id can be any string format
			ProgramProperty PPCur=ProgramProperties.GetCur(ForProgram, "Enter 0 to use PatientNum, or 1 to use ChartNum");;
			if(PPCur.PropertyValue=="0"){
				info+="-i \""+pat.PatNum.ToString()+"\" ";
			}
			else{
				info+="-i \""+pat.ChartNumber.Replace("\"","")+"\" ";
			}
			info+="-n \""+pat.LName.Replace("\"","")+", "
				+pat.FName.Replace("\"","")+"\"";
			//MessageBox.Show(info);
			try{
				Process.Start(path,info);
			}
			catch{
				MessageBox.Show(path+" is not available.");
			}
		}
Exemplo n.º 16
0
 ///<summary>Launches the program using a combination of command line characters and the patient.Cur data.</summary>
 public static void SendData(Program ProgramCur, Patient pat)
 {
     ArrayList ForProgram=ProgramProperties.GetForProgram(ProgramCur.ProgramNum);;
     if(pat!=null){
         ProgramProperty PPCur=ProgramProperties.GetCur(ForProgram, "Storage Path");
         string comline="-P"+PPCur.PropertyValue+@"\";
         //Patient id can be any string format
         PPCur=ProgramProperties.GetCur(ForProgram, "Enter 0 to use PatientNum, or 1 to use ChartNum");;
         if(PPCur.PropertyValue=="0"){
             comline+=pat.PatNum.ToString();
         }
         else{
             comline+=pat.ChartNumber;
         }
         comline+=" -N"+pat.LName+", "+pat.FName;
         comline=comline.Replace("\"","");//gets rid of any quotes
         comline=comline.Replace("'","");//gets rid of any single quotes
         try{
             Process.Start(ProgramCur.Path,comline);
         }
         catch{
             MessageBox.Show(ProgramCur.Path+" is not available.");
         }
     }//if patient is loaded
     else{
         try{
             Process.Start(ProgramCur.Path);//should start Trophy without bringing up a pt.
         }
         catch{
             MessageBox.Show(ProgramCur.Path+" is not available.");
         }
     }
 }
Exemplo n.º 17
0
		public FormAnesthesiaScore(Patient patCur,int anestheticRecordNum) {
			this.components = new System.ComponentModel.Container();
			InitializeComponent();
			Lan.F(this);
			PatCur = patCur;
			AnestheticRecordNum = anestheticRecordNum;
		}
Exemplo n.º 18
0
Arquivo: VixWin.cs Projeto: mnisl/OD
		///<summary>Sends data for Patient.Cur by command line interface.</summary>
		public static void SendData(Program ProgramCur,Patient pat) {
			string path=Programs.GetProgramPath(ProgramCur);
			if(pat==null) {
				return;
			}
			//Example: c:\vixwin\vixwin -I 123ABC -N Bill^Smith -P X:\VXImages\
			string info="-I ";
			bool isChartNum=PIn.Bool(ProgramProperties.GetPropVal(ProgramCur.ProgramNum,"Enter 0 to use PatientNum, or 1 to use ChartNum"));
			string ppImagePath=ProgramProperties.GetPropVal(ProgramCur.ProgramNum,"Optional Image Path");
			if(isChartNum) {
				info+=pat.ChartNumber;//max 64 char
			}
			else {
				info+=pat.PatNum.ToString();
			}
			info+=" -N "+pat.FName.Replace(" ","")+"^"+pat.LName.Replace(" ","");//no spaces allowed
			if(ppImagePath!="") {//optional image path
				if(!Directory.Exists(ppImagePath)) {
					MessageBox.Show("Unable to find image path "+ppImagePath);
					return;
				}
				info+=" -P "+ ppImagePath;
			}
			try {
				Process.Start(path,info);
			}
			catch(Exception ex){
				MessageBox.Show(ex.Message+"\r\nFile and command line:\r\n"+path+" "+info);
			}
		}
Exemplo n.º 19
0
		///<summary>Launches the program using the patient.Cur data.</summary>
		public static void SendData(Program ProgramCur, Patient pat){
			string path=Programs.GetProgramPath(ProgramCur);
			//mtconnector.exe -patid 123  -fname John  -lname Doe  -ssn 123456789  -dob 01/25/1962  -gender M
			ArrayList ForProgram=ProgramProperties.GetForProgram(ProgramCur.ProgramNum);;
			if(pat==null){
				MessageBox.Show("Please select a patient first");
				return;
			}
			string info="-patid ";
			ProgramProperty PPCur=ProgramProperties.GetCur(ForProgram, "Enter 0 to use PatientNum, or 1 to use ChartNum");;
			if(PPCur.PropertyValue=="0"){
				info+=pat.PatNum.ToString()+"  ";
			}
			else{
				info+=pat.ChartNumber+"  ";
			}
			info+="-fname "+pat.FName+"  "
				+"-lname "+pat.LName+"  "
				+"-ssn "+pat.SSN+"  "
				+"-dob "+pat.Birthdate.ToShortDateString()+"  "
				+"-gender ";
			if(pat.Gender==PatientGender.Male){
				info+="M";
			}
			else{
				info+="F";
			}
			try{
				Process.Start(path,info);
			}
			catch{
				MessageBox.Show(path+" is not available.");
			}
			
		}
Exemplo n.º 20
0
		///<summary></summary>
		public static void SendData(Program ProgramCur,Patient pat) {
			string path=Programs.GetProgramPath(ProgramCur);
			if(pat==null) {
				try {
					Process.Start(path);//should start SMARTDent without bringing up a pt.
				}
				catch {
					MessageBox.Show(path+" is not available.");
				}
				return;
			}
			string info="";
			if(ProgramProperties.GetPropVal(ProgramCur.ProgramNum,"Enter 0 to use PatientNum, or 1 to use ChartNum")=="0") {
				info+="\""+pat.PatNum.ToString()+"\" ";
			}
			else {
				info+="\""+Tidy(pat.ChartNumber)+"\" ";
			}
			if(pat.FName!="") {
				info+="\""+Tidy(pat.FName)+" ";
			}
			else {
				info+="\"";
			}
			info+=Tidy(pat.LName)+"\"";
			try {
				Process.Start(path,info);
			}
			catch(Exception ex) {
				MessageBox.Show(ex.Message);
			}
		}
Exemplo n.º 21
0
		/*
		private static Document[] RefreshAndFill(string command) {
			//No need to check RemotingRole; no call to db.
			return Fill(Db.GetTable(command));
		}*/

		///<summary>Usually, set just the extension before passing in the doc.  Inserts a new document into db, creates a filename based on Cur.DocNum, and then updates the db with this filename.  Should always refresh the document after calling this method in order to get the correct filename for RemotingRole.ClientWeb.</summary>
		public static long Insert(Document doc,Patient pat) {
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				doc.DocNum=Meth.GetLong(MethodBase.GetCurrentMethod(),doc,pat);
				return doc.DocNum;
			}
			doc.DocNum=Crud.DocumentCrud.Insert(doc);
			//If the current filename is just an extension, then assign it a unique name.
			if(doc.FileName==Path.GetExtension(doc.FileName)) {
				string extension=doc.FileName;
				doc.FileName="";
				string s=pat.LName+pat.FName;
				for(int i=0;i<s.Length;i++) {
					if(Char.IsLetter(s,i)) {
						doc.FileName+=s.Substring(i,1);
					}
				}
				doc.FileName+=doc.DocNum.ToString()+extension;//ensures unique name
				//there is still a slight chance that someone manually added a file with this name, so quick fix:
				string command="SELECT FileName FROM document WHERE PatNum="+POut.Long(doc.PatNum);
				DataTable table=Db.GetTable(command);
				string[] usedNames=new string[table.Rows.Count];
				for(int i=0;i<table.Rows.Count;i++) {
					usedNames[i]=PIn.String(table.Rows[i][0].ToString());
				}
				while(IsFileNameInList(doc.FileName,usedNames)) {
					doc.FileName="x"+doc.FileName;
				}
				/*Document[] docList=GetAllWithPat(doc.PatNum);
				while(IsFileNameInList(doc.FileName,docList)) {
					doc.FileName="x"+doc.FileName;
				}*/
				Update(doc);
			}
			return doc.DocNum;
		}
Exemplo n.º 22
0
 ///<summary>Launches the program using command line.</summary>
 public static void SendData(Program ProgramCur, Patient pat)
 {
     ArrayList ForProgram=ProgramProperties.GetForProgram(ProgramCur.ProgramNum);
     if(pat!=null){
         string info="";
         //Patient id can be any string format
         ProgramProperty PPCur=ProgramProperties.GetCur(ForProgram, "Enter 0 to use PatientNum, or 1 to use ChartNum");
         if(PPCur.PropertyValue=="0"){
             info+=" "+pat.PatNum.ToString();
         }
         else{
             info+=" "+pat.ChartNumber;
         }
         //We remove double-quotes from the first and last name of the patient so extra double-quotes don't
         //cause confusion in the command line parameters for Sopro.
         info+=" "+pat.LName.Replace("\"","")+" "+pat.FName.Replace("\"","");
         try{
             Process.Start(ProgramCur.Path,ProgramCur.CommandLine+info);
         }
         catch{
             MessageBox.Show(ProgramCur.Path+" is not available, or there is an error in the command line options.");
         }
     }//if patient is loaded
     else{
         try{
             Process.Start(ProgramCur.Path);//should start Sopro without bringing up a pt.
         }
         catch{
             MessageBox.Show(ProgramCur.Path+" is not available.");
         }
     }
 }
Exemplo n.º 23
0
 ///<summary>Launches the program using the patient.Cur data.</summary>
 public static void SendData(Program ProgramCur, Patient pat)
 {
     //DxStart.exe ”PatientID” ”FamilyName” ”FirstName” ”BirthDate”
     ArrayList ForProgram=ProgramProperties.GetForProgram(ProgramCur.ProgramNum);
     if(pat==null){
         MessageBox.Show("Please select a patient first");
         return;
     }
     string info="";
     //Patient id can be any string format
     ProgramProperty PPCur=ProgramProperties.GetCur(ForProgram, "Enter 0 to use PatientNum, or 1 to use ChartNum");
     if(PPCur.PropertyValue=="0"){
         info+="\""+pat.PatNum.ToString()+"\" ";
     }
     else{
         info+="\""+pat.ChartNumber.Replace("\"","")+"\" ";
     }
     info+="\""+pat.LName.Replace("\"","")+"\" "
         +"\""+pat.FName.Replace("\"","")+"\" "
         +"\""+pat.Birthdate.ToString("dd/MM/yyyy")+"\"";//Planmeca is a Finland based company, so their date format is dd/MM/yyyy. We used to send date format "MM/dd/yyyy" for our American customers before 12/19/2011.
     try{
         Process.Start(ProgramCur.Path,info);
     }
     catch{
         MessageBox.Show(ProgramCur.Path+" is not available.");
     }
 }
Exemplo n.º 24
0
		///<summary>Command line.</summary>
		public static void SendData(Program ProgramCur, Patient pat){
			string path=Programs.GetProgramPath(ProgramCur);
			if(pat==null) {
				try {
					Process.Start(path);//Start iCat without bringing up a pt.
				}
				catch {
					MessageBox.Show(path+" is not available.");
				}
				return;
			}
			ArrayList ForProgram=ProgramProperties.GetForProgram(ProgramCur.ProgramNum);
			ProgramProperty PPCur=ProgramProperties.GetCur(ForProgram,"Enter 0 to use PatientNum, or 1 to use ChartNum");
			if(PPCur.PropertyValue=="1" && pat.ChartNumber=="") {
				MessageBox.Show("This patient must have a ChartNumber entered first.");
				return;
			}
			PPCur=ProgramProperties.GetCur(ForProgram,"Acquisition computer name");
			try {
				if(Environment.MachineName.ToUpper()==PPCur.PropertyValue.ToUpper()) {
					SendDataServer(ProgramCur,ForProgram,pat);
				}
				else {
					SendDataWorkstation(ProgramCur,ForProgram,pat);
				}
			}
			catch(Exception e) {
				MessageBox.Show("Error: "+e.Message);
			}
		}
		///<summary></summary>
		public FormEmailMessageEdit(EmailMessage messageCur){
			InitializeComponent();// Required for Windows Form Designer support
			Lan.F(this);
			MessageCur=messageCur.Copy();
			_patCur=Patients.GetPat(messageCur.PatNum);//we could just as easily pass this in.
			listAttachments.ContextMenu=contextMenuAttachments;
		}
Exemplo n.º 26
0
Arquivo: ImageFX.cs Projeto: mnisl/OD
		///<summary>Launches the program using a combination of command line characters and the patient.Cur data.  They also have an available file based method which passes more information, but we don't use it yet.</summary>
		public static void SendData(Program ProgramCur, Patient pat){
			string path=Programs.GetProgramPath(ProgramCur);
			ArrayList ForProgram=ProgramProperties.GetForProgram(ProgramCur.ProgramNum);;
			if(pat!=null){
				string info="-";
				ProgramProperty PPCur=ProgramProperties.GetCur(ForProgram, "Enter 0 to use PatientNum, or 1 to use ChartNum");;
				if(PPCur.PropertyValue=="0"){
					info+=ClipTo(pat.PatNum.ToString(),10)+";";
				}
				else{
					info+=ClipTo(pat.ChartNumber,10)+";";
				}
				info+=ClipTo(pat.FName,25)+";"
					+ClipTo(pat.LName,25)+";"
					+ClipTo(pat.SSN,15)+";"
					+pat.Birthdate.ToString("MM/dd/yyyy")+";";
				try{
					Process.Start(path,info);
				}
				catch{
					MessageBox.Show(path+" is not available.");
				}
			}//if patient is loaded
			else{
				try{
					Process.Start(path);//should start ImageFX without bringing up a pt.
				}
				catch{
					MessageBox.Show(path+" is not available.");
				}
			}
		}
Exemplo n.º 27
0
		///<summary>Sends data for Patient.Cur by command line interface.</summary>
		public static void SendData(Program ProgramCur,Patient pat) {
			string path=Programs.GetProgramPath(ProgramCur);
			if(pat==null) {
				MsgBox.Show("VixWinBase36","Please select a patient first.");
				return;
			}
			//Example: c:\vixwin\vixwin -I 12ABYZ -N Bill^Smith -P X:\VXImages\12AB#$\
			string info="-I "+ConvertToBase36(pat.PatNum);
			string ppImagePath=ProgramProperties.GetPropVal(ProgramCur.ProgramNum,"Image Path");
			if(pat.FName.ToString()!="") {
				info+=" -N "+Tidy(pat.FName)+"^"+Tidy(pat.LName);
			}
			if(ppImagePath!="") {//optional image path
				if(!Directory.Exists(ppImagePath)) {
					MessageBox.Show("Unable to find image path "+ppImagePath);
					return;
				}
				if(!ppImagePath.EndsWith("\\")) {//if program path doesn't end with "\" then add it to the end.
					ppImagePath+="\\";
				}
				ppImagePath+=ConvertToBase36(pat.PatNum)+"\\";//if we later allow ChartNumbers, then we will have to validate them to be 6 digits or less.
				info+=" -P "+ ppImagePath;
			}
			try {
				Process.Start(path,info);
			}
			catch {
				MessageBox.Show(path+" is not available. Ensure that the program and image paths are valid.");
			}
		}
Exemplo n.º 28
0
Arquivo: MedLabs.cs Projeto: mnisl/OD
		///<summary>Get unique MedLab orders, grouped by PatNum, ProvNum, and SpecimenID.  Also returns the most recent DateTime the results
		///were released from the lab, a list of test descriptions ordered, and the count of results for each test.
		///If includeNoPat==true, the lab orders not attached to a patient will be included.
		///If groupBySpec==true, all tests for one specimen will be in one row of the grid with the most recent date reported.</summary>
		public static DataTable GetOrdersForPatient(Patient pat,bool includeNoPat,bool groupBySpec,DateTime dateReportedStart,DateTime dateReportedEnd) {
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				return Meth.GetTable(MethodBase.GetCurrentMethod(),pat,includeNoPat,groupBySpec,dateReportedStart,dateReportedEnd);
			}
			//include all patients unless a patient is specified.
			string patNumClause="PatNum>0";
			if(pat!=null) {
				patNumClause="PatNum="+POut.Long(pat.PatNum);
			}
			//do not include patnum=0 unless specified.
			string noPatClause="";
			if(includeNoPat) {
				noPatClause="OR PatNum=0";
			}
			string groupByTestClause="";
			if(!groupBySpec) {
				groupByTestClause=",ObsTestID";
			}
			string command="SELECT PatNum,ProvNum,MAX(DateTimeReported) AS DateTimeReported,SpecimenID,SpecimenIDFiller,"
				+DbHelper.GroupConcat("ObsTestDescript",distinct :true,separator :"\r\n")+" AS ObsTestDescript,"
				+"COUNT(DISTINCT medlabresult.ObsID,medlabresult.ObsIDSub) AS ResultCount "
				+"FROM medlab "
				+"INNER JOIN medlabresult ON medlab.MedLabNum=medlabresult.MedLabNum "
				+"WHERE ("+patNumClause+" "+noPatClause+") " //Ex: WHERE (PatNum>0 OR Patnum=0) 
				+"AND "+DbHelper.DtimeToDate("DateTimeReported")+" BETWEEN "+POut.Date(dateReportedStart)+" AND "+POut.Date(dateReportedEnd)+" "
				+"GROUP BY PatNum,ProvNum,SpecimenID"+groupByTestClause+" "
				+"ORDER BY MAX(DateTimeReported) DESC,SpecimenID,medlab.MedLabNum";//most recently received lab on top, with all for a specific specimen together
			return Db.GetTable(command);
		}
Exemplo n.º 29
0
Arquivo: DrCeph.cs Projeto: mnisl/OD
		///<summary>Uses a VB dll to launch.</summary>
		public static void SendData(Program ProgramCur, Patient pat){
			string path=Programs.GetProgramPath(ProgramCur);
			if(pat==null){
				MessageBox.Show("Please select a patient first.");
				return;
			}
			//js This was originally added on 9/2/09, probably due to race affecting ceph proportions.  But since we can't find any documentation, and since a customer is complaining, we are removing it for now.  If we add it back, we will document exactly why.
			//if(pat.Race==PatientRace.Unknown) {
			//  MessageBox.Show("Race must be entered first.");
			//  return;
			//}
			//Make sure the program is running
			if(Process.GetProcessesByName("DrCeph").Length==0) {
				try{
					Process.Start(path);
				}
				catch{
					MsgBox.Show("DrCeph","Program path not set properly.");
					return;
				}
				Thread.Sleep(TimeSpan.FromSeconds(4));
			}
			ArrayList ForProgram=ProgramProperties.GetForProgram(ProgramCur.ProgramNum);;
			ProgramProperty PPCur=ProgramProperties.GetCur(ForProgram, "Enter 0 to use PatientNum, or 1 to use ChartNum");;
			string patID="";
			if(PPCur.PropertyValue=="0"){
				patID=pat.PatNum.ToString();
			}
			else{
				patID=pat.ChartNumber;
			}
			try{
				PatientRaceOld raceOld=PatientRaces.GetPatientRaceOldFromPatientRaces(pat.PatNum);
				List<RefAttach> referalList=RefAttaches.Refresh(pat.PatNum);
				Provider prov=Providers.GetProv(Patients.GetProvNum(pat));
				string provName=prov.FName+" "+prov.MI+" "+prov.LName+" "+prov.Suffix;
				Family fam=Patients.GetFamily(pat.PatNum);
				Patient guar=fam.ListPats[0];
				string relat="";
				if(guar.PatNum==pat.PatNum){
					relat="Self";
				}
				else if(guar.Gender==PatientGender.Male	&& pat.Position==PatientPosition.Child){
					relat="Father";
				}
				else if(guar.Gender==PatientGender.Female	&& pat.Position==PatientPosition.Child){
					relat="Mother";
				}
				else{
					relat="Unknown";
				}
				VBbridges.DrCephNew.Launch(patID,pat.FName,pat.MiddleI,pat.LName,pat.Address,pat.Address2,pat.City,
					pat.State,pat.Zip,pat.HmPhone,pat.SSN,pat.Gender.ToString(),raceOld.ToString(),"",pat.Birthdate.ToString(),
					DateTime.Today.ToShortDateString(),RefAttachL.GetReferringDr(referalList),provName,
					guar.GetNameFL(),guar.Address,guar.Address2,guar.City,guar.State,guar.Zip,guar.HmPhone,relat);
			}
			catch{
				MessageBox.Show("DrCeph not responding.  It might not be installed properly.");
			}
		}
Exemplo n.º 30
0
Arquivo: MiPACS.cs Projeto: mnisl/OD
		///<summary>Launches the program using a combination of command line characters and the patient.Cur data.///</summary>
/*The command line integration works as follows:

C:\Program Files\MiDentView\Cmdlink.exe /ID=12345 /FN=JOHN /LN=DOE /BD=10/01/1985 /Sex=M

Parameters:'/ID=' for ID number, '/FN=' for Firstname, '/LN=' for Lastname, '/BD=' for Birthdate, '/Sex=' for Sex.

Example of a name with special characters (in this case, spaces):
C:\Program Files\MiDentView\Cmdlink.exe /ID=12345 /FN=Oscar /LN=De La Hoya /BD=10/01/1985 /Sex=M
		 */
		public static void SendData(Program ProgramCur, Patient pat){
			string path=Programs.GetProgramPath(ProgramCur);
			if(pat==null) {
				try {
					Process.Start(path);//should start MiPACS without bringing up a pt.
				}
				catch {
					MessageBox.Show(path+" is not available.");
				}
			}
			string gender=(pat.Gender==PatientGender.Female)?"F":"M";//M for Male, F for Female, M for Unknown.
			string info="";
			if(ProgramProperties.GetPropVal(ProgramCur.ProgramNum,"Enter 0 to use PatientNum, or 1 to use ChartNum")=="0"){
				info+="/ID="+pat.PatNum.ToString();
			}
			else{
				info+="/ID="+pat.ChartNumber;
			}
			info+= " /FN=" + pat.FName //special characters claimed to be ok
				+ " /LN=" + pat.LName 
				+ " /BD=" + pat.Birthdate.ToShortDateString() 
				+ " /Sex=" + gender;
			try {
				Process.Start(path,info);
			}
			catch {
				MessageBox.Show(path + " is not available.");
			}
		}
Exemplo n.º 31
0
        /*
         * public static Document Import(Bitmap image,long docCategory,Patient pat) {
         *      string patFolder="";
         *      if(PrefC.UsingAtoZfolder) {
         *              patFolder=GetPatientFolder(pat,GetPreferredAtoZpath());
         *      }
         *      Document doc=new Document();
         *      doc.FileName=".jpg";
         *      doc.DateCreated=DateTime.Today;
         *      doc.DocCategory=docCategory;
         *      doc.PatNum=pat.PatNum;
         *      doc.ImgType=ImageType.Photo;
         *      //doc.RawBase64 handled further down.
         *      //doc.Thumbnail="";//no thumbnail yet
         *      Documents.Insert(doc,pat);//this assigns a filename and saves to db
         *      doc=Documents.GetByNum(doc.DocNum);
         *      try {
         *              SaveDocument(doc,image,ImageFormat.Jpeg,patFolder);
         *              if(PrefC.UsingAtoZfolder) {
         *                      Documents.Update(doc);
         *              }
         *      }
         *      catch {
         *              Documents.Delete(doc);
         *              throw;
         *      }
         *      return doc;
         * }*/

        /// <summary>Saves to either AtoZ folder or to db.  Saves image as a jpg.  Compression will differ depending on imageType.</summary>
        public static Document Import(Bitmap image, long docCategory, ImageType imageType, Patient pat)
        {
            string patFolder = "";

            if (PrefC.UsingAtoZfolder)
            {
                patFolder = GetPatientFolder(pat, GetPreferredAtoZpath());
            }
            Document doc = new Document();

            doc.ImgType     = imageType;
            doc.FileName    = ".jpg";
            doc.DateCreated = DateTime.Today;
            doc.PatNum      = pat.PatNum;
            doc.DocCategory = docCategory;
            Documents.Insert(doc, pat);           //creates filename and saves to db
            doc = Documents.GetByNum(doc.DocNum);
            long qualityL = 0;

            if (imageType == ImageType.Radiograph)
            {
                qualityL = 100;
            }
            else if (imageType == ImageType.Photo)
            {
                qualityL = 100;
            }
            else              //Assume document
                              //Possible values 0-100?
            {
                qualityL = PrefC.GetLong(PrefName.ScannerCompression);
            }
            ImageCodecInfo myImageCodecInfo;

            ImageCodecInfo[] encoders;
            encoders         = ImageCodecInfo.GetImageEncoders();
            myImageCodecInfo = null;
            for (int j = 0; j < encoders.Length; j++)
            {
                if (encoders[j].MimeType == "image/jpeg")
                {
                    myImageCodecInfo = encoders[j];
                }
            }
            EncoderParameters myEncoderParameters = new EncoderParameters(1);
            EncoderParameter  myEncoderParameter  = new EncoderParameter(System.Drawing.Imaging.Encoder.Quality, qualityL);

            myEncoderParameters.Param[0] = myEncoderParameter;
            //AutoCrop()?
            try {
                SaveDocument(doc, image, myImageCodecInfo, myEncoderParameters, patFolder);
                if (!PrefC.UsingAtoZfolder)
                {
                    Documents.Update(doc);                    //because SaveDocument stuck the image in doc.RawBase64.
                    //no thumbnail yet
                }
            }
            catch {
                Documents.Delete(doc);
                throw;
            }
            return(doc);
        }
Exemplo n.º 32
0
        /// <summary>Only Called only from FormPayment.butOK click.  Only called if the user did not enter any splits.  Usually just adds one split for the current patient.  But if that would take the balance negative, then it loops through all other family members and creates splits for them.  It might still take the current patient negative once all other family members are zeroed out.</summary>
        public static List <PaySplit> Allocate(Payment pay)        //double amtTot,int patNum,Payment payNum){
        {
            if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
            {
                return(Meth.GetObject <List <PaySplit> >(MethodBase.GetCurrentMethod(), pay));
            }
            string command =
                "SELECT Guarantor FROM patient "
                + "WHERE PatNum = " + POut.Long(pay.PatNum);
            DataTable table = Db.GetTable(command);

            if (table.Rows.Count == 0)
            {
                return(new List <PaySplit>());
            }
            command =
                "SELECT patient.PatNum,EstBalance,PriProv,SUM(InsPayEst)+SUM(Writeoff) insEst_ "
                + "FROM patient "
                + "LEFT JOIN claimproc ON patient.PatNum=claimproc.PatNum "
                + "AND Status=0 "               //NotReceived
                + "WHERE Guarantor = " + table.Rows[0][0].ToString() + " "
                + "GROUP BY  patient.PatNum,EstBalance,PriProv";
            //+" ORDER BY PatNum!="+POut.PInt(pay.PatNum);//puts current patient in position 0 //Oracle does not allow
            table = Db.GetTable(command);
            List <Patient> pats = new List <Patient>();
            Patient        pat;

            //first, put the current patient at position 0.
            for (int i = 0; i < table.Rows.Count; i++)
            {
                if (table.Rows[i]["PatNum"].ToString() == pay.PatNum.ToString())
                {
                    pat            = new Patient();
                    pat.PatNum     = PIn.Long(table.Rows[i][0].ToString());
                    pat.EstBalance = PIn.Double(table.Rows[i][1].ToString());
                    if (!PrefC.GetBool(PrefName.BalancesDontSubtractIns))
                    {
                        pat.EstBalance -= PIn.Double(table.Rows[i]["insEst_"].ToString());
                    }
                    pat.PriProv = PIn.Long(table.Rows[i][2].ToString());
                    pats.Add(pat.Copy());
                }
            }
            //then, do all the rest of the patients.
            for (int i = 0; i < table.Rows.Count; i++)
            {
                if (table.Rows[i]["PatNum"].ToString() == pay.PatNum.ToString())
                {
                    continue;
                }
                pat            = new Patient();
                pat.PatNum     = PIn.Long(table.Rows[i][0].ToString());
                pat.EstBalance = PIn.Double(table.Rows[i][1].ToString());
                if (!PrefC.GetBool(PrefName.BalancesDontSubtractIns))
                {
                    pat.EstBalance -= PIn.Double(table.Rows[i]["insEst_"].ToString());
                }
                pat.PriProv = PIn.Long(table.Rows[i][2].ToString());
                pats.Add(pat.Copy());
            }
            //first calculate all the amounts
            double amtRemain = pay.PayAmt;          //start off with the full amount

            double[] amtSplits = new double[pats.Count];
            //loop through each family member, starting with current
            for (int i = 0; i < pats.Count; i++)
            {
                if (pats[i].EstBalance == 0 || pats[i].EstBalance < 0)
                {
                    continue;                       //don't apply paysplits to anyone with a negative balance
                }
                if (amtRemain < pats[i].EstBalance) //entire remainder can be allocated to this patient
                {
                    amtSplits[i] = amtRemain;
                    amtRemain    = 0;
                    break;
                }
                else                 //amount remaining is more than or equal to the estBal for this family member
                {
                    amtSplits[i] = pats[i].EstBalance;
                    amtRemain   -= pats[i].EstBalance;
                }
            }
            //add any remainder to the split for this patient
            amtSplits[0] += amtRemain;
            //now create a split for each non-zero amount
            PaySplit        PaySplitCur;
            List <PaySplit> retVal = new List <PaySplit>();

            for (int i = 0; i < pats.Count; i++)
            {
                if (amtSplits[i] == 0)
                {
                    continue;
                }
                PaySplitCur           = new PaySplit();
                PaySplitCur.PatNum    = pats[i].PatNum;
                PaySplitCur.PayNum    = pay.PayNum;
                PaySplitCur.ProcDate  = pay.PayDate;
                PaySplitCur.DatePay   = pay.PayDate;
                PaySplitCur.ClinicNum = pay.ClinicNum;
                PaySplitCur.ProvNum   = Patients.GetProvNum(pats[i]);
                PaySplitCur.SplitAmt  = Math.Round(amtSplits[i], CultureInfo.CurrentCulture.NumberFormat.CurrencyDecimalDigits);
                //PaySplitCur.InsertOrUpdate(true);
                retVal.Add(PaySplitCur);
            }
            //finally, adjust each EstBalance, but no need to do current patient
            //This no longer works here.  Must do it when closing payment window somehow

            /*for(int i=1;i<pats.Length;i++){
             *      if(amtSplits[i]==0){
             *              continue;
             *      }
             *      command="UPDATE patient SET EstBalance=EstBalance-"+POut.PDouble(amtSplits[i])
             +" WHERE PatNum="+POut.PInt(pats[i].PatNum);
             *      Db.NonQ(command);
             * }*/
            return(retVal);
        }
Exemplo n.º 33
0
 ///<summary></summary>
 public Family()
 {
     ListPats = new Patient[0];
 }
Exemplo n.º 34
0
        /// <summary>Always saves as bmp.  So the 'paste to mount' logic needs to be changed to prevent conversion to bmp.</summary>
        public static Document ImportImageToMount(Bitmap image, short rotationAngle, long mountItemNum, long docCategory, Patient pat)
        {
            string   patFolder     = GetPatientFolder(pat, GetPreferredAtoZpath());
            string   fileExtention = ".bmp";          //The file extention to save the greyscale image as.
            Document doc           = new Document();

            doc.MountItemNum   = mountItemNum;
            doc.DegreesRotated = rotationAngle;
            doc.ImgType        = ImageType.Radiograph;
            doc.FileName       = fileExtention;
            doc.DateCreated    = DateTime.Today;
            doc.PatNum         = pat.PatNum;
            doc.DocCategory    = docCategory;
            doc.WindowingMin   = PrefC.GetInt(PrefName.ImageWindowingMin);
            doc.WindowingMax   = PrefC.GetInt(PrefName.ImageWindowingMax);
            Documents.Insert(doc, pat);           //creates filename and saves to db
            doc = Documents.GetByNum(doc.DocNum);
            try {
                SaveDocument(doc, image, ImageFormat.Bmp, patFolder);
            }
            catch {
                Documents.Delete(doc);
                throw;
            }
            return(doc);
        }
Exemplo n.º 35
0
        ///<summary>Only called from Chart for now.  No validation is performed here.  Validate before calling.  There are many validtion checks, including the NPI must be exactly 10 digits.</summary>
        public static string BuildNewCropClickThroughXml(Provider prov, Employee emp, Patient pat)
        {
            string   deaNumDefault = ProviderClinics.GetDEANum(prov.ProvNum);
            NCScript ncScript      = new NCScript();

            ncScript.Credentials                = new CredentialsType();
            ncScript.Credentials.partnerName    = NewCrop.NewCropPartnerName;
            ncScript.Credentials.name           = NewCrop.NewCropAccountName;
            ncScript.Credentials.password       = NewCrop.NewCropAccountPasssword;
            ncScript.Credentials.productName    = NewCrop.NewCropProductName;
            ncScript.Credentials.productVersion = NewCrop.NewCropProductVersion;
            ncScript.UserRole = new UserRoleType();
            bool isMidlevel = false;

            if (emp == null)           //Provider
            {
                if (prov.IsSecondary)  //Mid-level provider
                {
                    isMidlevel = true;
                    //Secondary (HYG) providers go accross to NewCrop as midlevel providers for now to satisfy the Ohio prescriber requirements.
                    //HYG providers are not normally able to click through to NewCrop because they do not have an NPI number and an NPI is required.
                    //In the future, instead of using the IsSecondary flag as as workaround, we should instead create a new field on the provider table
                    //or perhaps the userod table to allow the user to select the type of provider.
                    ncScript.UserRole.user = UserType.MidlevelPrescriber;
                    ncScript.UserRole.role = RoleType.midlevelPrescriber;
                }
                else                  //Fully licensed provider
                {
                    ncScript.UserRole.user = UserType.LicensedPrescriber;
                    ncScript.UserRole.role = RoleType.doctor;
                }
            }
            else              //Employee
            {
                ncScript.UserRole.user = UserType.Staff;
                ncScript.UserRole.role = RoleType.nurse;
            }
            ncScript.Destination = new DestinationType();
            ncScript.Destination.requestedPage = RequestedPageType.compose;                                //This is the tab that the user will want 90% of the time.
            string practiceTitle    = Tidy(PrefC.GetString(PrefName.PracticeTitle), 50);                   //May be blank.
            string practicePhone    = PrefC.GetString(PrefName.PracticePhone);                             //Validated to be 10 digits within the chart.
            string practiceFax      = PrefC.GetString(PrefName.PracticeFax);                               //Validated to be 10 digits within the chart.
            string practiceAddress  = PrefC.GetString(PrefName.PracticeAddress);                           //Validated to exist in chart.
            string practiceAddress2 = PrefC.GetString(PrefName.PracticeAddress2);                          //May be blank.
            string practiceCity     = PrefC.GetString(PrefName.PracticeCity);                              //Validated to exist in chart.
            string practiceState    = PrefC.GetString(PrefName.PracticeST).ToUpper();                      //Validated to be a US state code in chart.
            string practiceZip      = Regex.Replace(PrefC.GetString(PrefName.PracticeZip), "[^0-9]*", ""); //Zip with all non-numeric characters removed. Validated to be 9 digits in chart.
            string practiceZip4     = practiceZip.Substring(5);                                            //Last 4 digits of zip.

            practiceZip = practiceZip.Substring(0, 5);                                                     //First 5 digits of zip.
            string country = "US";                                                                         //Always United States for now.

            //if(CultureInfo.CurrentCulture.Name.Length>=2) {
            //  country=CultureInfo.CurrentCulture.Name.Substring(CultureInfo.CurrentCulture.Name.Length-2);
            //}
            ncScript.Account = new AccountTypeRx();
            //Each LicensedPrescriberID must be unique within an account. Since we send ProvNum for LicensedPrescriberID, each OD database must have a unique AccountID.
            ncScript.Account.ID                        = PrefC.GetString(PrefName.NewCropAccountId); //Customer account number then a dash then a random alpha-numeric string of 3 characters, followed by 2 digits.
            ncScript.Account.accountName               = practiceTitle;                              //May be blank.
            ncScript.Account.siteID                    = "1";                                        //Always send 1.  For each AccountID/SiteID pair, a separate database will be created in NewCrop.
            ncScript.Account.AccountAddress            = new AddressType();
            ncScript.Account.AccountAddress.address1   = practiceAddress;                            //Validated to exist in chart.
            ncScript.Account.AccountAddress.address2   = practiceAddress2;                           //May be blank.
            ncScript.Account.AccountAddress.city       = practiceCity;                               //Validated to exist in chart.
            ncScript.Account.AccountAddress.state      = practiceState;                              //Validated to be a US state code in chart.
            ncScript.Account.AccountAddress.zip        = practiceZip;                                //Validated to be 9 digits in chart. First 5 digits go in this field.
            ncScript.Account.AccountAddress.zip4       = practiceZip4;                               //Validated to be 9 digits in chart. Last 4 digits go in this field.
            ncScript.Account.AccountAddress.country    = country;                                    //Validated above.
            ncScript.Account.accountPrimaryPhoneNumber = practicePhone;                              //Validated to be 10 digits within the chart.
            ncScript.Account.accountPrimaryFaxNumber   = practiceFax;                                //Validated to be 10 digits within the chart.
            ncScript.Location = new LocationType();
            ProviderClinic provClinic = null;

            if (PrefC.GetBool(PrefName.EasyNoClinics) ||
                (!PrefC.GetBool(PrefName.ElectronicRxClinicUseSelected) && pat.ClinicNum == 0) ||
                (PrefC.GetBool(PrefName.ElectronicRxClinicUseSelected) && Clinics.ClinicNum == 0 && pat.ClinicNum == 0))
            {                                                                  //No clinic.
                ncScript.Location.ID                       = "0";              //Always 0, since clinicnums must be >= 1, will never overlap with a clinic if the office turns clinics on after first use.
                ncScript.Location.locationName             = practiceTitle;    //May be blank.
                ncScript.Location.LocationAddress          = new AddressType();
                ncScript.Location.LocationAddress.address1 = practiceAddress;  //Validated to exist in chart.
                ncScript.Location.LocationAddress.address2 = practiceAddress2; //May be blank.
                ncScript.Location.LocationAddress.city     = practiceCity;     //Validated to exist in chart.
                ncScript.Location.LocationAddress.state    = practiceState;    //Validated to be a US state code in chart.
                ncScript.Location.LocationAddress.zip      = practiceZip;      //Validated to be 9 digits in chart. First 5 digits go in this field.
                ncScript.Location.LocationAddress.zip4     = practiceZip4;     //Validated to be 9 digits in chart. Last 4 digits go in this field.
                ncScript.Location.LocationAddress.country  = country;          //Validated above.
                ncScript.Location.primaryPhoneNumber       = practicePhone;    //Validated to be 10 digits within the chart.
                ncScript.Location.primaryFaxNumber         = practiceFax;      //Validated to be 10 digits within the chart.
                ncScript.Location.pharmacyContactNumber    = practicePhone;    //Validated to be 10 digits within the chart.
            }
            else                                                               //Using clinics.
            {
                Clinic clinic = null;
                if (PrefC.GetBool(PrefName.ElectronicRxClinicUseSelected) && Clinics.ClinicNum != 0)
                {
                    clinic = Clinics.GetClinic(Clinics.ClinicNum);
                }
                else
                {
                    clinic = Clinics.GetClinic(pat.ClinicNum);
                }
                provClinic                                 = ProviderClinics.GetOne(prov.ProvNum, clinic.ClinicNum);
                ncScript.Location.ID                       = clinic.ClinicNum.ToString(); //A positive integer.
                ncScript.Location.locationName             = clinic.Description;          //May be blank.
                ncScript.Location.LocationAddress          = new AddressType();
                ncScript.Location.LocationAddress.address1 = clinic.Address;              //Validated to exist in chart.
                ncScript.Location.LocationAddress.address2 = clinic.Address2;             //May be blank.
                ncScript.Location.LocationAddress.city     = clinic.City;                 //Validated to exist in chart.
                ncScript.Location.LocationAddress.state    = clinic.State.ToUpper();      //Validated to be a US state code in chart.
                string clinicZip  = Regex.Replace(clinic.Zip, "[^0-9]*", "");             //Zip with all non-numeric characters removed. Validated to be 9 digits in chart.
                string clinicZip4 = clinicZip.Substring(5);                               //Last 4 digits of zip.
                clinicZip = clinicZip.Substring(0, 5);                                    //First 5 digits of zip.
                ncScript.Location.LocationAddress.zip     = clinicZip;                    //Validated to be 9 digits in chart. First 5 digits go in this field.
                ncScript.Location.LocationAddress.zip4    = clinicZip4;                   //Validated to be 9 digits in chart. Last 4 digits go in this field.
                ncScript.Location.LocationAddress.country = country;                      //Validated above.
                ncScript.Location.primaryPhoneNumber      = clinic.Phone;                 //Validated to be 10 digits within the chart.
                ncScript.Location.primaryFaxNumber        = clinic.Fax;                   //Validated to be 10 digits within the chart.
                ncScript.Location.pharmacyContactNumber   = clinic.Phone;                 //Validated to be 10 digits within the chart.
            }
            //Each unique provider ID sent to NewCrop will cause a billing charge.
            //Some customer databases have provider duplicates, because they have one provider record per clinic with matching NPIs.
            //We send NPI as the ID to prevent extra NewCrop charges.
            //Conversation with NewCrop:
            //Question: If one of our customers clicks through to NewCrop with 2 different LicensedPrescriber.ID values,
            //          but with the same provider name and NPI, will Open Dental be billed twice or just one time for the NPI used?
            //Answer:   "They would be billed twice. The IDs you send us should always be maintained and unique.
            //          Users are always identified by LicensedPrescriber ID, since their name or credentials could potentially change."
            if (isMidlevel)
            {
                ncScript.MidlevelPrescriber    = new MidlevelPrescriberType();
                ncScript.MidlevelPrescriber.ID = prov.NationalProvID;
                //UPIN is obsolete
                ncScript.MidlevelPrescriber.LicensedPrescriberName = NewCrop.GetPersonNameForProvider(prov);
                if (deaNumDefault.ToLower() == "none")
                {
                    ncScript.MidlevelPrescriber.dea = "NONE";
                }
                else
                {
                    ncScript.MidlevelPrescriber.dea = deaNumDefault;
                }
                if (provClinic != null)
                {
                    ncScript.MidlevelPrescriber.locationDea = provClinic.DEANum;
                }
                ncScript.MidlevelPrescriber.licenseState  = prov.StateWhereLicensed.ToUpper(); //Validated to be a US state code in the chart.
                ncScript.MidlevelPrescriber.licenseNumber = prov.StateLicense;                 //Validated to exist in chart.
                ncScript.MidlevelPrescriber.npi           = prov.NationalProvID;               //Validated to be 10 digits in chart.
            }
            else                                                                               //Licensed presriber
            {
                ncScript.LicensedPrescriber    = new LicensedPrescriberType();
                ncScript.LicensedPrescriber.ID = prov.NationalProvID;
                //UPIN is obsolete
                ncScript.LicensedPrescriber.LicensedPrescriberName = NewCrop.GetPersonNameForProvider(prov);
                if (deaNumDefault.ToLower() == "none")
                {
                    ncScript.LicensedPrescriber.dea = "NONE";
                }
                else
                {
                    ncScript.LicensedPrescriber.dea = deaNumDefault;
                }
                if (provClinic != null)
                {
                    ncScript.LicensedPrescriber.locationDea = provClinic.DEANum;
                }
                ncScript.LicensedPrescriber.licenseState  = prov.StateWhereLicensed.ToUpper(); //Validated to be a US state code in the chart.
                ncScript.LicensedPrescriber.licenseNumber = prov.StateLicense;                 //Validated to exist in chart.
                ncScript.LicensedPrescriber.npi           = prov.NationalProvID;               //Validated to be 10 digits in chart.
                //ncScript.LicensedPrescriber.freeformCredentials=;//This is where DDS and DMD should go, but we don't support this yet. Probably not necessary anyway.
            }
            if (emp != null)
            {
                ncScript.Staff                  = new StaffType();
                ncScript.Staff.ID               = "emp" + emp.EmployeeNum.ToString(); //A positive integer. Returned in the ExternalUserID field when retreiving prescriptions from NewCrop. Also, provider ID is returned in the same field if a provider created the prescription, so that we can create a distintion between employee IDs and provider IDs.
                ncScript.Staff.StaffName        = new PersonNameType();
                ncScript.Staff.StaffName.first  = emp.FName;                          //First name or last name will not be blank. Validated in Chart.
                ncScript.Staff.StaffName.last   = emp.LName;                          //First name or last name will not be blank. Validated in Chart.
                ncScript.Staff.StaffName.middle = emp.MiddleI;                        //May be blank.
            }
            ncScript.Patient                     = new PatientType();
            ncScript.Patient.ID                  = pat.PatNum.ToString(); //A positive integer.
            ncScript.Patient.PatientName         = new PersonNameType();
            ncScript.Patient.PatientName.last    = pat.LName;             //Validated to exist in Patient Edit window.
            ncScript.Patient.PatientName.first   = pat.FName;             //May be blank.
            ncScript.Patient.PatientName.middle  = pat.MiddleI;           //May be blank.
            ncScript.Patient.medicalRecordNumber = pat.PatNum.ToString(); //A positive integer.
            //NewCrop specifically requested that we do not send SSN.
            //ncScript.Patient.socialSecurityNumber=Regex.Replace(pat.SSN,"[^0-9]*","");//Removes all non-numerical characters.
            ncScript.Patient.PatientAddress          = new AddressOptionalType();
            ncScript.Patient.PatientAddress.address1 = pat.Address;         //May be blank.
            ncScript.Patient.PatientAddress.address2 = pat.Address2;        //May be blank.
            ncScript.Patient.PatientAddress.city     = pat.City;            //May be blank.
            ncScript.Patient.PatientAddress.state    = pat.State.ToUpper(); //May be blank. Validated in chart to be blank or to be a valid US state code.
            //For some reason, NewCrop will fail to load if a 9 digit zip code is sent.
            //One customer had all 9 digit zip codes entered for their patients, so we added code here to only send the first 5 digits of the zip.
            //Patient zip is validated in Chart to be blank, or #####, or #####-####, or #########.
            if (pat.Zip == "")
            {
                ncScript.Patient.PatientAddress.zip = "";                      //Blank is allowed.
            }
            else                                                               //5 or 9 digit zip. Formats are #####, or #####-####, or #########.
            {
                ncScript.Patient.PatientAddress.zip = pat.Zip.Substring(0, 5); //First 5 digts only.
            }
            ncScript.Patient.PatientAddress.country = country;                 //Validated above.
            ncScript.Patient.PatientContact         = new ContactType();
            //ncScript.Patient.PatientContact.backOfficeFax=;//We do not have a field to pull this information from.
            //ncScript.Patient.PatientContact.backOfficeTelephone=;//We do not have a field to pull this information from.
            ncScript.Patient.PatientContact.cellularTelephone = pat.WirelessPhone;              //May be blank. Does not need to be 10 digits.
            ncScript.Patient.PatientContact.email             = pat.Email;                      //May be blank, or may also contain multiple email addresses separated by commas.
            //ncScript.Patient.PatientContact.fax=;//We do not have a field to pull this information from.
            ncScript.Patient.PatientContact.homeTelephone = pat.HmPhone;                        //May be blank. Does not need to be 10 digits.
            //ncScript.Patient.PatientContact.pagerTelephone=;//We do not have a field to pull this information from.
            ncScript.Patient.PatientContact.workTelephone = pat.WkPhone;                        //May be blank. Does not need to be 10 digits.
            ncScript.Patient.PatientCharacteristics       = new PatientCharacteristicsType();
            ncScript.Patient.PatientCharacteristics.dob   = pat.Birthdate.ToString("yyyyMMdd"); //DOB must be in CCYYMMDD format.
            if (pat.Gender == PatientGender.Male)
            {
                ncScript.Patient.PatientCharacteristics.gender = GenderType.M;
            }
            else if (pat.Gender == PatientGender.Female)
            {
                ncScript.Patient.PatientCharacteristics.gender = GenderType.F;
            }
            else
            {
                ncScript.Patient.PatientCharacteristics.gender = GenderType.U;
            }
            ncScript.Patient.PatientCharacteristics.genderSpecified = true;
            //NewCrop programmer's comments regarding other fields we are not currently using (these fields are sent back when fetching prescriptions in the Chart):
            //ExternalPrescriptionId = your unique identifier for the prescription, only to be used if you are generating the prescription on your own UI.
            //	This is referenced by NewCrop, and cannot be populated with any other value.
            //EncounterIdentifier = unique ID for the patient visit (e.g. John Doe, 11/11/2013).
            //	This is used by NewCrop for reporting events against a visit, but otherwise does not impact the session.
            //EpisodeIdentifier = unique ID for the patient’s issue (e.g. John Doe’s broken leg) which may include multiple visits.
            //	Currently not used by NewCrop except for being echoed back; it is possible this functionality would be expanded in the future based on its intent as noted.
            //ExternalSource = a codified field noting the origin of the prescription. This may not be used.
            //Serialize
            MemoryStream  memoryStream  = new MemoryStream();
            XmlSerializer xmlSerializer = new XmlSerializer(typeof(NCScript));

            xmlSerializer.Serialize(memoryStream, ncScript);
            byte[] memoryStreamInBytes = memoryStream.ToArray();
            return(Encoding.UTF8.GetString(memoryStreamInBytes, 0, memoryStreamInBytes.Length));
        }
Exemplo n.º 36
0
        ///<summary>Checks inputs and determines if user should be prompted to pick a more applicable procedure code.</summary>
        ///<param name="verifyCode">This is the recommended code based on input. If it matches procCode return value will be false.</param>
        public static bool ShouldPromptForCodeChange(Procedure proc, ProcedureCode procCode, Patient pat, bool isMandibular,
                                                     List <ClaimProc> claimProcsForProc, out long verifyCode)
        {
            //No remoting role check; no call to db and method utilizes an out parameter.
            verifyCode = proc.CodeNum;
            //these areas have no autocodes
            if (procCode.TreatArea == TreatmentArea.Mouth ||
                procCode.TreatArea == TreatmentArea.Quad ||
                procCode.TreatArea == TreatmentArea.Sextant ||
                Procedures.IsAttachedToClaim(proc, claimProcsForProc))
            {
                return(false);
            }
            //this represents the suggested code based on the autocodes set up.
            AutoCode AutoCodeCur = null;

            if (procCode.TreatArea == TreatmentArea.Arch)
            {
                if (string.IsNullOrEmpty(proc.Surf))
                {
                    return(false);
                }
                if (proc.Surf == "U")
                {
                    verifyCode = AutoCodeItems.VerifyCode(procCode.CodeNum, "1", "", proc.IsAdditional, pat.PatNum, pat.Age, out AutoCodeCur);            //max
                }
                else
                {
                    verifyCode = AutoCodeItems.VerifyCode(procCode.CodeNum, "32", "", proc.IsAdditional, pat.PatNum, pat.Age, out AutoCodeCur);            //mand
                }
            }
            else if (procCode.TreatArea == TreatmentArea.ToothRange)
            {
                //test for max or mand.
                verifyCode = AutoCodeItems.VerifyCode(procCode.CodeNum, (isMandibular) ? "32" : "1", "", proc.IsAdditional, pat.PatNum, pat.Age, out AutoCodeCur);
            }
            else              //surf or tooth
            {
                string claimSurf = Tooth.SurfTidyForClaims(proc.Surf, proc.ToothNum);
                verifyCode = AutoCodeItems.VerifyCode(procCode.CodeNum, proc.ToothNum, claimSurf, proc.IsAdditional, pat.PatNum, pat.Age, out AutoCodeCur);
            }
            return(procCode.CodeNum != verifyCode);
        }
Exemplo n.º 37
0
        ///<summary>For orderBy, use 0 for BillingType and 1 for PatientName.</summary>
        public static DataTable GetBilling(bool isSent, int orderBy, DateTime dateFrom, DateTime dateTo, long clinicNum)
        {
            if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
            {
                return(Meth.GetTable(MethodBase.GetCurrentMethod(), isSent, orderBy, dateFrom, dateTo, clinicNum));
            }
            DataTable table = new DataTable();
            DataRow   row;

            //columns that start with lowercase are altered for display rather than being raw data.
            table.Columns.Add("amountDue");
            table.Columns.Add("balTotal");
            table.Columns.Add("billingType");
            table.Columns.Add("insEst");
            table.Columns.Add("IsSent");
            table.Columns.Add("lastStatement");
            table.Columns.Add("mode");
            table.Columns.Add("name");
            table.Columns.Add("PatNum");
            table.Columns.Add("payPlanDue");
            table.Columns.Add("StatementNum");
            List <DataRow> rows    = new List <DataRow>();
            string         command = "SELECT BalTotal,BillingType,FName,InsEst,statement.IsSent,"
                                     + "IFNULL(MAX(s2.DateSent)," + POut.Date(DateTime.MinValue) + ") LastStatement,"
                                     + "LName,MiddleI,statement.Mode_,PayPlanDue,Preferred,"
                                     + "statement.PatNum,statement.StatementNum "
                                     + "FROM statement "
                                     + "LEFT JOIN patient ON statement.PatNum=patient.PatNum "
                                     + "LEFT JOIN statement s2 ON s2.PatNum=patient.PatNum "
                                     + "AND s2.IsSent=1 ";

            if (PrefC.GetBool(PrefName.BillingIgnoreInPerson))
            {
                command += "AND s2.Mode_ !=1 ";
            }
            if (orderBy == 0)          //BillingType
            {
                command += "LEFT JOIN definition ON patient.BillingType=definition.DefNum ";
            }
            command += "WHERE statement.IsSent=" + POut.Bool(isSent) + " ";
            //if(dateFrom.Year>1800){
            command += "AND statement.DateSent>=" + POut.Date(dateFrom) + " ";      //greater than midnight this morning
            //}
            //if(dateFrom.Year>1800){
            command += "AND statement.DateSent<" + POut.Date(dateTo.AddDays(1)) + " ";      //less than midnight tonight
            //}
            if (clinicNum > 0)
            {
                command += "AND patient.ClinicNum=" + clinicNum + " ";
            }
            command += "GROUP BY BalTotal,BillingType,FName,InsEst,statement.IsSent,"
                       + "LName,MiddleI,statement.Mode_,PayPlanDue,Preferred,"
                       + "statement.PatNum,statement.StatementNum ";
            if (orderBy == 0)          //BillingType
            {
                command += "ORDER BY definition.ItemOrder,LName,FName,MiddleI,PayPlanDue";
            }
            else
            {
                command += "ORDER BY LName,FName";
            }
            DataTable     rawTable = Db.GetTable(command);
            Patient       pat;
            StatementMode mode;
            double        balTotal;
            double        insEst;
            double        payPlanDue;
            DateTime      lastStatement;

            for (int i = 0; i < rawTable.Rows.Count; i++)
            {
                row                = table.NewRow();
                balTotal           = PIn.Double(rawTable.Rows[i]["BalTotal"].ToString());
                insEst             = PIn.Double(rawTable.Rows[i]["InsEst"].ToString());
                payPlanDue         = PIn.Double(rawTable.Rows[i]["PayPlanDue"].ToString());
                row["amountDue"]   = (balTotal - insEst).ToString("F");
                row["balTotal"]    = balTotal.ToString("F");;
                row["billingType"] = DefC.GetName(DefCat.BillingTypes, PIn.Long(rawTable.Rows[i]["BillingType"].ToString()));
                if (insEst == 0)
                {
                    row["insEst"] = "";
                }
                else
                {
                    row["insEst"] = insEst.ToString("F");
                }
                row["IsSent"] = rawTable.Rows[i]["IsSent"].ToString();
                lastStatement = PIn.Date(rawTable.Rows[i]["LastStatement"].ToString());
                if (lastStatement.Year < 1880)
                {
                    row["lastStatement"] = "";
                }
                else
                {
                    row["lastStatement"] = lastStatement.ToShortDateString();
                }
                mode          = (StatementMode)PIn.Long(rawTable.Rows[i]["Mode_"].ToString());
                row["mode"]   = Lans.g("enumStatementMode", mode.ToString());
                pat           = new Patient();
                pat.LName     = rawTable.Rows[i]["LName"].ToString();
                pat.FName     = rawTable.Rows[i]["FName"].ToString();
                pat.Preferred = rawTable.Rows[i]["Preferred"].ToString();
                pat.MiddleI   = rawTable.Rows[i]["MiddleI"].ToString();
                row["name"]   = pat.GetNameLF();
                row["PatNum"] = rawTable.Rows[i]["PatNum"].ToString();
                if (payPlanDue == 0)
                {
                    row["payPlanDue"] = "";
                }
                else
                {
                    row["payPlanDue"] = payPlanDue.ToString("F");
                }
                row["StatementNum"] = rawTable.Rows[i]["StatementNum"].ToString();
                rows.Add(row);
            }
            for (int i = 0; i < rows.Count; i++)
            {
                table.Rows.Add(rows[i]);
            }
            return(table);
        }
Exemplo n.º 38
0
 ///<summary>Throws exceptions for invalid Patient data.</summary>
 public static byte[] BuildDoseSpotPostDataBytes(string clinicID, string clinicKey, string userID, Patient pat, out string queryString)
 {
     queryString = DoseSpot.GetSingleSignOnQueryString(clinicID, clinicKey, userID, pat);
     return(ASCIIEncoding.ASCII.GetBytes(queryString));
 }