r5298 - in branches/bmas-staging: lib/org/freemedsoftware/module ui/gwt/src/org/freemedsoftware/gwt/client/screen ui/gwt/src/org/freemedsoftware/gwt/client/screen/patient

0 views
Skip to first unread message

subve...@svn.freemedsoftware.org

unread,
Mar 13, 2010, 6:59:20 AM3/13/10
to freemed-d...@googlegroups.com
Author: sadnan
Date: 2010-03-13 06:59:20 -0500 (Sat, 13 Mar 2010)
New Revision: 5298

Added:
branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/screen/patient/ProcedureScreen.java
Modified:
branches/bmas-staging/lib/org/freemedsoftware/module/Certifications.class.php
branches/bmas-staging/lib/org/freemedsoftware/module/ClaimTypes.class.php
branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/screen/PatientScreen.java
Log:
Feature #120: Procedure Form(under development)

Modified: branches/bmas-staging/lib/org/freemedsoftware/module/Certifications.class.php
===================================================================
--- branches/bmas-staging/lib/org/freemedsoftware/module/Certifications.class.php 2010-03-13 10:15:41 UTC (rev 5297)
+++ branches/bmas-staging/lib/org/freemedsoftware/module/Certifications.class.php 2010-03-13 11:59:20 UTC (rev 5298)
@@ -78,6 +78,11 @@
}
*/
} // end function _update
+
+ public function getCertifications($ptid){
+ $q="SELECT id as Id,certdesc as cert_desc FROM certifications WHERE certpatient=".$GLOBALS['sql']->quote( $ptid );
+ return $GLOBALS['sql']->queryAll( $q );
+ }
}

register_module('Certifications');

Modified: branches/bmas-staging/lib/org/freemedsoftware/module/ClaimTypes.class.php
===================================================================
--- branches/bmas-staging/lib/org/freemedsoftware/module/ClaimTypes.class.php 2010-03-13 10:15:41 UTC (rev 5297)
+++ branches/bmas-staging/lib/org/freemedsoftware/module/ClaimTypes.class.php 2010-03-13 11:59:20 UTC (rev 5298)
@@ -63,6 +63,11 @@
protected function mod_pre ( &$data ) {
$data['clmtpdtmod'] = date('Y-m-d');
}
+
+ public function getClaimTypes(){
+ $q="SELECT id as Id,CONCAT(clmtpname,'(',clmtpdescrip,')') as claim_info FROM claimtypes";
+ return $GLOBALS['sql']->queryAll( $q );
+ }

} // end of class ClaimTypes

Modified: branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/screen/PatientScreen.java
===================================================================
--- branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/screen/PatientScreen.java 2010-03-13 10:15:41 UTC (rev 5297)
+++ branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/screen/PatientScreen.java 2010-03-13 11:59:20 UTC (rev 5298)
@@ -51,6 +51,7 @@
import org.freemedsoftware.gwt.client.screen.patient.PatientLinkEntry;
import org.freemedsoftware.gwt.client.screen.patient.PatientReportingScreen;
import org.freemedsoftware.gwt.client.screen.patient.PrescriptionsScreen;
+import org.freemedsoftware.gwt.client.screen.patient.ProcedureScreen;
import org.freemedsoftware.gwt.client.screen.patient.ProgressNoteEntry;
import org.freemedsoftware.gwt.client.screen.patient.ReferralEntry;
import org.freemedsoftware.gwt.client.screen.patient.ScheduleToxicologyScreen;
@@ -324,13 +325,6 @@

final MenuBar menuBar_5 = new MenuBar(true);

- /*menuBar_5.addItem("Manage Test Types", new Command() {
- public void execute() {
- TestScreen test = new TestScreen();
- Util.spawnTabPatient("Manage Test Types", test, getObject());
- }
- });*/
-
menuBar_5.addItem("Schedule Toxicology Screen", new Command() {
public void execute() {
ScheduleToxicologyScreen sts = new ScheduleToxicologyScreen();
@@ -348,6 +342,34 @@
});

menuBar.addItem("Toxicology", menuBar_5);
+
+ final MenuBar menuBar_6 = new MenuBar(true);
+
+ menuBar_6.addItem("Manage Procedures", new Command() {
+ public void execute() {
+ ProcedureScreen ps = new ProcedureScreen();
+ //ps.loadClaimTypes();
+ //ps.loadAuthorizations();
+ //ps.loadCertifications();
+ Util.spawnTabPatient("Manage Procedures", ps, getObject());
+ }
+ });
+ menuBar_6.addItem("Collect Copay", new Command() {
+ public void execute() {
+
+ }
+ });
+ menuBar_6.addItem("Collect Deductibles", new Command() {
+ public void execute() {
+
+ }
+ });
+ menuBar_6.addItem("Collect Payments", new Command() {
+ public void execute() {
+
+ }
+ });
+ menuBar.addItem("Procedure", menuBar_6);
}

final VerticalPanel verticalPanel_1 = new VerticalPanel();

Added: branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/screen/patient/ProcedureScreen.java
===================================================================
--- branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/screen/patient/ProcedureScreen.java (rev 0)
+++ branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/screen/patient/ProcedureScreen.java 2010-03-13 11:59:20 UTC (rev 5298)
@@ -0,0 +1,457 @@
+package org.freemedsoftware.gwt.client.screen.patient;
+
+import java.util.Date;
+import java.util.HashMap;
+
+import org.freemedsoftware.gwt.client.JsonUtil;
+import org.freemedsoftware.gwt.client.PatientEntryScreenInterface;
+import org.freemedsoftware.gwt.client.Util;
+import org.freemedsoftware.gwt.client.Util.ProgramMode;
+import org.freemedsoftware.gwt.client.widget.CustomDatePicker;
+import org.freemedsoftware.gwt.client.widget.CustomListBox;
+import org.freemedsoftware.gwt.client.widget.SupportModuleWidget;
+
+import com.google.gwt.http.client.RequestBuilder;
+import com.google.gwt.http.client.RequestCallback;
+import com.google.gwt.http.client.RequestException;
+import com.google.gwt.http.client.URL;
+import com.google.gwt.json.client.JSONParser;
+import com.google.gwt.user.client.Window;
+import com.google.gwt.user.client.ui.Button;
+import com.google.gwt.user.client.ui.FlexTable;
+import com.google.gwt.user.client.ui.Label;
+import com.google.gwt.user.client.ui.TabPanel;
+import com.google.gwt.user.client.ui.TextArea;
+import com.google.gwt.user.client.ui.TextBox;
+import com.google.gwt.user.client.ui.VerticalPanel;
+
+public class ProcedureScreen extends PatientEntryScreenInterface {
+
+
+ protected TabPanel tabPanelMain;
+ protected VerticalPanel newPlanVerticalPanel,verticalPanel, viewPlanVerticalPanel;
+
+ protected FlexTable flexTable;
+
+ protected Button resetButton, submitButton, modifyButton;
+
+
+ protected SupportModuleWidget providerWidget;
+ private CustomDatePicker procDate;
+ protected SupportModuleWidget procCodeWidget;
+ protected SupportModuleWidget procModifier3Widget;
+ protected SupportModuleWidget procModifier2Widget;
+ protected TextBox tbUnits;
+ protected SupportModuleWidget diagCode1Widget;
+ private SupportModuleWidget diagCode3Widget;
+ protected SupportModuleWidget diagCode4Widget;
+ protected SupportModuleWidget diagCode2Widget;
+ protected SupportModuleWidget procModifier1Widget;
+ protected TextBox tbVoucherNo;
+ protected TextArea tbComments;
+ protected CustomDatePicker lastVisitDate;
+ protected SupportModuleWidget refProviderWidget;
+ protected SupportModuleWidget facilityWidget;
+ protected CustomListBox listAuthorizations;
+ protected CustomListBox listCertifications;
+ protected CustomListBox listClaimTypes;
+
+ public ProcedureScreen() {
+
+ verticalPanel = new VerticalPanel();
+ viewPlanVerticalPanel = new VerticalPanel();
+ newPlanVerticalPanel = new VerticalPanel();
+
+ initWidget(verticalPanel);
+ tabPanelMain = new TabPanel();
+ tabPanelMain.add(newPlanVerticalPanel, "Add");
+ tabPanelMain.add(viewPlanVerticalPanel, "List");
+ tabPanelMain.selectTab(0);
+
+ verticalPanel.add(tabPanelMain);
+
+ flexTable = new FlexTable();
+ int fieldCounter = 0;
+
+ Label lbProvs = new Label("Provider");
+ lbProvs.setStyleName("label");
+
+ flexTable.setWidget(fieldCounter, 0, lbProvs);
+ fieldCounter++;
+
+ Label lbProvider = new Label("Provider");
+ providerWidget = new SupportModuleWidget("ProviderModule");
+ providerWidget.setWidth("200px");
+ flexTable.setWidget(fieldCounter, 0, lbProvider);
+ flexTable.getFlexCellFormatter().getElement(fieldCounter, 0).getStyle()
+ .setProperty("textIndent", "10px");
+ flexTable.setWidget(fieldCounter, 1, providerWidget);
+ fieldCounter++;
+ // Adding Referring Provider
+ Label lbRefProvider = new Label("Referring Provider");
+ refProviderWidget = new SupportModuleWidget("ProviderModule");
+ refProviderWidget.setWidth("200px");
+ flexTable.setWidget(fieldCounter, 0, lbRefProvider);
+ flexTable.getFlexCellFormatter().getElement(fieldCounter, 0).getStyle()
+ .setProperty("textIndent", "10px");
+ flexTable.setWidget(fieldCounter, 1, refProviderWidget);
+ fieldCounter++;
+ newPlanVerticalPanel.add(flexTable);
+
+ // Adding Modifiers
+ Label lbModifiers = new Label("Modifiers");
+ lbModifiers.setStyleName("label");
+ flexTable.setWidget(fieldCounter, 0, lbModifiers);
+ fieldCounter++;
+
+ Label lbModifier1 = new Label("Modifier 1");
+ procModifier1Widget = new SupportModuleWidget("CptModifiers");
+ procModifier1Widget.setWidth("200px");
+ flexTable.setWidget(fieldCounter, 0, lbModifier1);
+ flexTable.getFlexCellFormatter().getElement(fieldCounter, 0).getStyle()
+ .setProperty("textIndent", "10px");
+ flexTable.setWidget(fieldCounter, 1, procModifier1Widget);
+ fieldCounter++;
+
+ Label lbModifier2 = new Label("Modifier 2");
+ procModifier2Widget = new SupportModuleWidget("CptModifiers");
+ procModifier2Widget.setWidth("200px");
+ flexTable.setWidget(fieldCounter, 0, lbModifier2);
+ flexTable.getFlexCellFormatter().getElement(fieldCounter, 0).getStyle()
+ .setProperty("textIndent", "10px");
+ flexTable.setWidget(fieldCounter, 1, procModifier2Widget);
+ fieldCounter++;
+
+ Label lbModifier3 = new Label("Modifier 3");
+ procModifier3Widget = new SupportModuleWidget("CptModifiers");
+ procModifier3Widget.setWidth("200px");
+ flexTable.setWidget(fieldCounter, 0, lbModifier3);
+ flexTable.getFlexCellFormatter().getElement(fieldCounter, 0).getStyle()
+ .setProperty("textIndent", "10px");
+ flexTable.setWidget(fieldCounter, 1, procModifier3Widget);
+ fieldCounter++;
+
+ // Adding Diagnosis Codes
+ Label lbDiagnosis = new Label("Diagnosis");
+ lbDiagnosis.setStyleName("label");
+ flexTable.setWidget(fieldCounter, 0, lbDiagnosis);
+ fieldCounter++;
+
+ Label lbDiagCode1 = new Label("Diagnosis Code 1");
+ diagCode1Widget = new SupportModuleWidget("IcdCodes");
+ diagCode1Widget.setWidth("200px");
+ flexTable.setWidget(fieldCounter, 0, lbDiagCode1);
+ flexTable.getFlexCellFormatter().getElement(fieldCounter, 0).getStyle()
+ .setProperty("textIndent", "10px");
+ flexTable.setWidget(fieldCounter, 1, diagCode1Widget);
+ fieldCounter++;
+
+ Label lbDiagCode2 = new Label("Diagnosis Code 2");
+ diagCode2Widget = new SupportModuleWidget("IcdCodes");
+ diagCode2Widget.setWidth("200px");
+ flexTable.setWidget(fieldCounter, 0, lbDiagCode2);
+ flexTable.getFlexCellFormatter().getElement(fieldCounter, 0).getStyle()
+ .setProperty("textIndent", "10px");
+ flexTable.setWidget(fieldCounter, 1, diagCode2Widget);
+ fieldCounter++;
+
+ Label lbDiagCode3 = new Label("Diagnosis Code 3");
+ diagCode3Widget = new SupportModuleWidget("IcdCodes");
+ diagCode3Widget.setWidth("200px");
+ flexTable.setWidget(fieldCounter, 0, lbDiagCode3);
+ flexTable.getFlexCellFormatter().getElement(fieldCounter, 0).getStyle()
+ .setProperty("textIndent", "10px");
+ flexTable.setWidget(fieldCounter, 1, diagCode3Widget);
+ fieldCounter++;
+
+ Label lbDiagCode4 = new Label("Diagnosis Code 4");
+ diagCode4Widget = new SupportModuleWidget("IcdCodes");
+ diagCode4Widget.setWidth("200px");
+ flexTable.setWidget(fieldCounter, 0, lbDiagCode4);
+ flexTable.getFlexCellFormatter().getElement(fieldCounter, 0).getStyle()
+ .setProperty("textIndent", "10px");
+ flexTable.setWidget(fieldCounter, 1, diagCode4Widget);
+ fieldCounter++;
+
+ Label lbProcedure = new Label("Procedure");
+ lbProcedure.setStyleName("label");
+ flexTable.setWidget(fieldCounter, 0, lbProcedure);
+ fieldCounter++;
+
+ // Adding procedure date
+ Label lbProcDate = new Label("Date of Procedure");
+ procDate = new CustomDatePicker();
+ procDate.setValue(new Date());
+ procDate.setWidth("200px");
+ flexTable.setWidget(fieldCounter, 0, lbProcDate);
+ flexTable.getFlexCellFormatter().getElement(fieldCounter, 0).getStyle()
+ .setProperty("textIndent", "10px");
+ flexTable.setWidget(fieldCounter, 1, procDate);
+ fieldCounter++;
+
+ // Adding CPT Code
+ Label lbCPTCodes = new Label("Procedural Code");
+ procCodeWidget = new SupportModuleWidget("CptCodes");
+ procCodeWidget.setWidth("200px");
+ flexTable.setWidget(fieldCounter, 0, lbCPTCodes);
+ flexTable.getFlexCellFormatter().getElement(fieldCounter, 0).getStyle()
+ .setProperty("textIndent", "10px");
+ flexTable.setWidget(fieldCounter, 1, procCodeWidget);
+ fieldCounter++;
+
+ // Adding Units
+ Label lbUnits = new Label("Units");
+ tbUnits = new TextBox();
+ tbUnits.setWidth("200px");
+ flexTable.setWidget(fieldCounter, 0, lbUnits);
+ flexTable.getFlexCellFormatter().getElement(fieldCounter, 0).getStyle()
+ .setProperty("textIndent", "10px");
+ flexTable.setWidget(fieldCounter, 1, tbUnits);
+ fieldCounter++;
+
+ // Adding Facility
+ Label lbFacility = new Label("Place of Service");
+ facilityWidget = new SupportModuleWidget("FacilityModule");
+ facilityWidget.setWidth("200px");
+ flexTable.setWidget(fieldCounter, 0, lbFacility);
+ flexTable.getFlexCellFormatter().getElement(fieldCounter, 0).getStyle()
+ .setProperty("textIndent", "10px");
+ flexTable.setWidget(fieldCounter, 1, facilityWidget);
+ fieldCounter++;
+
+ // Adding Voucher Number
+ Label lbVoucher = new Label("Voucher Number");
+ tbVoucherNo = new TextBox();
+ tbVoucherNo.setWidth("200px");
+ flexTable.setWidget(fieldCounter, 0, lbVoucher);
+ flexTable.getFlexCellFormatter().getElement(fieldCounter, 0).getStyle()
+ .setProperty("textIndent", "10px");
+ flexTable.setWidget(fieldCounter, 1, tbVoucherNo);
+ fieldCounter++;
+
+ // Adding Authorization
+ Label lbAuthorization = new Label("Authorization");
+ listAuthorizations = new CustomListBox();
+ listAuthorizations.addItem("NONE SELECTED");
+ flexTable.setWidget(fieldCounter, 0, lbAuthorization);
+ flexTable.getFlexCellFormatter().getElement(fieldCounter, 0).getStyle()
+ .setProperty("textIndent", "10px");
+ flexTable.setWidget(fieldCounter, 1, listAuthorizations);
+ fieldCounter++;
+
+ // Adding Certifications
+ Label lbCertifications = new Label("Certifications");
+ listCertifications = new CustomListBox();
+ listCertifications.addItem("NONE SELECTED");
+ flexTable.setWidget(fieldCounter, 0, lbCertifications);
+ flexTable.getFlexCellFormatter().getElement(fieldCounter, 0).getStyle()
+ .setProperty("textIndent", "10px");
+ flexTable.setWidget(fieldCounter, 1, listCertifications);
+ fieldCounter++;
+
+ // Adding Claim Types
+ Label lbClaimType = new Label("Claim Type");
+ listClaimTypes = new CustomListBox();
+ listClaimTypes.addItem("NONE SELECTED");
+ flexTable.setWidget(fieldCounter, 0, lbClaimType);
+ flexTable.getFlexCellFormatter().getElement(fieldCounter, 0).getStyle()
+ .setProperty("textIndent", "10px");
+ flexTable.setWidget(fieldCounter, 1, listClaimTypes);
+ fieldCounter++;
+
+ // Adding last date of visit
+ Label lbLastDate = new Label("Date of Last Visit");
+ lastVisitDate = new CustomDatePicker();
+ lastVisitDate.setWidth("200px");
+ flexTable.setWidget(fieldCounter, 0, lbLastDate);
+ flexTable.getFlexCellFormatter().getElement(fieldCounter, 0).getStyle()
+ .setProperty("textIndent", "10px");
+ flexTable.setWidget(fieldCounter, 1, lastVisitDate);
+ fieldCounter++;
+
+ // Adding Comment
+ Label lbComment = new Label("Comment");
+ tbComments = new TextArea();
+ tbComments.setWidth("400px");
+ flexTable.setWidget(fieldCounter, 0, lbComment);
+ flexTable.getFlexCellFormatter().getElement(fieldCounter, 0).getStyle()
+ .setProperty("textIndent", "10px");
+ flexTable.setWidget(fieldCounter, 1, tbComments);
+ fieldCounter++;
+
+ // newPlanVerticalPanel.add(flexTable);
+
+ // verticalPanel.add(createDoseHoldTable());
+ Util.setFocus(providerWidget);
+ } // end of TestScreen() constructor
+
+ public void loadAuthorizations() {
+
+ if (Util.getProgramMode() == ProgramMode.JSONRPC) {
+ // ////////////////////
+ String[] params = { patientScreen.getPatient().toString(),
+ procDate.getTextBox().getText() };
+
+ RequestBuilder builder = new RequestBuilder(
+ RequestBuilder.POST,
+ URL
+ .encode(Util
+ .getJsonRequest(
+ "org.freemedsoftware.module.Authorizations.getValidAuthorizations",
+ params)));
+ try {
+ builder.sendRequest(null, new RequestCallback() {
+ public void onError(
+ com.google.gwt.http.client.Request request,
+ Throwable ex) {
+ }
+
+ @SuppressWarnings("unchecked")
+ public void onResponseReceived(
+ com.google.gwt.http.client.Request request,
+ com.google.gwt.http.client.Response response) {
+ if (200 == response.getStatusCode()) {
+ if (Util.checkValidSessionResponse(response
+ .getText())) {
+ HashMap<String, String>[] result = (HashMap<String, String>[]) JsonUtil
+ .shoehornJson(JSONParser.parse(response
+ .getText()),
+ "HashMap<String,String>[]");
+ if (result != null) {
+ if (result.length != 0) {
+ for (int i = 0; i < result.length; i++) {
+ HashMap<String, String> m = (HashMap<String, String>) result[i];
+ listAuthorizations.addItem(m
+ .get("auth_info"), m
+ .get("Id"));
+ }
+ } else {
+
+ }
+ }
+ }
+ } else {
+ }
+ }
+ });
+ } catch (RequestException e) {
+ Window.alert(e.toString());
+ }
+ } else {
+
+ }
+ }
+
+ public void loadCertifications() {
+
+ if (Util.getProgramMode() == ProgramMode.JSONRPC) {
+ // ////////////////////
+ String[] params = { patientScreen.getPatient().toString() };
+
+ RequestBuilder builder = new RequestBuilder(
+ RequestBuilder.POST,
+ URL
+ .encode(Util
+ .getJsonRequest(
+ "org.freemedsoftware.module.Certifications.getCertifications",
+ params)));
+ try {
+ builder.sendRequest(null, new RequestCallback() {
+ public void onError(
+ com.google.gwt.http.client.Request request,
+ Throwable ex) {
+
+ }
+
+ @SuppressWarnings("unchecked")
+ public void onResponseReceived(
+ com.google.gwt.http.client.Request request,
+ com.google.gwt.http.client.Response response) {
+ if (200 == response.getStatusCode()) {
+ if (Util.checkValidSessionResponse(response
+ .getText())) {
+ HashMap<String, String>[] result = (HashMap<String, String>[]) JsonUtil
+ .shoehornJson(JSONParser.parse(response
+ .getText()),
+ "HashMap<String,String>[]");
+ if (result != null) {
+ if (result.length != 0) {
+ for (int i = 0; i < result.length; i++) {
+ HashMap<String, String> m = (HashMap<String, String>) result[i];
+ listCertifications.addItem(m
+ .get("cert_desc"), m
+ .get("Id"));
+ }
+ } else {
+ }
+ }
+ }
+ } else {
+ }
+ }
+ });
+ } catch (RequestException e) {
+ Window.alert(e.toString());
+ }
+ } else {
+ }
+ }
+
+ public void loadClaimTypes() {
+
+ if (Util.getProgramMode() == ProgramMode.JSONRPC) {
+ // ////////////////////
+ String[] params = {};
+
+ RequestBuilder builder = new RequestBuilder(
+ RequestBuilder.POST,
+ URL
+ .encode(Util
+ .getJsonRequest(
+ "org.freemedsoftware.module.ClaimTypes.getClaimTypes",
+ params)));
+ try {
+ builder.sendRequest(null, new RequestCallback() {
+ public void onError(
+ com.google.gwt.http.client.Request request,
+ Throwable ex) {
+
+ }
+
+ @SuppressWarnings("unchecked")
+ public void onResponseReceived(
+ com.google.gwt.http.client.Request request,
+ com.google.gwt.http.client.Response response) {
+ if (200 == response.getStatusCode()) {
+ if (Util.checkValidSessionResponse(response
+ .getText())) {
+ HashMap<String, String>[] result = (HashMap<String, String>[]) JsonUtil
+ .shoehornJson(JSONParser.parse(response
+ .getText()),
+ "HashMap<String,String>[]");
+ if (result != null) {
+ if (result.length != 0) {
+ for (int i = 0; i < result.length; i++) {
+ HashMap<String, String> m = (HashMap<String, String>) result[i];
+ listClaimTypes.addItem(m
+ .get("claim_info"), m
+ .get("Id"));
+ }
+ } else {
+ }
+ }
+ }
+ } else {
+ }
+ }
+ });
+ } catch (RequestException e) {
+ Window.alert(e.toString());
+ }
+ } else {
+ }
+ }
+
+ public void reset() {
+ }
+}


Property changes on: branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/screen/patient/ProcedureScreen.java
___________________________________________________________________
Added: svn:keywords
+ Id Author Date Revision
Added: svn:eol-style
+ native

Reply all
Reply to author
Forward
0 new messages