File tree Expand file tree Collapse file tree
main/java/com/imsweb/seerapi/client/mph
test/java/com/imsweb/seerapi/client/mph Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66
77public class MphOutput {
88
9- // The possible results of determining if two tumors are single or multiple primaries.
10- public enum Result {
11- // indicates the two tumors are the same primary
12- SINGLE_PRIMARY ,
13- // indicates the two tumors are different primaries
14- MULTIPLE_PRIMARIES ,
15- // indicates there is not enough information to make a proper determination
16- QUESTIONABLE
17- }
18-
199 @ JsonProperty ("result" )
2010 private Result _result ;
2111 @ JsonProperty ("reason" )
@@ -26,7 +16,6 @@ public enum Result {
2616 private String _groupId ;
2717 @ JsonProperty ("step" )
2818 private String _step ;
29-
3019 public MphOutput () {
3120 }
3221
@@ -69,4 +58,14 @@ public String getStep() {
6958 public void setStep (String step ) {
7059 _step = step ;
7160 }
61+
62+ // The possible results of determining if two tumors are single or multiple primaries.
63+ public enum Result {
64+ // indicates the two tumors are the same primary
65+ SINGLE_PRIMARY ,
66+ // indicates the two tumors are different primaries
67+ MULTIPLE_PRIMARIES ,
68+ // indicates there is not enough information to make a proper determination
69+ QUESTIONABLE
70+ }
7271}
Original file line number Diff line number Diff line change @@ -143,4 +143,21 @@ public void testLenientMode() throws IOException {
143143 assertEquals ("M13" , result .getStep ());
144144 }
145145
146+ @ Test (expected = BadRequestException .class )
147+ public void testInvalidInput () throws IOException {
148+ MphInput i1 = new MphInput ();
149+ MphInput i2 = new MphInput ();
150+
151+ // invalid primary site
152+ i1 .setPrimarySite ("C080" );
153+ i2 .setPrimarySite ("D080" );
154+ i1 .setHistologyIcdO3 ("8000" );
155+ i1 .setBehaviorIcdO3 ("3" );
156+ i2 .setHistologyIcdO3 ("8100" );
157+ i2 .setBehaviorIcdO3 ("3" );
158+ i1 .setDateOfDiagnosisYear ("2015" );
159+ i2 .setDateOfDiagnosisYear ("2015" );
160+ _MPH .mph (new MphInputPair (i1 , i2 )).execute ().body ();
161+ }
162+
146163}
You can’t perform that action at this time.
0 commit comments