File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
src/main/kotlin/application/presenter/serialization Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,10 @@ import application.presenter.api.report.healthcareuser.PatientVitalSignsApiDto
1313import application.presenter.api.report.measurements.ValueWithUnit
1414import entity.surgeryreport.healthcareuser.HealthcareUser
1515import entity.surgeryreport.healthcareuser.PatientVitalSigns
16+ import entity.surgeryreport.healthcareuser.TaxCode
17+ import entity.surgeryreport.healthcareuser.VitalSign
18+ import entity.surgeryreport.measurements.Percentage
19+ import entity.surgeryreport.measurements.Temperature
1620
1721/* *
1822 * Serializers for data to return to API.
@@ -27,6 +31,15 @@ object HealthcareUserSerializer {
2731 surname = this .surname,
2832 )
2933
34+ /* *
35+ * Extension method to obtain the api dto of a healthcare user.
36+ */
37+ fun HealthcareUserApiDto.toHealthcareUser (): HealthcareUser = HealthcareUser (
38+ taxCode = TaxCode (this .taxCode),
39+ name = this .name,
40+ surname = this .surname,
41+ )
42+
3043 /* *
3144 * Extension method to obtain the api dto of patient vital signs.
3245 */
You can’t perform that action at this time.
0 commit comments