use of com.b2international.snowowl.snomed.cis.SnomedIdentifier in project snow-owl by b2ihealthcare.
the class SnomedIdentifierTest method whenCreatingBasicConceptIdentifierInShortFormat_ThenItShouldBeCreated.
@Test
public void whenCreatingBasicConceptIdentifierInShortFormat_ThenItShouldBeCreated() throws Exception {
final SnomedIdentifier id = SnomedIdentifiers.create(Concepts.ROOT_CONCEPT);
assertEquals(138875L, id.getItemId());
assertEquals("", id.getNamespace());
assertEquals(0, id.getFormatIdentifier());
assertEquals(0, id.getComponentIdentifier());
assertEquals(5, id.getCheckDigit());
assertEquals(ComponentCategory.CONCEPT, id.getComponentCategory());
}
use of com.b2international.snowowl.snomed.cis.SnomedIdentifier in project snow-owl by b2ihealthcare.
the class SnomedIdentifierTest method whenCreatingDescriptionIdentifierInShortFormat_ThenItShouldBeCreated.
@Test
public void whenCreatingDescriptionIdentifierInShortFormat_ThenItShouldBeCreated() throws Exception {
final SnomedIdentifier id = SnomedIdentifiers.create("1290023401015");
assertEquals(1290023401L, id.getItemId());
assertEquals("", id.getNamespace());
assertEquals(0, id.getFormatIdentifier());
assertEquals(1, id.getComponentIdentifier());
assertEquals(5, id.getCheckDigit());
assertEquals(ComponentCategory.DESCRIPTION, id.getComponentCategory());
}
use of com.b2international.snowowl.snomed.cis.SnomedIdentifier in project snow-owl by b2ihealthcare.
the class SnomedIdentifierTest method whenCreatingSCTIdentifierInLongFormat_ThenItShouldBeCreated.
@Test
public void whenCreatingSCTIdentifierInLongFormat_ThenItShouldBeCreated() throws Exception {
final SnomedIdentifier id = SnomedIdentifiers.create("999999990989121104");
assertEquals(99999999L, id.getItemId());
assertEquals("0989121", id.getNamespace());
assertEquals(1, id.getFormatIdentifier());
assertEquals(0, id.getComponentIdentifier());
assertEquals(4, id.getCheckDigit());
assertEquals(ComponentCategory.CONCEPT, id.getComponentCategory());
}
use of com.b2international.snowowl.snomed.cis.SnomedIdentifier in project snow-owl by b2ihealthcare.
the class SnomedIdentifierTest method whenCreatingShortestConceptIdentifierInShortFormat_ThenItShouldBeCreated.
@Test
public void whenCreatingShortestConceptIdentifierInShortFormat_ThenItShouldBeCreated() throws Exception {
final SnomedIdentifier id = SnomedIdentifiers.create("100005");
assertEquals(100L, id.getItemId());
assertEquals("", id.getNamespace());
assertEquals(0, id.getFormatIdentifier());
assertEquals(0, id.getComponentIdentifier());
assertEquals(5, id.getCheckDigit());
assertEquals(ComponentCategory.CONCEPT, id.getComponentCategory());
}
use of com.b2international.snowowl.snomed.cis.SnomedIdentifier in project snow-owl by b2ihealthcare.
the class SnomedIdentifierTest method whenCreatingRelationshipIdentifierInLongFormat_ThenItShouldBeCreated.
@Test
public void whenCreatingRelationshipIdentifierInLongFormat_ThenItShouldBeCreated() throws Exception {
final SnomedIdentifier id = SnomedIdentifiers.create("9940000001126");
assertEquals(994L, id.getItemId());
assertEquals("0000001", id.getNamespace());
assertEquals(1, id.getFormatIdentifier());
assertEquals(2, id.getComponentIdentifier());
assertEquals(6, id.getCheckDigit());
assertEquals(ComponentCategory.RELATIONSHIP, id.getComponentCategory());
}
Aggregations