Esempio n. 1
0
 /**
  * mark the pv if NVP concept
  *
  * @param curBean evs bean object
  * @param session HttpSession object
  */
 @SuppressWarnings("unchecked")
 public void markNVPConcept(EVS_Bean curBean, HttpSession session) {
   Vector<String> vNVP = (Vector) session.getAttribute("NVPConcepts");
   if (vNVP == null) vNVP = new Vector<String>();
   String conID = curBean.getCONCEPT_IDENTIFIER();
   if (conID != null && vNVP.contains(conID)) curBean.setNAME_VALUE_PAIR_IND(1);
   else curBean.setNAME_VALUE_PAIR_IND(0);
 }
Esempio n. 2
0
  private void getConceptDerivation() {
    try {
      ConceptForm condata = new ConceptForm();
      Vector<EVS_Bean> vCon = new Vector<EVS_Bean>();
      EVS_Bean eBean = new EVS_Bean();
      eBean.setIDSEQ(
          "F37D0428-B66C-6787-E034-0003BA3F9857"); // ("11F45981-C7AC-5747-E044-0003BA0B1A09");
      vCon.addElement(eBean);
      eBean = new EVS_Bean();
      eBean.setIDSEQ("17B24111-A29F-73AC-E044-0003BA0B1A09");
      vCon.addElement(eBean);

      condata.setConceptList(vCon);
      // open teh cadsr connection
      Connection conn = varCon.openConnection();
      condata.setDBConnection(conn);
      ConceptAction conact = new ConceptAction();
      String condr = conact.getConDerivation(condata);
      varCon.closeConnection(); // close the connection
    } catch (SQLException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
  }
Esempio n. 3
0
  private void readConData(NamedNodeMap attr, VMForm data) {
    VM_Bean vm = data.getVMBean();
    EVS_Bean vmCon = new EVS_Bean();
    Vector<EVS_Bean> conList = vm.getVM_CONCEPT_LIST();
    for (int i = 0; i < attr.getLength(); i++) {
      // System.out.println(i + " ConAttr : " + attr.item(i).getNodeName() + " value " +
      // attr.item(i).getNodeValue());

      String attName = attr.item(i).getNodeName();
      String attValue = attr.item(i).getNodeValue();

      if (attName != null && !attName.equals("")) {
        if (attName.equals("conname")) vmCon.setLONG_NAME(attValue);
        else if (attName.equals("conid")) vmCon.setCONCEPT_IDENTIFIER(attValue);
        else if (attName.equals("condefn")) vmCon.setPREFERRED_DEFINITION(attValue);
        else if (attName.equals("condefnsrc")) vmCon.setEVS_DEF_SOURCE(attValue);
        else if (attName.equals("conorigin")) vmCon.setEVS_ORIGIN(attValue);
        else if (attName.equals("consrc")) vmCon.setEVS_CONCEPT_SOURCE(attValue);
        else if (attName.equals("conidseq")) vmCon.setIDSEQ(attValue);
      }
    }
    conList.addElement(vmCon);
    vm.setVM_CONCEPT_LIST(conList);
  }
Esempio n. 4
0
  @SuppressWarnings("unchecked")
  private void switchCaseEx(int argc) {
    switch (argc) /* Switch evaluates an expression (argc)  */ {
        /* If expression resolves to 1, jump here */
      case 1:
        System.out.println("Only the command was entered.");
        /* break;            /* break - cases the execution to jump
        out of the 'switch' block.             */

        /* If expression resolves to 2, jump here */
      case 2:
        System.out.println("Command plus one parm entered");
        // break;

        /* If expression resolves to 3, jump here */
      case 3:
        System.out.println("Command plus two parm entered");
        break;

        /* Any other value jumps here.            */
      default:
        System.out.println("Command plus %d parms entered\n");
        break;
    }
    // test number combinations
    Vector comb = new Vector();
    int i = 10;
    do {
      int j = 1;
      do {
        int k = i + j;
        System.out.println(i + " + " + j + " = " + k);
        if (comb.contains(k)) System.out.println("Already exists : " + k);
        comb.addElement(k);
        j += 1;
      } while (j < 10);
      i += 10;
    } while (i < 150);

    // setting up the data
    VM_Bean vm = new VM_Bean();
    // vm.setVM_SHORT_MEANING("Nanomaterials");
    //  vm.setVM_SHORT_MEANING("Metastatic");
    //  vm.setVM_SHORT_MEANING("Dose");
    //  vm.setVM_SHORT_MEANING("Fludeoxyglucose F 18");
    //  vm.setVM_SHORT_MEANING("Adverse Event");
    // vm.setVM_SHORT_MEANING("Adverse Event Domain");
    //  vm.setVM_SHORT_MEANING("Adverse Event Capture");
    //   vm.setVM_SHORT_MEANING("Low");
    vm.setVM_LONG_NAME("Hypersensitivity");

    // vm.setVM_DESCRIPTION("need definiton");
    //  vm.setVM_DESCRIPTION("Any unfavorable and unintended sign (including an abnormal laboratory
    // finding), symptom, syndrome, or disease, temporally associated with the use of a medical
    // product or procedure, regardless of whether or not it is considered related to the product or
    // procedure (attribution of unrelated, unlikely, possible, probable, or definite). The concept
    // refers to events that could be medical product related, dose related, route related, patient
    // related, caused by an interaction with another therapy or procedure, or caused by opioid
    // initiation or dose escalation. The term also is referred to as an adverse experience. The old
    // term Side Effect is retired and should not be used.");
    // vm.setVM_DESCRIPTION("No Value Exists.");
    // vm.setVM_DESCRIPTION("The Adverse Events dataset includes. Adverse events may be captured
    // either as free text or a pre-specified list of terms.");
    // vm.setVM_DESCRIPTION("Adverse events may be captured either as free text or a pre-specified
    // list of terms.");
    //  vm.setVM_DESCRIPTION("A procedure that uses ultrasonic waves directed over the chest wall to
    // obtain a graphic record of the heart's position, motion of the walls, or internal parts such
    // as the valves.");
    // vm.setVM_DESCRIPTION("The amount of medicine taken, or radiation given, at one time.");
    //  vm.setVM_DESCRIPTION("(MET-uh-STAT-ik) Having to do with metastasis, which is the spread of
    // cancer from one part of the body to another.");
    //  vm.setVM_DESCRIPTION("Metastatic");
    //  vm.setVM_DESCRIPTION("Research aimed at discovery of novel nanoscale and nanostructured
    // materials and at a comprehensive understanding of the properties of nanomaterials (ranging
    // across length scales, and including interface interactions). Also, R&D leading to the ability
    // to design and synthesize, in a controlled manner, nanostructured materials with targeted
    // properties.");
    //   vm.setVM_DESCRIPTION("Lower than reference range");
    vm.setVM_PREFERRED_DEFINITION("Hypersensitivity");

    // get concepts for vm
    Vector<EVS_Bean> conList = new Vector<EVS_Bean>();
    EVS_Bean vmCon = new EVS_Bean();
    vmCon.setLONG_NAME("Hypersensitivity"); // ("Low");   //("Metastatic");  //("Nanomaterials");
    vmCon.setCONCEPT_IDENTIFIER("C3114"); // ("C54722");    //("C14174");  //  ("C53671");
    vmCon.setPREFERRED_DEFINITION(
        "Hypersensitivity; a local or general reaction of an organism following contact with a specific allergen to which it has been previously exposed and to which it has become sensitized.");
    // ("A minimum level or position or degree; less than normal in degree or intensity or
    // amount.");
    // ("(MET-uh-STAT-ik) Having to do with metastasis, which is the spread of cancer from one part
    // of the body to another.");
    // ("Research aimed at discovery of novel nanoscale and nanostructured materials and at a
    // comprehensive understanding of the properties of nanomaterials (ranging across length scales,
    // and including interface interactions). Also, R&D leading to the ability to design and
    // synthesize, in a controlled manner, nanostructured materials with targeted properties.");
    vmCon.setEVS_ORIGIN("NCI Thesaurus");
    vmCon.setEVS_DEF_SOURCE("NCI"); // ("NCI-GLOSS");
    vmCon.setIDSEQ(
        "F37D0428-B65C-6787-E034-0003BA3F9857"); // ("");
                                                 // //("F37D0428-DE70-6787-E034-0003BA3F9857");
    conList.addElement(vmCon);
    //  vmdata.setConceptVMList(conceptVMList)
    vm.setVM_CONCEPT_LIST(conList);

    // vmdata.setVMBean(vm);

    VM_Bean selvm = new VM_Bean();
    selvm.setVM_LONG_NAME("Hypersensitivity"); // ("Adverse Event Domain");
    selvm.setVM_PREFERRED_DEFINITION("Hypersensitivity"); // ("need definiton");
    //  vmdata.setSelectVM(selvm);

  }
Esempio n. 5
0
  private void doValidateValuesOld(VMForm vmdata) {
    try {
      // setting up the data
      VM_Bean vm = new VM_Bean();
      // vm.setVM_SHORT_MEANING("Nanomaterials");
      //  vm.setVM_SHORT_MEANING("Metastatic");
      //  vm.setVM_SHORT_MEANING("Dose");
      //  vm.setVM_SHORT_MEANING("Fludeoxyglucose F 18");
      //  vm.setVM_SHORT_MEANING("Adverse Event");
      // vm.setVM_SHORT_MEANING("Adverse Event Domain");
      //  vm.setVM_SHORT_MEANING("Adverse Event Capture");
      //   vm.setVM_SHORT_MEANING("Low");
      vm.setVM_LONG_NAME("Hypersensitivity");

      // vm.setVM_DESCRIPTION("need definiton");
      //  vm.setVM_DESCRIPTION("Any unfavorable and unintended sign (including an abnormal
      // laboratory finding), symptom, syndrome, or disease, temporally associated with the use of a
      // medical product or procedure, regardless of whether or not it is considered related to the
      // product or procedure (attribution of unrelated, unlikely, possible, probable, or definite).
      // The concept refers to events that could be medical product related, dose related, route
      // related, patient related, caused by an interaction with another therapy or procedure, or
      // caused by opioid initiation or dose escalation. The term also is referred to as an adverse
      // experience. The old term Side Effect is retired and should not be used.");
      // vm.setVM_DESCRIPTION("No Value Exists.");
      // vm.setVM_DESCRIPTION("The Adverse Events dataset includes. Adverse events may be captured
      // either as free text or a pre-specified list of terms.");
      // vm.setVM_DESCRIPTION("Adverse events may be captured either as free text or a pre-specified
      // list of terms.");
      //  vm.setVM_DESCRIPTION("A procedure that uses ultrasonic waves directed over the chest wall
      // to obtain a graphic record of the heart's position, motion of the walls, or internal parts
      // such as the valves.");
      // vm.setVM_DESCRIPTION("The amount of medicine taken, or radiation given, at one time.");
      //  vm.setVM_DESCRIPTION("(MET-uh-STAT-ik) Having to do with metastasis, which is the spread
      // of cancer from one part of the body to another.");
      //  vm.setVM_DESCRIPTION("Metastatic");
      //  vm.setVM_DESCRIPTION("Research aimed at discovery of novel nanoscale and nanostructured
      // materials and at a comprehensive understanding of the properties of nanomaterials (ranging
      // across length scales, and including interface interactions). Also, R&D leading to the
      // ability to design and synthesize, in a controlled manner, nanostructured materials with
      // targeted properties.");
      //   vm.setVM_DESCRIPTION("Lower than reference range");
      vm.setVM_PREFERRED_DEFINITION("Hypersensitivity");

      // get concepts for vm
      Vector<EVS_Bean> conList = new Vector<EVS_Bean>();
      EVS_Bean vmCon = new EVS_Bean();
      vmCon.setLONG_NAME("Hypersensitivity"); // ("Low");   //("Metastatic");  //("Nanomaterials");
      vmCon.setCONCEPT_IDENTIFIER("C3114"); // ("C54722");    //("C14174");  //  ("C53671");
      vmCon.setPREFERRED_DEFINITION(
          "Hypersensitivity; a local or general reaction of an organism following contact with a specific allergen to which it has been previously exposed and to which it has become sensitized.");
      // ("A minimum level or position or degree; less than normal in degree or intensity or
      // amount.");
      // ("(MET-uh-STAT-ik) Having to do with metastasis, which is the spread of cancer from one
      // part of the body to another.");
      // ("Research aimed at discovery of novel nanoscale and nanostructured materials and at a
      // comprehensive understanding of the properties of nanomaterials (ranging across length
      // scales, and including interface interactions). Also, R&D leading to the ability to design
      // and synthesize, in a controlled manner, nanostructured materials with targeted
      // properties.");
      vmCon.setEVS_ORIGIN("NCI Thesaurus");
      vmCon.setEVS_DEF_SOURCE("NCI"); // ("NCI-GLOSS");
      vmCon.setIDSEQ(
          "F37D0428-B65C-6787-E034-0003BA3F9857"); // ("");
                                                   // //("F37D0428-DE70-6787-E034-0003BA3F9857");
      conList.addElement(vmCon);
      //  vmdata.setConceptVMList(conceptVMList)
      vm.setVM_CONCEPT_LIST(conList);

      vmdata.setVMBean(vm);

      VM_Bean selvm = new VM_Bean();
      selvm.setVM_LONG_NAME("Hypersensitivity"); // ("Adverse Event Domain");
      selvm.setVM_PREFERRED_DEFINITION("Hypersensitivity"); // ("need definiton");
      vmdata.setSelectVM(selvm);
      logger.info(
          "Validating VM for "
              + vm.getVM_LONG_NAME()
              + " : desc : "
              + vm.getVM_PREFERRED_DEFINITION());
      // open teh cadsr connection
      Connection conn = varCon.openConnection();
      vmdata.setDBConnection(conn);
      // do the search;
      VMAction vmact = new VMAction();
      vmact.validateVMData(vmdata); // doChangeVM(vmdata);
      varCon.closeConnection(); // close the connection

    } catch (Exception e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
  }
Esempio n. 6
0
  private void doValidateValuesProp(VMForm vmdata) {
    try {
      // check if test data is avialable
      if (VMprop != null) {
        String sProp = VMprop.getProperty("vm0");
        System.out.println("got the key " + sProp);
        // open teh cadsr connection
        Connection conn = varCon.openConnection();
        vmdata.setDBConnection(conn);
        // loop through the data to test one by one
        for (int i = 1; true; ++i) {
          // setting up the data
          VM_Bean vm = new VM_Bean();
          VM_Bean selvm = new VM_Bean();

          // edited value meaning from the page
          String curvmname = VMprop.getProperty("current.vmname." + i);
          if (curvmname == null || curvmname.equals("")) break;

          if (curvmname != null) vm.setVM_LONG_NAME(curvmname);
          String curvmdesc = VMprop.getProperty("current.vmdesc." + i);
          if (curvmdesc != null) vm.setVM_PREFERRED_DEFINITION(curvmdesc);
          String curvmln = VMprop.getProperty("current.vmlongname." + i);
          if (curvmln != null) vm.setVM_LONG_NAME(curvmln);

          // concept associated with the edited value meaning
          String connm = VMprop.getProperty("current.conname." + i);
          if (connm != null) {
            Vector<EVS_Bean> conList = new Vector<EVS_Bean>();
            EVS_Bean vmCon = new EVS_Bean();
            vmCon.setLONG_NAME(connm);
            String conid = VMprop.getProperty("current.conid." + i);
            if (conid != null) vmCon.setCONCEPT_IDENTIFIER(conid);
            String condefn = VMprop.getProperty("current.condefn." + i);
            if (condefn != null) vmCon.setPREFERRED_DEFINITION(condefn);
            String conorgn = VMprop.getProperty("current.conorigin." + i);
            if (conorgn != null) vmCon.setEVS_ORIGIN(conorgn);
            String consrc = VMprop.getProperty("current.consrc." + i);
            if (consrc != null) vmCon.setEVS_DEF_SOURCE(consrc);
            String conidseq = VMprop.getProperty("current.conidseq." + i);
            if (conidseq != null) vmCon.setIDSEQ(conidseq);
            // add the concept bean to conlist vector and to the vm bean
            conList.addElement(vmCon);
            vm.setVM_CONCEPT_LIST(conList);
          }
          // selected value meaning before the change
          String selvmname = VMprop.getProperty("selected.vmname." + i);
          if (selvmname != null) {
            selvm.setVM_LONG_NAME(selvmname);
            String selvmdesc = VMprop.getProperty("selected.vmdesc." + i);
            if (selvmdesc != null) selvm.setVM_PREFERRED_DEFINITION(selvmdesc);
            String selvmln = VMprop.getProperty("selected.vmlongname." + i);
            if (selvmln != null) selvm.setVM_LONG_NAME(selvmln);
            String selvmid = VMprop.getProperty("selected.vmidseq." + i);
            if (selvmid != null) selvm.setVM_IDSEQ(selvmid);
            String selvmcondr = VMprop.getProperty("selected.vmcondr." + i);
            if (selvmcondr != null) selvm.setVM_CONDR_IDSEQ(selvmcondr);

            // add teh selected vm to the vm data
            vmdata.setSelectVM(selvm);
          }

          // add the beans to data object
          vmdata.setVMBean(vm);
          logger.info(
              i
                  + " Validating VM for "
                  + vm.getVM_LONG_NAME()
                  + " : desc : "
                  + vm.getVM_PREFERRED_DEFINITION()
                  + " conlist "
                  + vm.getVM_CONCEPT_LIST().size());

          // do the search;
          VMAction vmact = new VMAction();
          vmact.validateVMData(vmdata); // doChangeVM(vmdata);
        }
      }
      varCon.closeConnection(); // close the connection

    } catch (Exception e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
  }
Esempio n. 7
0
 /** @param copyBean evs bean object ot copy to */
 public EVS_Bean(EVS_Bean copyBean) {
   this.setLONG_NAME(copyBean.getLONG_NAME());
   this.setCONDR_IDSEQ(copyBean.getCONDR_IDSEQ());
   this.setCON_AC_SUBMIT_ACTION(copyBean.getCON_AC_SUBMIT_ACTION());
   this.setCONCEPT_NAME(copyBean.getCONCEPT_NAME());
   this.setCONTE_IDSEQ(copyBean.getCONTE_IDSEQ());
   this.setDISPLAY_ORDER(copyBean.getDISPLAY_ORDER());
   this.setPREFERRED_DEFINITION(copyBean.getPREFERRED_DEFINITION());
   this.setEVS_CONCEPT_SOURCE(copyBean.getEVS_CONCEPT_SOURCE());
   this.setEVS_DATABASE(copyBean.getEVS_DATABASE());
   this.setEVS_DEF_SOURCE(copyBean.getEVS_DEF_SOURCE());
   this.setEVS_ORIGIN(copyBean.getEVS_ORIGIN());
   this.setEVS_SEMANTIC(copyBean.getEVS_SEMANTIC());
   this.setID(copyBean.getID());
   this.setIDSEQ(copyBean.getIDSEQ());
   this.setASL_NAME(copyBean.getASL_NAME());
   this.setLEVEL(copyBean.getLEVEL());
   this.setDEC_USING(copyBean.getDEC_USING());
   this.setCONCEPT_IDENTIFIER(copyBean.getCONCEPT_IDENTIFIER());
   this.setNCI_CC_TYPE(copyBean.getNCI_CC_TYPE());
   this.setNAME_VALUE_PAIR_IND(copyBean.getNAME_VALUE_PAIR_IND());
   this.setNVP_CONCEPT_VALUE(copyBean.getNVP_CONCEPT_VALUE());
 }