Ratha
Ratha

Reputation: 9692

Why do we use ConformanceProfile in Hl7(Hapi)?

Why do we use the ConformanceProfile in Hl7 parsers? As well as what is the difference between using,DefaultValidation and No Validation in HapiContext? If i use, NoValidation and If my message has invalid tags it should parse or fail?

Upvotes: 1

Views: 463

Answers (1)

Sid
Sid

Reputation: 901

Understand this way, I create a Healthcare PMS application and I want to generate ADT messages, But I cannot generate any arbirtary message without any defined structure or cardinality. Thats when I will create "Specification for my application" to specify What I can send from and recieve or accept in my application.

A conformance profile in hapi is like the application specs fed into the conformance tables (in .xml format), which generates a message definition allowing you to specify maximum field lengths, required cardinalities.

If you are using Test Panel for HAPI you will understand that If you feed a message and use Validate:Default, then it perform a validation of the input message on a profile that HAPI has.

No Validation will not perform any validation against any profiles that exist. A simple example will outline it. There is a field called "Set ID" (PV1.1 in below segment)

PV1|1|O|NDE^^^^Ambulatory(s)^NMHOSP|R||||

That field will always be numeric. If otherwise I specify no validation, then I can feed anything in the Set ID it can be an alphabet as well.

So this PV1|1|O|NDE^^^^Ambulatory(s)^NMHOSP|R|||| will parse in Default or Using any other conformance profile

But this

PV1|A|O|NDE^^^^Ambulatory(s)^NMHOSP|R|||| will only parse in No Validation and will fail in Default.

Upvotes: 2

Related Questions