Examples of MedicationStrength


Examples of org.apache.ctakes.typesystem.type.refsem.MedicationStrength

        idAnnotationMap.put(annotation.id, modifier);

      } else if ("Strength".equals(annotation.type)) {
        KnowtatorAnnotation unit = annotationSlots.remove("strength_unit");
        KnowtatorAnnotation number = annotationSlots.remove("strength_number");
        MedicationStrength attribute = new MedicationStrength(jCas);
        if (unit != null) {
          KnowtatorAnnotation.Span unitSpan = unit.getCoveringSpan();
          String unitString = text.substring(unitSpan.begin, unitSpan.end);
          attribute.setUnit(unitString);
        }
        if (number != null) {
          KnowtatorAnnotation.Span numberSpan = number.getCoveringSpan();
          String numberString = text.substring(numberSpan.begin, numberSpan.end);
          attribute.setNumber(numberString);
        }
        attribute.addToIndexes();
        MedicationStrengthModifier modifier = new MedicationStrengthModifier(jCas, coveringSpan.begin, coveringSpan.end);
        modifier.setNormalizedForm(attribute);
        modifier.addToIndexes();
        idAnnotationMap.put(annotation.id, modifier);

      } else if ("Strength number".equals(annotation.type)) {
        // already handled in "Strength" above

      } else if ("Strength unit".equals(annotation.type)) {
        // already handled in "Strength" above

      } else if ("device_class".equals(annotation.type)) {
        String code = stringSlots.remove("associatedCode");
        ProcedureDevice attribute = new ProcedureDevice(jCas);
        attribute.setValue(code);
        ProcedureDeviceModifier modifier = new ProcedureDeviceModifier(jCas, coveringSpan.begin, coveringSpan.end);
        modifier.setNormalizedForm(attribute);
        modifier.addToIndexes();
        idAnnotationMap.put(annotation.id, modifier);

      } else if ("method_class".equals(annotation.type)) {
        String code = stringSlots.remove("associatedCode");
        ProcedureMethod attribute = new ProcedureMethod(jCas);
        attribute.setValue(code);
        ProcedureMethodModifier modifier = new ProcedureMethodModifier(jCas, coveringSpan.begin, coveringSpan.end);
        modifier.setNormalizedForm(attribute);
        modifier.addToIndexes();
        idAnnotationMap.put(annotation.id, modifier);

      } else if ("severity_class".equals(annotation.type)) {
        Severity attribute = new Severity(jCas);
        attribute.setValue(stringSlots.remove("severity_normalization"));
        attribute.addToIndexes();
        SeverityModifier modifier = new SeverityModifier(jCas, coveringSpan.begin, coveringSpan.end);
        modifier.setTypeID(CONST.MODIFIER_TYPE_ID_SEVERITY_CLASS);
        modifier.setNormalizedForm(attribute);
        modifier.addToIndexes();
        idAnnotationMap.put(annotation.id, modifier);
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.refsem.MedicationStrength

      medicationMention.setMedicationRoute(modifier);
    }

    if (fromAnnotation.getStrength()!=null || fromAnnotation.getStrengthUnit()!=null) {
      MedicationStrengthModifier modifier = new MedicationStrengthModifier(jcas);
      MedicationStrength strength = new MedicationStrength(jcas);
      strength.setNumber(fromAnnotation.getStrength());
      strength.setUnit(fromAnnotation.getStrengthUnit());
      modifier.setNormalizedForm(strength);
      modifier.setCategory(fromAnnotation.getStrength() + fromAnnotation.getStrengthUnit());
      //strength.addToIndexes(); // don't need to be able to get these directly from the AnnotationIndex
      medicationMention.setMedicationStrength(modifier);
    }
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.refsem.MedicationStrength

          medStatusChangeModifier.setNormalizedForm(statusChange);
          medStatusChangeModifier.setCategory(statusChange.getValue());
          medMention.setMedicationStatusChange(medStatusChangeModifier);
        }
        if (medEventMention.getMedicationStrength()!=null) {
          MedicationStrength strength = medEventMention.getMedicationStrength();
          MedicationStrengthModifier medStrengthModifier = new MedicationStrengthModifier(jcas);
          medStrengthModifier.setNormalizedForm(strength);
          medStrengthModifier.setCategory(strength.getNumber() + strength.getUnit());
          medMention.setMedicationStrength(medStrengthModifier);
        }
       
        // TODO handle MedicationAllergyModifier here when / if the value is set/disovered some day
       
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.refsem.MedicationStrength

        idAnnotationMap.put(annotation.id, modifier);

      } else if ("Strength".equals(annotation.type)) {
        KnowtatorAnnotation unit = annotationSlots.remove("strength_unit");
        KnowtatorAnnotation number = annotationSlots.remove("strength_number");
        MedicationStrength attribute = new MedicationStrength(jCas);
        if (unit != null) {
          KnowtatorAnnotation.Span unitSpan = unit.getCoveringSpan();
          String unitString = text.substring(unitSpan.begin, unitSpan.end);
          attribute.setUnit(unitString);
        }
        if (number != null) {
          KnowtatorAnnotation.Span numberSpan = number.getCoveringSpan();
          String numberString = text.substring(numberSpan.begin, numberSpan.end);
          attribute.setNumber(numberString);
        }
        attribute.addToIndexes();
        MedicationStrengthModifier modifier = new MedicationStrengthModifier(jCas, coveringSpan.begin, coveringSpan.end);
        modifier.setNormalizedForm(attribute);
        modifier.addToIndexes();
        idAnnotationMap.put(annotation.id, modifier);

      } else if ("Strength number".equals(annotation.type)) {
        // already handled in "Strength" above

      } else if ("Strength unit".equals(annotation.type)) {
        // already handled in "Strength" above

      } else if ("device_class".equals(annotation.type)) {
        String code = stringSlots.remove("associatedCode");
        ProcedureDevice attribute = new ProcedureDevice(jCas);
        attribute.setValue(code);
        ProcedureDeviceModifier modifier = new ProcedureDeviceModifier(jCas, coveringSpan.begin, coveringSpan.end);
        modifier.setNormalizedForm(attribute);
        modifier.addToIndexes();
        idAnnotationMap.put(annotation.id, modifier);

      } else if ("method_class".equals(annotation.type)) {
        String code = stringSlots.remove("associatedCode");
        ProcedureMethod attribute = new ProcedureMethod(jCas);
        attribute.setValue(code);
        ProcedureMethodModifier modifier = new ProcedureMethodModifier(jCas, coveringSpan.begin, coveringSpan.end);
        modifier.setNormalizedForm(attribute);
        modifier.addToIndexes();
        idAnnotationMap.put(annotation.id, modifier);

      } else if ("severity_class".equals(annotation.type)) {
        Severity attribute = new Severity(jCas);
        attribute.setValue(stringSlots.remove("severity_normalization"));
        attribute.addToIndexes();
        SeverityModifier modifier = new SeverityModifier(jCas, coveringSpan.begin, coveringSpan.end);
        modifier.setTypeID(CONST.MODIFIER_TYPE_ID_SEVERITY_CLASS);
        modifier.setNormalizedForm(attribute);
        modifier.addToIndexes();
        idAnnotationMap.put(annotation.id, modifier);
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.refsem.MedicationStrength

      medicationMention.setMedicationRoute(modifier);
    }

    if (fromAnnotation.getStrength()!=null || fromAnnotation.getStrengthUnit()!=null) {
      MedicationStrengthModifier modifier = new MedicationStrengthModifier(jcas);
      MedicationStrength strength = new MedicationStrength(jcas);
      strength.setNumber(fromAnnotation.getStrength());
      strength.setUnit(fromAnnotation.getStrengthUnit());
      modifier.setNormalizedForm(strength);
      modifier.setCategory(fromAnnotation.getStrength() + fromAnnotation.getStrengthUnit());
      //strength.addToIndexes(); // don't need to be able to get these directly from the AnnotationIndex
      medicationMention.setMedicationStrength(modifier);
    }
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.refsem.MedicationStrength

        idAnnotationMap.put(annotation.id, modifier);

      } else if ("Strength".equals(annotation.type)) {
        KnowtatorAnnotation unit = annotationSlots.remove("strength_unit");
        KnowtatorAnnotation number = annotationSlots.remove("strength_number");
        MedicationStrength attribute = new MedicationStrength(jCas);
        if (unit != null) {
          KnowtatorAnnotation.Span unitSpan = unit.getCoveringSpan();
          String unitString = text.substring(unitSpan.begin, unitSpan.end);
          attribute.setUnit(unitString);
        }
        if (number != null) {
          KnowtatorAnnotation.Span numberSpan = number.getCoveringSpan();
          String numberString = text.substring(numberSpan.begin, numberSpan.end);
          attribute.setNumber(numberString);
        }
        attribute.addToIndexes();
        MedicationStrengthModifier modifier = new MedicationStrengthModifier(jCas, coveringSpan.begin, coveringSpan.end);
        modifier.setNormalizedForm(attribute);
        modifier.addToIndexes();
        idAnnotationMap.put(annotation.id, modifier);

      } else if ("Strength number".equals(annotation.type)) {
        // already handled in "Strength" above

      } else if ("Strength unit".equals(annotation.type)) {
        // already handled in "Strength" above

      } else if ("device_class".equals(annotation.type)) {
        String code = stringSlots.remove("associatedCode");
        ProcedureDevice attribute = new ProcedureDevice(jCas);
        attribute.setValue(code);
        ProcedureDeviceModifier modifier = new ProcedureDeviceModifier(jCas, coveringSpan.begin, coveringSpan.end);
        modifier.setNormalizedForm(attribute);
        modifier.addToIndexes();
        idAnnotationMap.put(annotation.id, modifier);

      } else if ("method_class".equals(annotation.type)) {
        String code = stringSlots.remove("associatedCode");
        ProcedureMethod attribute = new ProcedureMethod(jCas);
        attribute.setValue(code);
        ProcedureMethodModifier modifier = new ProcedureMethodModifier(jCas, coveringSpan.begin, coveringSpan.end);
        modifier.setNormalizedForm(attribute);
        modifier.addToIndexes();
        idAnnotationMap.put(annotation.id, modifier);

      } else if ("severity_class".equals(annotation.type)) {
        Severity attribute = new Severity(jCas);
        attribute.setValue(stringSlots.remove("severity_normalization"));
        attribute.addToIndexes();
        SeverityModifier modifier = new SeverityModifier(jCas, coveringSpan.begin, coveringSpan.end);
        modifier.setTypeID(CONST.MODIFIER_TYPE_ID_SEVERITY_CLASS);
        modifier.setNormalizedForm(attribute);
        modifier.addToIndexes();
        idAnnotationMap.put(annotation.id, modifier);
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.refsem.MedicationStrength

          medStatusChangeModifier.setNormalizedForm(statusChange);
          medStatusChangeModifier.setCategory(statusChange.getValue());
          medMention.setMedicationStatusChange(medStatusChangeModifier);
        }
        if (medEventMention.getMedicationStrength()!=null) {
          MedicationStrength strength = medEventMention.getMedicationStrength();
          MedicationStrengthModifier medStrengthModifier = new MedicationStrengthModifier(jcas);
          medStrengthModifier.setNormalizedForm(strength);
          medStrengthModifier.setCategory(strength.getNumber() + strength.getUnit());
          medMention.setMedicationStrength(medStrengthModifier);
        }
       
        // TODO handle MedicationAllergyModifier here when / if the value is set/disovered some day
       
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.refsem.MedicationStrength

                    rxNormCui = oc.getOui();
                  }
                }

                MedicationStrengthModifier strength = neAnnot.getMedicationStrength();
                MedicationStrength strengthTerm = (MedicationStrength) strength.getNormalizedForm();
                String strengthTermString = "null";
                if (strengthTerm != null) {
                  strengthTermString = strengthTerm.getNumber()+ " " +strengthTerm.getUnit();
                }
               
                String medicationDosageString = "null";
                MedicationDosageModifier dosageModifier = neAnnot.getMedicationDosage();
                if (dosageModifier != null) {
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.refsem.MedicationStrength

      medicationMention.setMedicationRoute(modifier);
    }

    if (fromAnnotation.getStrength()!=null || fromAnnotation.getStrengthUnit()!=null) {
      MedicationStrengthModifier modifier = new MedicationStrengthModifier(jcas);
      MedicationStrength strength = new MedicationStrength(jcas);
      strength.setNumber(fromAnnotation.getStrength());
      strength.setUnit(fromAnnotation.getStrengthUnit());
      modifier.setNormalizedForm(strength);
      modifier.setCategory(fromAnnotation.getStrength() + fromAnnotation.getStrengthUnit());
      //strength.addToIndexes(); // don't need to be able to get these directly from the AnnotationIndex
      medicationMention.setMedicationStrength(modifier);
    }
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.refsem.MedicationStrength

      //route.addToIndexes(jcas); // don't need to be able to get these directly from the AnnotationIndex
      medicationMention.setMedicationRoute(route);
    }

    if (fromAnnotation.getStrength()!=null || fromAnnotation.getStrengthUnit()!=null) {
      MedicationStrength strength = new MedicationStrength(jcas);
      strength.setNumber(fromAnnotation.getStrength());
      strength.setUnit(fromAnnotation.getStrengthUnit());
      //strength.addToIndexes(); // don't need to be able to get these directly from the AnnotationIndex
      medicationMention.setMedicationStrength(strength);
    }

    if (fromAnnotation.getStartDate()!=null) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.