Martin Browne · Feb 5, 2021 go to post

Hi,

I managed to get this to work thanks to a call to the WRC. Here is the DTL setting I required in case anyone else has similar issues...

Martin Browne · Feb 3, 2021 go to post

Thanks, I did try this but was receiving errors. This was the syntax I was using in the DTL:

..Piece(source.{AlternateVisitID().ID},"~",,*)

This is the full PV1 segment:

PV1|1|O|NPID15T^MEDIFREN^^^^^^^NURSE LED "TB" TELEPHONE CLINIC|||||||||||||||1|015728690002||||||||||||||||||||||||||20210203114600|||||15081942~15081951~15108961~15280550

Martin Browne · Jan 28, 2020 go to post

Thanks Enrico, 

I've written the custom function...

ClassMethod PostCodeLastCharacter(PID11 As %String)
{
Set ReturnValue = 0

if ($EXTRACT(PID11,*) = "Z")

{set ReturnValue = 1}

Quit ReturnValue

}

I've added a trace to my rule which returns the relevant 1 or 0 (depending on the post code). However, my rule condition which references the function doesn't trigger an message...

PostCodeLastCharacter(HL7.{PID:11(1).5}=1)

Have I got the syntax correct?