Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set eventtime and triggertime values according to evoke slot contents. #8

Closed
Tetr4 opened this issue Jan 3, 2016 · 1 comment · Fixed by #51
Closed

Set eventtime and triggertime values according to evoke slot contents. #8

Tetr4 opened this issue Jan 3, 2016 · 1 comment · Fixed by #51

Comments

@Tetr4
Copy link
Member

Tetr4 commented Jan 3, 2016

From @hflicka on September 4, 2012 16:20

As the evoke slot is now supported, the eventtime and triggertime values should be set according to the event that triggered an MLM. This way, details about that event are made available to the MLM code.

Copied from original issue: hflicka#4

@Tetr4
Copy link
Member Author

Tetr4 commented Sep 20, 2016

Some notes

TIME OF evoking_eventEVENTTIME

  • TIME OF evoking_event: Primary time. Clinically relevant time, e.g. the time when a sample was taken. Used for calculation.
  • EVENTTIME: Time when the (evoking event's) relevant data, e.g. the samples measured values, are stored in the database. Used to get the matching database entry for this event.

Ergo: Every event should have two members, primaryTime and eventTime.

Evoking event as boolean

The event that caused the MLM to be triggered, either directly or after a delay, will return TRUE when used in an expression.

Logic

Some ideas how the calculation of the eventtime, triggertime for a called MLM may be done:

  • MLM called from command line (not defined in specification)
    • EVENTTIME = NULL
    • TRIGGERTIME = NULL
  • MLM triggered by fixed time trigger, e.g. EVERY 5 MINUTES FOR 1 HOUR STARTING 5 MINUTES AFTER 1970-01-01 (not defined in specification)
    • EVENTTIME = NULL
    • TRIGGERTIME = NULL
  • MLM triggered by event, e.g. 5 MINUTES AFTER TIME OF my_event
    • EVENTTIME = eventTime member of triggering event
    • TRIGGERTIME = EVENTTIME + evoke delay
  • MLM called in logic slot, e.g. v1, v2 := CALL my_mlm WITH 1,2,3;
    • EVENTTIME = EVENTTIME of calling MLM
    • TRIGGERTIME = TRIGGERTIME of calling MLM
  • MLM called in action slot, e.g. CALL my_mlm WITH 1,2,3 DELAY 1 MINUTE;
    • EVENTTIME = EVENTTIME of calling MLM
    • TRIGGERTIME = TRIGGERTIME of calling MLM + CALL delay.
  • MLM triggered by delayed event call in action slot, e.g. CALL my_event DELAY 1 MINUTE;
    • EVENTTIME = TRIGGERTIME of calling MLM + delay ( = time when the event is called)
    • TRIGGERTIME = EVENTTIME + evoke delay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant