|
378 | 378 | <listOfEvents> |
379 | 379 | {%- for event in listOfTimeEvents -%} |
380 | 380 | {%- set startMathML = '<ci>' + event.start + '</ci>' if event.start is defined else '<cn>'+ event.startObj.num + '</cn>' %} |
| 381 | + {%- set eventAssignments = population.selectRecordsByContext(event.id) -%} |
| 382 | + {%- if eventAssignments|length > 0 %}{# skip events with no assignments #} |
381 | 383 | <event |
382 | 384 | id="{{event.id}}" |
383 | 385 | {#- metaid="{{event.index}}" #} |
|
422 | 424 | {% if not event.active %}</apply>{% endif %} |
423 | 425 | </math> |
424 | 426 | </trigger> |
425 | | - {%- set eventAssignments = population.selectRecordsByContext(event.id) -%} |
426 | | - {%- if eventAssignments|length > 0 %} |
427 | 427 | <listOfEventAssignments> |
428 | 428 | {% for record in eventAssignments %} |
429 | 429 | <eventAssignment |
|
434 | 434 | </eventAssignment> |
435 | 435 | {% endfor %} |
436 | 436 | </listOfEventAssignments> |
437 | | - {%- endif %} |
438 | 437 | </event> |
| 438 | + {%- endif %} |
439 | 439 | {%- endfor %} |
440 | 440 | {%- for event in listOfCEvents %} |
| 441 | + {%- set eventAssignments = population.selectRecordsByContext(event.id) -%} |
| 442 | + {%- if eventAssignments|length > 0 %} |
441 | 443 | <event |
442 | 444 | id="{{event.id}}" |
443 | 445 | {#- metaid="{{event.index}}" #} |
|
453 | 455 | {% if not event.active %}</apply>{% endif %} |
454 | 456 | </math> |
455 | 457 | </trigger> |
456 | | - {%- set eventAssignments = population.selectRecordsByContext(event.id) -%} |
457 | | - {%- if eventAssignments|length > 0 %} |
458 | 458 | <listOfEventAssignments> |
459 | 459 | {% for record in eventAssignments %} |
460 | 460 | <eventAssignment |
|
465 | 465 | </eventAssignment> |
466 | 466 | {% endfor %} |
467 | 467 | </listOfEventAssignments> |
468 | | - {%- endif %} |
469 | 468 | </event> |
| 469 | + {%- endif %} |
470 | 470 | {%- endfor %} |
471 | 471 | {%- for event in listOfDEvents %} |
| 472 | + {%- set eventAssignments = population.selectRecordsByContext(event.id) -%} |
| 473 | + {%- if eventAssignments|length > 0 %} |
472 | 474 | <event |
473 | 475 | id="{{ event.id }}" |
474 | 476 | {#- metaid="{{ event.index }}" #} |
|
480 | 482 | {%- if not event.active %}</apply>{% endif %} |
481 | 483 | </math> |
482 | 484 | </trigger> |
483 | | - {%- set eventAssignments = population.selectRecordsByContext(event.id) -%} |
484 | | - {%- if eventAssignments|length > 0 %} |
485 | 485 | <listOfEventAssignments> |
486 | 486 | {% for record in eventAssignments %} |
487 | 487 | <eventAssignment |
|
492 | 492 | </eventAssignment> |
493 | 493 | {% endfor %} |
494 | 494 | </listOfEventAssignments> |
495 | | - {%- endif %} |
496 | 495 | </event> |
| 496 | + {%- endif %} |
497 | 497 | {%- endfor %} |
498 | 498 | </listOfEvents> |
499 | 499 | {% endif %} |
|
0 commit comments