@@ -23,9 +23,6 @@ data class CreateVisitRequest(
23
23
@Schema(description = " Visit Type" , example = " SOCIAL" , required = true )
24
24
@field:NotNull
25
25
val visitType : VisitType ,
26
- @Schema(description = " Visit Status" , example = " BOOKED" , required = true )
27
- @field:NotNull
28
- val visitStatus : VisitStatus ,
29
26
@Schema(description = " Visit Restriction" , example = " OPEN" , required = true )
30
27
@field:NotNull
31
28
val visitRestriction : VisitRestriction ,
@@ -35,10 +32,17 @@ data class CreateVisitRequest(
35
32
@Schema(description = " The finishing date and time of the visit" , example = " 2018-12-01T13:45:00" , required = true )
36
33
@field:NotNull
37
34
val endTimestamp : LocalDateTime ,
35
+ @Schema(description = " Visit Notes" )
36
+ val visitNotes : List <VisitNotes > = emptyList(),
37
+ @Schema(description = " Contact associated with the visit" , required = true )
38
+ @field:NotNull
39
+ val visitContact : VisitContact ,
38
40
@Schema(description = " The date and time of when the visit was created in NEXUS" , example = " 2018-12-01T13:45:00" , required = false )
39
41
val createDateTime : LocalDateTime ? = null ,
40
42
@Schema(description = " List of visitors associated with the visit" , required = false )
41
43
val visitors : Set <@Valid Visitor >? = setOf(),
44
+ @Schema(description = " Additional support associated with the visit" )
45
+ val visitorSupport : VisitorSupport ? = null ,
42
46
@Schema(description = " Username for user who actioned this request" , required = false )
43
47
val actionedBy : String? ,
44
48
) {
@@ -56,12 +60,14 @@ data class CreateVisitRequest(
56
60
" clientVisitReference" to this .clientVisitReference,
57
61
" visitRoom" to this .visitRoom,
58
62
" visitType" to this .visitType,
59
- " visitStatus" to this .visitStatus,
60
63
" visitRestriction" to this .visitRestriction,
61
64
" startTimestamp" to this .startTimestamp.toString(),
62
65
" endTimestamp" to this .endTimestamp.toString(),
66
+ " visitNotes" to this .visitNotes.map { mapOf (" type" to it.type, " text" to it.text) },
67
+ " visitContact" to mapOf (" name" to this .visitContact.name, " telephone" to this .visitContact.telephone, " email" to this .visitContact.email),
63
68
" createDateTime" to this .createDateTime.toString(),
64
69
" visitors" to this .visitors?.map { mapOf (" nomisPersonId" to it.nomisPersonId, " visitContact" to it.visitContact) },
70
+ " visitorSupport" to this .visitorSupport?.let { mapOf (" description" to this .visitorSupport.description) },
65
71
" actionedBy" to this .actionedBy,
66
72
)
67
73
}
0 commit comments