PrimitiveRule is not the correct rule as it applies to a primitive data type and can not be scoped to a certain message type or certain fields. What you need is a MessageRule (validating OBX-5) and a corresponding MessageRuleBinding (scoping the rule to a certain message type, like ORU^R01.
regards Christian ray lukas wrote: > > I am new to Hapi and HL7.. I am parsing a message and need to write a > validator for the Observation Value in the OBX message. I am very > comfortable in RegEx so I will use that. The only problem I have is > specifying this this Observation Field in the RuleBinding object. I don’t > understand how to specify the Scope.. can someone help me.. > <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" > /> Rule observationValueRegEx = > new RegexPrimitiveRule(bla la bla); > > getPrimitiveRuleBindings().add(new RuleBinding("*", WHAT-GOES-HERE, > observationValueRegEx)); should this be “OBX^5” ? In advance.. thanks guys > > > ------------------------------------------------------------------------------ > Virtualization & Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > _______________________________________________ > Hl7api-devel mailing list > Hl7api-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/hl7api-devel > > -- View this message in context: http://old.nabble.com/Specifying--scope-in-a-RuleBinding---tp33466131p33470149.html Sent from the hl7api-devel mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ Hl7api-devel mailing list Hl7api-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hl7api-devel