From 722d7556b9921e5c016c4f538952716ef8f2e363 Mon Sep 17 00:00:00 2001 From: Nathan Cannon Date: Mon, 5 Aug 2019 15:10:57 +0100 Subject: [PATCH] Closer aligned CSV format to coaching database format --- .../main/kotlin/uk/co/neviyn/observationdatabase/CSV.kt | 8 ++++---- .../kotlin/uk/co/neviyn/observationdatabase/Entity.kt | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/backend/src/main/kotlin/uk/co/neviyn/observationdatabase/CSV.kt b/backend/src/main/kotlin/uk/co/neviyn/observationdatabase/CSV.kt index a36caa2..5981203 100644 --- a/backend/src/main/kotlin/uk/co/neviyn/observationdatabase/CSV.kt +++ b/backend/src/main/kotlin/uk/co/neviyn/observationdatabase/CSV.kt @@ -4,12 +4,12 @@ package uk.co.neviyn.observationdatabase * Header line for a CSV file in the format of the standard observation database */ fun csvHeaderString(): String { - return "Ob ID,Observerfull,Observer,obDate,Title,Type,Department,Station,Station Focus,Scores-Monitoring,Scores-Control Procedural," + - "Scores-Control,Scores-Conservatism,Scores-Teamwork Comms,Scores-Teamwork Leadership,Scores-Teamwork Workload,\"Scores-Knowledge, Skills and Attitudes\"," + + return "Observer,obDate,Title,Type,Department,Station,Station Focus,Scores-Monitoring,Scores-Control Procedural," + + "Scores-Control,Scores-Conservatism,Scores-Teamwork Comms,Scores-Teamwork Leadership,Scores-Teamwork Workload,Scores-Knowledge, Skills and Attitudes," + "Strengths-Monitoring,Strengths-Control Procedural,Strengths-Control,Strengths-Conservatism,Strengths-Teamwork Comms," + - "Strengths-Teamwork Leadership,Strengths-Teamwork Workload,\"Strengths-Knowledge, Skills and Attitudes\"," + + "Strengths-Teamwork Leadership,Strengths-Teamwork Workload,Strengths-Knowledge, Skills and Attitudes," + "Develop-Monitoring,Develop-Control Procedural,Develop-Control,Develop-Conservatism,Develop-Teamwork Comms," + - "Develop-Teamwork Leadership,Develop-Teamwork Workload,\"Develop-Knowledge, Skills and Attitudes\"" + "Develop-Teamwork Leadership,Develop-Teamwork Workload,Develop-Knowledge, Skills and Attitudes,ErrorPrecursors,ActionTaken" } /** diff --git a/backend/src/main/kotlin/uk/co/neviyn/observationdatabase/Entity.kt b/backend/src/main/kotlin/uk/co/neviyn/observationdatabase/Entity.kt index e8ad952..a17453f 100644 --- a/backend/src/main/kotlin/uk/co/neviyn/observationdatabase/Entity.kt +++ b/backend/src/main/kotlin/uk/co/neviyn/observationdatabase/Entity.kt @@ -93,7 +93,7 @@ data class Observation( val person: Person ) { fun toCsvFormat(): String { - return ",,\"${tutors.joinToString { it.name }}\",$date,\"${scenarios.joinToString { it.title }}\",\"Training\",\"Performance Improvement - Training\",\"${site.name}\",\"N/A\"," + + return "\"${tutors.joinToString { it.name }}\",$date,\"${scenarios.joinToString { it.title }}\",\"Training\",\"Operations - Shift Operations\",\"${site.name}\",\"N/A\"," + "${roundScore(monitoring)},${roundScore(controlProcedural)},${roundScore(control)}," + "${roundScore(conservatism)},${roundScore(teamworkCommunications)},${roundScore(teamworkLeadership)}," + "${roundScore(teamworkWorkload)},${roundScore(knowledge)},\"${scenarios.joinToString { it.monitoring.strengths }}\"," + @@ -103,7 +103,7 @@ data class Observation( "\"${scenarios.joinToString { it.monitoring.improvements }}\",\"${scenarios.joinToString { it.controlProcedural.improvements }}\"," + "\"${scenarios.joinToString { it.control.improvements }}\",\"${scenarios.joinToString { it.conservatism.improvements }}\"," + "\"${scenarios.joinToString { it.teamworkCommunications.improvements }}\",\"${scenarios.joinToString { it.teamworkLeadership.improvements }}\"," + - "\"${scenarios.joinToString { it.teamworkWorkload.improvements }}\",\"${scenarios.joinToString { it.knowledge.improvements }}\"" + "\"${scenarios.joinToString { it.teamworkWorkload.improvements }}\",\"${scenarios.joinToString { it.knowledge.improvements }}\",;#None;#," } private fun roundScore(input: Double?): String {