diff --git a/src/model/Patient.ts b/src/model/Patient.ts index ba0e381b..6ede33df 100644 --- a/src/model/Patient.ts +++ b/src/model/Patient.ts @@ -87,16 +87,15 @@ export default class Patient implements IPatient { )[0]; if (!smsContactPoint) { - const smsPeriod: IPeriod = { - start: new Date().toISOString(), - }; smsContactPoint = { - system: ContactPointSystemKind._sms, - period: smsPeriod, + system: ContactPointSystemKind._sms }; this.telecom.push(smsContactPoint); } - + const smsPeriod: IPeriod = { + start: new Date().toISOString(), + }; + smsContactPoint.period = smsPeriod; smsContactPoint.value = phone; }