Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

We need to access this data however in the script. Here is some GELLO to proceed with, in the IDE:

No Format
Context HL7_v2_VMR_V1::IncomingObservation
imports iso_21090_datatypes

Let metadata = Tuple {
                       title = 'Test high reticulocytes',
                       keywords = Sequence{'Test'},
                       version = 1,
                       revision = 1,
                       date = '20240816',
                       mode = 'CLIENT',
                       author = 'Medical-Objects',
                       identifier = 'COMMENT_GELLO:Test_Retics',
                       purpose = 'For testing new GELLO IDE',
                       includesList = Sequence{'14196-0^^LN'},
                       excludesList = Sequence{}
                       }

-- Set up codes

Let retic_LN: CD = CD{code = '14196-0',codeSystem = '2.16.840.1.113883.6.1', codeSystemName ='LOINC'}
-- get the incoming observation and any vmr data

Let incoming_retic = observations->select(observationCode.implies(retic_LN).value)
                                     ->sortedBy(dateTime).last()
----------------
incoming_retic

We are setting up a Concept Descriptor (CD) typed object. We then use the implies method as a collection operator on the observation class in the context of this incoming observation, sorting any multiple values and getting the last and usually the only one.

Then we return this.

To run in the GELLO IDE you can use the Run and Debug button on the LHS:  Image Added  Then Run the GELLO: Image Added

The result may be viewed top LHS:

Image Added

Its a good idea to close the session, find the red square which is the stop button: Image Added. Its easy to have several debug/ run sessions happening at once so keep an eye on that and stop them when desired.

Finally to close, just close the window tab.

Image Added