示例#1
0
  /**
   * Builds a coded result from an observation
   *
   * @param obs
   */
  public Result(Obs obs) {
    this(
        obs.getObsDatetime(),
        null,
        obs.getValueAsBoolean(),
        obs.getValueCoded(),
        obs.getValueDatetime(),
        obs.getValueNumeric(),
        obs.getValueText(),
        obs);

    Concept concept = obs.getConcept();
    ConceptDatatype conceptDatatype = null;

    if (concept != null) {
      conceptDatatype = concept.getDatatype();

      if (conceptDatatype == null) {
        return;
      }
      if (conceptDatatype.isCoded()) {
        this.datatype = Datatype.CODED;
      } else if (conceptDatatype.isNumeric()) {
        this.datatype = Datatype.NUMERIC;
      } else if (conceptDatatype.isDate()) {
        this.datatype = Datatype.DATETIME;
      } else if (conceptDatatype.isText()) {
        this.datatype = Datatype.TEXT;
      } else if (conceptDatatype.isBoolean()) {
        this.datatype = Datatype.BOOLEAN;
      }
    }
  }
  public boolean evaluate_Qual_Pb() {
    Concept concept;
    boolean retVal = false;
    Obs obs;

    concept = Context.getConceptService().getConceptByName("Qualitative_Blood_Lead");
    obs = getObsForConceptForPatient(concept, locale, patient);
    if (obs != null) {
      boolean Qual_Pb = obs.getValueAsBoolean();
      if (Qual_Pb == true) {
        retVal = true;
      }
    }

    return retVal;
  }