ca.infoway.messagebuilder.marshalling.hl7.parser
Class CvElementParser
java.lang.Object
ca.infoway.messagebuilder.marshalling.hl7.parser.AbstractElementParser
ca.infoway.messagebuilder.marshalling.hl7.parser.AbstractSingleElementParser<Code>
ca.infoway.messagebuilder.marshalling.hl7.parser.AbstractCodeTypeElementParser
ca.infoway.messagebuilder.marshalling.hl7.parser.CvElementParser
- All Implemented Interfaces:
- ElementParser
public class CvElementParser
- extends AbstractCodeTypeElementParser
CV - Coded Value
Parses an CV element into a CV enum field. The element looks like this:
According to CeRx: code has a limit of 20 characters. This limit is not
currently enforced by this class.
http://www.hl7.org/v3ballot/html/infrastructure/itsxml/datatypes-its-xml.htm#dtimpl-CV
CeRx states that attribute codeSystem is mandatory if code is specified. However,
none of the sample messages do this and the HL7 definition of the message domains
do not specify what the codeSystem is for different domains.
There's also an originalText attribute that must be included if code is specified.
Again, the HL7 domain definitions are of little help with that.
Finally: there are two types of attributes that that use this datatype.
CNE (coded no extensibility): code attribute is mandatory.
CWE (coded with extensibility): code attribute is required (that is, must be supported
but not mandatory. originalText may be specified if code is not entered.
Currently this class does nothing with codeSystem or originalText. Therefore it is
identical to the CS class.
Methods inherited from class ca.infoway.messagebuilder.marshalling.hl7.parser.AbstractSingleElementParser |
getMandatoryAttributeValue, getNamedChildNode, getNamePartType, hasValidNullFlavorAttribute, parse, parseNullNode, setDataType, validateMaxChildCount, validateNoChildren, validateUnallowedAttributes, validateUnallowedChildNode |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CvElementParser
public CvElementParser()
doCreateDataTypeInstance
protected BareANY doCreateDataTypeInstance(String typeName)
- Specified by:
doCreateDataTypeInstance
in class AbstractSingleElementParser<Code>
parseNonNullNode
protected Code parseNonNullNode(ParseContext context,
Node node,
BareANY result,
Type expectedReturnType,
XmlToModelResult xmlToModelResult)
- Specified by:
parseNonNullNode
in class AbstractSingleElementParser<Code>
parseNonNullCodeNode
protected Code parseNonNullCodeNode(ParseContext context,
String codeAttributeName,
Node node,
BareANY result,
Type expectedReturnType,
XmlToModelResult xmlToModelResult)
- Specified by:
parseNonNullCodeNode
in class AbstractCodeTypeElementParser
Copyright © 2013. All Rights Reserved.