File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1017,6 +1017,7 @@ export class PatientSession {
10171017 this . patient . addEvent ( {
10181018 name : 'Completed pre-screening checks' ,
10191019 note : event . note ,
1020+ createdAt : event . createdAt ,
10201021 createdBy_uid : event . createdBy_uid ,
10211022 programme_ids : this . session . programme_ids
10221023 } )
Original file line number Diff line number Diff line change 11import process from 'node:process'
22
33import { faker } from '@faker-js/faker'
4- import { isSameDay } from 'date-fns'
4+ import { addMinutes , isSameDay } from 'date-fns'
55import 'dotenv/config'
66
77import clinicsData from '../app/datasets/clinics.js'
@@ -452,18 +452,18 @@ for (const patientSession of Object.values(context.patientSessions)) {
452452
453453 const vaccinatedInSchool = faker . datatype . boolean ( 0.8 )
454454 if ( vaccinatedInSchool ) {
455- // REGISTER attendance (15 minutes before vaccination)
455+ // REGISTER attendance (10 minutes before vaccination)
456456 patientSession . registerAttendance (
457457 {
458- createdAt : new Date ( vaccination . createdAt . getTime ( ) - 15 * 60000 ) ,
458+ createdAt : addMinutes ( vaccination . createdAt , - 10 ) ,
459459 createdBy_uid : nurse . uid
460460 } ,
461461 RegistrationOutcome . Present
462462 )
463463
464- // PRE-SCREEN
464+ // PRE-SCREEN (5 minutes before vaccination)
465465 patientSession . preScreen ( {
466- createdAt : new Date ( vaccination . createdAt . getTime ( ) - 10 * 60000 ) ,
466+ createdAt : addMinutes ( vaccination . createdAt , - 5 ) ,
467467 createdBy_uid : nurse . uid
468468 } )
469469
You can’t perform that action at this time.
0 commit comments