1
2
3
4
5
6
7
8
9
10
11
12
13
14 package uk.nhs.interoperability.client.samples.smsp;
15
16 import uk.nhs.interoperability.infrastructure.ITKMessagingException;
17 import uk.nhs.interoperability.payload.ITKMessage;
18
19
20
21
22
23
24
25
26
27 public class GetPatientDetailsByNHSNumberResponse {
28
29
30
31
32
33
34 public String getNhsNumber() {
35 return nhsNumber;
36 }
37
38
39
40
41
42
43 public void setNhsNumber(String nhsNumber) {
44 this.nhsNumber = nhsNumber;
45 }
46
47
48
49
50
51
52 public boolean getVerifiedIndicator() {
53 return verifiedIndicator;
54 }
55
56
57
58
59
60
61 public void setVerifiedIndicator(boolean verifiedIndicator) {
62 this.verifiedIndicator = verifiedIndicator;
63 }
64
65
66
67
68
69
70 public String getResponseCode() {
71 return responseCode;
72 }
73
74
75
76
77
78
79 public void setResponseCode(String responseCode) {
80 this.responseCode = responseCode;
81 }
82
83
84
85
86
87
88 public String getPayload() {
89 return responseMessage;
90 }
91
92
93
94
95
96
97 public void setResponseMessage(String responseMessage) {
98 this.responseMessage = responseMessage;
99 }
100
101
102
103 String nhsNumber;
104
105
106 boolean verifiedIndicator;
107
108
109 String responseCode;
110
111
112 String responseMessage;
113
114
115
116
117
118
119
120 public GetPatientDetailsByNHSNumberResponse(ITKMessage response) throws ITKMessagingException {
121
122 if (response==null || response.getBusinessPayload() == null){
123 throw new ITKMessagingException("No payload returned from service");
124 }
125
126
127
128
129 this.verifiedIndicator = true;
130 this.nhsNumber = "1234567890";
131 this.responseCode = "0000";
132 this.responseMessage = response.getBusinessPayload();
133
134
135 }
136
137 }