Skip to content

Commit

Permalink
Merge pull request #2034 from gabriel090/KHP3-6374
Browse files Browse the repository at this point in the history
In the Cacx register add columns for CCC Number and Nupi number
  • Loading branch information
makombe authored Oct 30, 2024
2 parents 6cc85de + 6196053 commit ff7d65c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,13 @@ protected DataSetDefinition datasetColumns() {
DataConverter nameFormatter = new ObjectFormatter("{familyName}, {givenName} {middleName}");
DataDefinition nameDef = new ConvertedPersonDataDefinition("name", new PreferredNameDataDefinition(), nameFormatter);
PatientIdentifierType nationalId = MetadataUtils.existing(PatientIdentifierType.class, CommonMetadata._PatientIdentifierType.NATIONAL_ID);
PatientIdentifierType nupi = MetadataUtils.existing(PatientIdentifierType.class, CommonMetadata._PatientIdentifierType.NATIONAL_UNIQUE_PATIENT_IDENTIFIER);
DataConverter identifierFormatter = new ObjectFormatter("{identifier}");
DataDefinition identifierDef = new ConvertedPatientDataDefinition("identifier", new PatientIdentifierDataDefinition(nationalId.getName(), nationalId), identifierFormatter);
PatientIdentifierType upn = MetadataUtils.existing(PatientIdentifierType.class, HivMetadata._PatientIdentifierType.UNIQUE_PATIENT_NUMBER);
DataDefinition cccNumberDef = new ConvertedPatientDataDefinition("identifier", new PatientIdentifierDataDefinition(upn.getName(), upn), identifierFormatter);
DataDefinition nupiDef = new ConvertedPatientDataDefinition("identifier", new PatientIdentifierDataDefinition(nupi.getName(), nupi), identifierFormatter);


PersonAttributeType phoneNumber = MetadataUtils.existing(PersonAttributeType.class, CommonMetadata._PersonAttributeType.TELEPHONE_CONTACT);

Expand All @@ -104,6 +109,8 @@ protected DataSetDefinition datasetColumns() {
dsd.addColumn("Visit Type", new CACXVisitTypeDataDefinition(), null);
dsd.addColumn("Name", nameDef, "");
dsd.addColumn("ID Number", identifierDef, "");
dsd.addColumn("CCC No", cccNumberDef, "");
dsd.addColumn("NUPI", nupiDef, "");
dsd.addColumn("Sex", new GenderDataDefinition(), "");
dsd.addColumn("Phone Number", new PersonAttributeDataDefinition(phoneNumber), "");
dsd.addColumn("Age in years", new AgeDataDefinition(), "");
Expand Down
Binary file not shown.

0 comments on commit ff7d65c

Please sign in to comment.