Created
December 7, 2017 10:24
-
-
Save cknaap/15fa48f72bfa7ccba9fefa3cd8c7eed0 to your computer and use it in GitHub Desktop.
Map data in Vonk FHIR Facade
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public IResource MapPatient(ViSiPatient source) | |
{ | |
var patient = new Patient(); | |
patient.Id = source.Id.ToString(); | |
patient.Identifier.Add(new Identifier("http://mycompany.org/patientnumber", source.PatientNumber)); | |
patient.Name.Add(new HumanName().WithGiven(source.FirstName).AndFamily(source.FamilyName)); | |
patient.BirthDate = new FhirDateTime(source.DateOfBirth).ToString(); | |
patient.Telecom.Add(new ContactPoint(ContactPoint.ContactPointSystem.Email, ContactPoint.ContactPointUse.Home, source.EmailAddress)); | |
return patient.AsIResource(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment