///<summary>When using Arizona Primary Care, there must be a handful of pre-defined patient fields which are required to generate the Arizona Primary Care reports. This function will return true if all of the required patient fields exist which are necessary to run the Arizona Primary Care reports. Otherwise, false is returned.</summary> public static bool UsingArizonaPrimaryCare() { PatFieldDefs.RefreshCache(); string[] patientFieldNames = new string[] { "SPID#", "Eligibility Status", "Household Gross Income", "Household % of Poverty", }; int[] fieldCounts = new int[patientFieldNames.Length]; foreach (PatFieldDef pfd in PatFieldDefs.List) { for (int i = 0; i < patientFieldNames.Length; i++) { if (pfd.FieldName.ToLower() == patientFieldNames[i].ToLower()) { fieldCounts[i]++; break; } } } for (int i = 0; i < fieldCounts.Length; i++) { //Each field must be defined exactly once. This verifies that each requied field //both exists and is not ambiguous with another field of the same name. if (fieldCounts[i] != 1) { return(false); } } return(true); }
private void FillGrid() { PatFieldDefs.RefreshCache(); listMain.Items.Clear(); for (int i = 0; i < PatFieldDefs.List.Length; i++) { listMain.Items.Add(PatFieldDefs.List[i].FieldName); } }
private void FillGridPat() { gridPat.BeginUpdate(); gridPat.Columns.Clear(); ODGridColumn col; col = new ODGridColumn("Field", 150); gridPat.Columns.Add(col); col = new ODGridColumn("Value", 200); gridPat.Columns.Add(col); gridPat.Rows.Clear(); _arrayPatientFields = PatFields.Refresh(_patCur.PatNum); PatFieldDefs.RefreshCache(); PatFieldL.AddPatFieldsToGrid(gridPat, _arrayPatientFields.ToList(), FieldLocations.OrthoChart); gridPat.EndUpdate(); }
private void FillGridPat() { gridPat.BeginUpdate(); gridPat.Columns.Clear(); ODGridColumn col; col = new ODGridColumn("Field", 150); gridPat.Columns.Add(col); col = new ODGridColumn("Value", 200); gridPat.Columns.Add(col); gridPat.Rows.Clear(); listPatientFields = PatFields.Refresh(PatCur.PatNum); PatFieldDefs.RefreshCache(); ODGridRow row; //define and fill rows in grid at the same time. for (int i = 0; i < PatFieldDefs.List.Length; i++) { row = new ODGridRow(); row.Cells.Add(PatFieldDefs.List[i].FieldName); for (int j = 0; j <= listPatientFields.Length; j++) { if (j == listPatientFields.Length) //no matches in the list { row.Cells.Add(""); break; } if (listPatientFields[j].FieldName == PatFieldDefs.List[i].FieldName) { if (PatFieldDefs.List[i].FieldType == PatFieldType.Checkbox) { row.Cells.Add("X"); } else { row.Cells.Add(listPatientFields[j].FieldValue); } break; } } gridPat.Rows.Add(row); } gridPat.EndUpdate(); }