test_class.file: resources/src/test/java/org/hl7/davinci/SharedUtilitiesTest.java
test_class.identifier: SharedUtilitiesTest
test_case.body: @Test
    public void testCompareReferenceToId() {
      assertTrue(SharedUtilities.compareReferenceToId("Patient/1234", "1234"));
      assertTrue(SharedUtilities.compareReferenceToId("1234", "Patient/1234"));
      assertTrue(SharedUtilities.compareReferenceToId("1234", "1234"));
      assertTrue(SharedUtilities.compareReferenceToId("Patient/1234", "Patient/1234"));
  
      assertFalse(SharedUtilities.compareReferenceToId("Patient/1234", "4321"));
      assertFalse(SharedUtilities.compareReferenceToId("1234", "Patient/4321"));
      assertFalse(SharedUtilities.compareReferenceToId("1234", "4321"));
      assertFalse(SharedUtilities.compareReferenceToId("Patient/1234", "Patient/4321"));
  
      assertFalse(SharedUtilities.compareReferenceToId("Patient/1234", "Practitioner/1234"));
      assertFalse(SharedUtilities.compareReferenceToId("Patient/1234", "Practitioner/4321"));
    }
test_case.class_method_signature: SharedUtilitiesTest.testCompareReferenceToId()
test_case.full_signature: @Test public void testCompareReferenceToId()
test_case.identifier: testCompareReferenceToId
test_case.invocations: assertTrue compareReferenceToId assertTrue compareReferenceToId assertTrue compareReferenceToId assertTrue compareReferenceToId assertFalse compareReferenceToId assertFalse compareReferenceToId assertFalse compareReferenceToId assertFalse compareReferenceToId assertFalse compareReferenceToId assertFalse compareReferenceToId
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCompareReferenceToId()
focal_class.file: resources/src/main/java/org/hl7/davinci/SharedUtilities.java
focal_class.identifier: SharedUtilities
focal_class.class_method_signature: SharedUtilities.compareReferenceToId(String reference, String id)
focal_class.full_signature: static boolean compareReferenceToId(String reference, String id)
focal_class.identifier: compareReferenceToId
focal_class.modifiers: static
focal_class.parameters: (String reference, String id)
focal_class.return: boolean
focal_class.signature: boolean compareReferenceToId(String reference, String id)
focal_class.class_method_signature: SharedUtilities.calculateAge(Date birthDate)
focal_class.full_signature: public static int calculateAge(Date birthDate)
focal_class.identifier: calculateAge
focal_class.modifiers: public static
focal_class.parameters: (Date birthDate)
focal_class.return: int
focal_class.signature: int calculateAge(Date birthDate)
focal_method.body: static boolean compareReferenceToId(String reference, String id) {
      String[] refParts = reference.split("/");
      String[] idParts = id.split("/");
      if (refParts.length > idParts.length) {
        return refParts[1].equals(idParts[0]);
      } else if (refParts.length < idParts.length) {
        return refParts[0].equals(idParts[1]);
      } else { // same length
        if (refParts.length == 1) {
          return refParts[0].equals(idParts[0]);
        } else {
          return refParts[0].equals(idParts[0]) && refParts[1].equals(idParts[1]);
        }
      }
    }
focal_method.class_method_signature: SharedUtilities.compareReferenceToId(String reference, String id)
focal_method.full_signature: static boolean compareReferenceToId(String reference, String id)
focal_method.identifier: compareReferenceToId
focal_method.invocations: split split equals equals equals equals equals
focal_method.modifiers: static
focal_method.parameters: (String reference, String id)
focal_method.return: boolean
focal_method.signature: boolean compareReferenceToId(String reference, String id)