From 96d81a36286e41035ff4068859a3b0f9da924fbc Mon Sep 17 00:00:00 2001 From: vlad Date: Fri, 30 Jun 2017 19:38:37 -0700 Subject: Latest PDS UI utils including all the domain stuff --- .../ExportPatientLabelEvidenceDocument.scala | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/main/scala/xyz/driver/pdsuidomain/entities/export/patient/ExportPatientLabelEvidenceDocument.scala (limited to 'src/main/scala/xyz/driver/pdsuidomain/entities/export/patient/ExportPatientLabelEvidenceDocument.scala') diff --git a/src/main/scala/xyz/driver/pdsuidomain/entities/export/patient/ExportPatientLabelEvidenceDocument.scala b/src/main/scala/xyz/driver/pdsuidomain/entities/export/patient/ExportPatientLabelEvidenceDocument.scala new file mode 100644 index 0000000..99912bc --- /dev/null +++ b/src/main/scala/xyz/driver/pdsuidomain/entities/export/patient/ExportPatientLabelEvidenceDocument.scala @@ -0,0 +1,30 @@ +package xyz.driver.pdsuidomain.entities.export.patient + +import java.time.LocalDate + +import xyz.driver.pdsuicommon.domain._ +import xyz.driver.pdsuicommon.logging._ +import xyz.driver.pdsuidomain.entities.{Document, RawPatientLabel, RecordRequestId} + +final case class ExportPatientLabelEvidenceDocument(documentId: LongId[Document], + requestId: RecordRequestId, + documentType: String, + providerType: String, + date: LocalDate) + +object ExportPatientLabelEvidenceDocument extends PhiLogging { + + implicit def toPhiString(x: ExportPatientLabelEvidenceDocument): PhiString = { + import x._ + phi"ExportPatientLabelEvidenceDocument(documentId=$documentId, requestId=$requestId, " + + phi"documentType=${Unsafe(documentType)}, providerType=${Unsafe(providerType)}, date=$date)" + } + + def fromRaw(x: RawPatientLabel) = ExportPatientLabelEvidenceDocument( + documentId = x.documentId, + requestId = x.requestId, + documentType = x.documentType, + providerType = x.providerType, + date = x.startDate + ) +} -- cgit v1.2.3