示例#1
0
        public override BareANY Parse(ParseContext context, XmlNode node, XmlToModelResult result)
        {
            BareANY            codedTypeAny = DoCreateR2DataTypeInstance(context);
            XmlElement         element      = (XmlElement)node;
            CodedTypeR2 <Code> codedType    = new CodedTypeR2 <Code>();

            // attributes
            HandleNullFlavor(element, codedTypeAny, context, result);
            HandleCodeAndCodeSystem(element, codedType, context, result);
            HandleCodeSystemName(element, codedType, context, result);
            HandleCodeSystemVersion(element, codedType, context, result);
            HandleDisplayName(element, codedType, context, result);
            HandleValue(element, codedType, context, result);
            HandleQty(element, codedType, context, result);
            HandleOperator(element, codedTypeAny, codedType, context, result);
            // elements
            HandleSimpleValue(element, codedType, context, result);
            HandleOriginalText(element, codedType, context, result);
            HandleQualifier(element, codedType, context, result);
            HandleTranslation(element, codedType, context, result);
            HandleValidTime(element, codedType, context, result);
            HandleConstraints(codedType, context.GetConstraints(), element, result);
            // want to return null if no attributes or elements are present
            if (codedType.IsEmpty())
            {
                codedType = null;
            }
            ((BareANYImpl)codedTypeAny).BareValue = CodedTypeR2Helper.ConvertCodedTypeR2(codedType, context.GetExpectedReturnType());
            return(codedTypeAny);
        }
示例#2
0
 protected override CodedTypeR2 <Code> ExtractBareValue(BareANY hl7Value)
 {
     return(hl7Value == null ? null : CodedTypeR2Helper.ConvertCodedTypeR2(hl7Value.BareValue));
 }