Skip to content

Commit

Permalink
Merge pull request #1879 from gabriel090/KHP3-5495
Browse files Browse the repository at this point in the history
Add a column on NUPI number on the ANC register enchancements
  • Loading branch information
patryllus authored May 6, 2024
2 parents 42732d2 + 835fdea commit 5568123
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,10 @@ protected DataSetDefinition datasetColumns() {
DataConverter nameFormatter = new ObjectFormatter("{familyName}, {givenName} {middleName}");
DataDefinition nameDef = new ConvertedPersonDataDefinition("name", new PreferredNameDataDefinition(), nameFormatter);
PatientIdentifierType upn = MetadataUtils.existing(PatientIdentifierType.class, HivMetadata._PatientIdentifierType.UNIQUE_PATIENT_NUMBER);
PatientIdentifierType nupi = MetadataUtils.existing(PatientIdentifierType.class, CommonMetadata._PatientIdentifierType.NATIONAL_UNIQUE_PATIENT_IDENTIFIER);
DataConverter identifierFormatter = new ObjectFormatter("{identifier}");
DataDefinition identifierDef = new ConvertedPatientDataDefinition("identifier", new PatientIdentifierDataDefinition(upn.getName(), upn), identifierFormatter);
DataDefinition nupiDef = new ConvertedPatientDataDefinition("identifier", new PatientIdentifierDataDefinition(nupi.getName(), nupi), identifierFormatter);

ANCVisitNumberDataDefinition ancVisitNumberDataDefinition = new ANCVisitNumberDataDefinition();
ancVisitNumberDataDefinition.addParameter(new Parameter("endDate", "End Date", Date.class));
Expand Down Expand Up @@ -232,6 +234,7 @@ protected DataSetDefinition datasetColumns() {
dsd.addColumn("Sex", new GenderDataDefinition(), "");

dsd.addColumn("Unique Patient Number", identifierDef, null);
dsd.addColumn("National Unique Patient Identifier", nupiDef, null);
dsd.addColumn("Visit Date", new EncounterDatetimeDataDefinition(),"", new DateConverter(ENC_DATE_FORMAT));
// new columns
dsd.addColumn("ANC Number", new ANCNumberDataDefinition(),"");
Expand Down
Binary file not shown.

0 comments on commit 5568123

Please sign in to comment.