Skip to content

Commit

Permalink
Implementing start telecom field set to the moment smsContactPoint is…
Browse files Browse the repository at this point in the history
… initialized with a value
  • Loading branch information
Filienko committed Jan 31, 2024
1 parent 5a860d4 commit db344f0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/model/Patient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
IPatient_Link,
IReference,
IResourceList,
IPeriod,
PatientGenderKind
} from "@ahryman40k/ts-fhir-types/lib/R4";
import {ExtensionUrl, RelationshipCategory, SystemURL} from "./CodeSystem";
Expand All @@ -44,6 +45,7 @@ export default class Patient implements IPatient {
gender?: PatientGenderKind;
generalPractitioner?: IReference[];
id?: string;
period?: IPeriod;
identifier?: IIdentifier[];
implicitRules?: string;
language?: string;
Expand Down Expand Up @@ -86,7 +88,12 @@ export default class Patient implements IPatient {
)[0];

if (!smsContactPoint) {
smsContactPoint = { system: ContactPointSystemKind._sms };
smsContactPoint = {
system: ContactPointSystemKind._sms,
period: {
start: new Date().toISOString().slice(0, 19) + 'Z'
}
};
this.telecom.push(smsContactPoint);
}

Expand Down

0 comments on commit db344f0

Please sign in to comment.