PatientWrapper extends AbstractPatientWrapper { public String getMedicalRecordNumber() { return getAsIdentifier(CommonMetadata._PatientIdentifierType.OPENMRS_ID); } PatientWrapper(Patient target); PersonWrapper getPerson(); String getMedicalRecordNumber(); String getPatientClinicNumber(); void setPatientClinicNumber(String value, Location location); String getUniquePatientNumber(); void setUniquePatientNumber(String value, Location location); String getNationalIdNumber(); void setNationalIdNumber(String value, Location location); String getNextOfKinAddress(); void setNextOfKinAddress(String value); String getNextOfKinContact(); void setNextOfKinContact(String value); String getNextOfKinName(); void setNextOfKinName(String value); String getNextOfKinRelationship(); void setNextOfKinRelationship(String value); String getSubChiefName(); void setSubChiefName(String value);  }
@Test public void getMedicalRecordNumber_shouldReturnIdentifierOrNull() { Assert.assertThat(wrapper.getMedicalRecordNumber(), nullValue()); PatientIdentifierType openmrsID = MetadataUtils.existing(PatientIdentifierType.class, CommonMetadata._PatientIdentifierType.OPENMRS_ID); TestUtils.savePatientIdentifier(patient, openmrsID, "M3G"); Assert.assertThat(wrapper.getMedicalRecordNumber(), is("M3G")); }