Esempio n. 1
0
        public static Model.RiskAssessment.PredictionComponent addPrediction(this Model.RiskAssessment me)
        {
            var item = new Model.RiskAssessment.PredictionComponent();

            me.Prediction.Add(item);
            return(item);
        }
Esempio n. 2
0
 public void testDecimalRA()
 {
     Model.RiskAssessment r  = new Model.RiskAssessment();
     Model.SimpleQuantity sq = new Model.SimpleQuantity();
     sq.setValue(0.2);
     sq.setUnit("%");
     sq.setCode("%");
     sq.setSystem("http://unitsofmeasure.org");
     Model.SimpleQuantity sq1 = new Model.SimpleQuantity();
     sq1.setValue(0.4);
     sq1.setUnit("%");
     sq1.setCode("%");
     sq1.setSystem("http://unitsofmeasure.org");
     r.addPrediction().setProbability(new Model.Range().setLow(sq).setHigh(sq1));
     testBoolean(r, r.getPrediction()[0].getProbability(), "RiskAssessment.prediction.probabilityRange",
                 "(low.empty() or ((low.code = '%') and (low.system = %ucum))) and (high.empty() or ((high.code = '%') and (high.system = %ucum)))", true);
     testBoolean(r, r.getPrediction()[0], "RiskAssessment.prediction", "probability is decimal implies probability.as(decimal) <= 100", true);
     r.getPrediction()[0].setProbability(new DecimalType(80));
     testBoolean(r, r.getPrediction()[0], "RiskAssessment.prediction", "probability.as(decimal) <= 100", true);
 }
Esempio n. 3
0
 public static List <Model.RiskAssessment.PredictionComponent> getPrediction(this Model.RiskAssessment me)
 {
     return(me.Prediction);
 }