module LifenFhir class Patient < Base attribute :first_name, String attribute :last_name, String attribute :birthdate, Date def fhir_payload { id: "patient", resourceType: "Patient", name: [ { family: [ last_name ], given: [ first_name ] } ], birthDate: birthdate.to_s } end end end