Skip to content

Commit 8fba1f0

Browse files
authored
Merge pull request #38 from imsweb/add-hcpcs-description
Add support for HCPCS description
2 parents 7710546 + e1597da commit 8fba1f0

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

src/main/java/com/imsweb/seerapi/client/hcpcs/Hcpcs.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,16 @@
99
import com.fasterxml.jackson.annotation.JsonProperty;
1010
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
1111

12-
@JsonPropertyOrder({"hcpcs_code", "generic_name", "brand_names", "strength", "fda_approval_year", "fda_discontinuation_year", "cms_approval_date",
12+
@JsonPropertyOrder({"hcpcs_code", "generic_name", "description", "brand_names", "strength", "fda_approval_year", "fda_discontinuation_year", "cms_approval_date",
1313
"cms_discontinuation_date", "categories", "major_drug_class", "minor_drug_class", "oral", "date_added", "date_modified", "score"})
1414
public class Hcpcs {
1515

1616
@JsonProperty("hcpcs_code")
1717
private String hcpcsCode;
1818
@JsonProperty("generic_name")
1919
private String genericName;
20+
@JsonProperty("description")
21+
private String description;
2022
@JsonProperty("brand_names")
2123
private List<String> brandNames;
2224
@JsonProperty("strength")
@@ -60,6 +62,14 @@ public void setGenericName(String genericName) {
6062
this.genericName = genericName;
6163
}
6264

65+
public String getDescription() {
66+
return description;
67+
}
68+
69+
public void setDescription(String description) {
70+
this.description = description;
71+
}
72+
6373
public List<String> getBrandNames() {
6474
return brandNames;
6575
}

src/test/java/com/imsweb/seerapi/client/hcpcs/HcpcsServiceTest.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,17 @@ public void testGetProcedureByCode() throws IOException {
5454
assertThatExceptionOfType(NotFoundException.class)
5555
.isThrownBy(() -> _HCPCS.getProcedure("bad_code").execute())
5656
.withMessage("HCPCS code '%s' does not exist.", "bad_code");
57+
58+
// test the new description field and
59+
proc = _HCPCS.getProcedure("G6015").execute().body();
60+
assertThat(proc).isNotNull();
61+
assertThat(proc.getDescription()).contains("temporally modulated beams, binary, dynamic mlc, per treatment session");
62+
63+
// verify multiple categories are supported
64+
proc = _HCPCS.getProcedure("A9545").execute().body();
65+
assertThat(proc).isNotNull();
66+
assertThat(proc.getCategories()).containsExactlyInAnyOrder(Category.IMMUNOTHERAPY, Category.RADIOPHARMACEUTICAL);
67+
5768
}
5869

5970
@Test

0 commit comments

Comments
 (0)