Beispiel #1
0
        public Element(DvText name, string archetypeNodeId, Support.Identification.UidBasedId uid,
            Link[] links, Archetyped archetypeDetails, FeederAudit feederAudit,
            DataValue value, DvCodedText nullFlavour)
            : base(name, archetypeNodeId, uid, links, archetypeDetails, feederAudit)
        {
            this.value = value;
            this.nullFlavour = nullFlavour;

            SetAttributeDictionary();
            CheckInvariants();
        }
Beispiel #2
0
        protected override void ReadXmlBase(System.Xml.XmlReader reader)
        {
            base.ReadXmlBase(reader);

            if (reader.LocalName == "value")
            {
                this.value = DataTypes.Basic.DataValue.ReadDataValue(reader);
            }

            if (reader.LocalName == "null_flavour")
            {
                this.nullFlavour = new OpenEhr.RM.DataTypes.Text.DvCodedText();
                this.nullFlavour.ReadXml(reader);
            }
        }
Beispiel #3
0
        internal static DataTypes.Basic.DataValue CreateInterval(string intervalType)
        {
            Check.Require(!string.IsNullOrEmpty(intervalType), "intervalType must not be null or empty");

            DataTypes.Basic.DataValue interval = null;

            switch (intervalType)
            {
            case "DV_QUANTITY":
                interval = new DataTypes.Quantity.DvInterval <DataTypes.Quantity.DvQuantity>();
                break;

            case "DV_COUNT":
                interval = new DataTypes.Quantity.DvInterval <DataTypes.Quantity.DvCount>();
                break;

            case "DV_ORDINAL":
                interval = new DataTypes.Quantity.DvInterval <DataTypes.Quantity.DvOrdinal>();
                break;

            case "DV_PROPORTION":
                interval = new DataTypes.Quantity.DvInterval <DataTypes.Quantity.DvProportion>();
                break;

            case "DV_DURATION":
                interval = new DataTypes.Quantity.DvInterval <DataTypes.Quantity.DateTime.DvDuration>();
                break;

            case "DV_DATE_TIME":
                interval = new DataTypes.Quantity.DvInterval <DataTypes.Quantity.DateTime.DvDateTime>();
                break;

            case "DV_DATE":
                interval = new DataTypes.Quantity.DvInterval <DataTypes.Quantity.DateTime.DvDate>();
                break;

            case "DV_TIME":
                interval = new DataTypes.Quantity.DvInterval <DataTypes.Quantity.DateTime.DvTime>();
                break;

            default:
                throw new NotImplementedException(intervalType);
            }

            Check.Ensure(interval != null, "interval must not be null");
            return(interval);
        }
Beispiel #4
0
        protected override void ReadXmlBase(System.Xml.XmlReader reader)
        {
            base.ReadXmlBase(reader);

            if (reader.LocalName == "value")
            {
                this.value = DataTypes.Basic.DataValue.ReadDataValue(reader);
            }

            if (reader.LocalName == "null_flavour")
            {
                this.nullFlavour = new OpenEhr.RM.DataTypes.Text.DvCodedText();
                this.nullFlavour.ReadXml(reader);
            }
        }