Skip to content

Commit

Permalink
Merge pull request #161 from ssmusoke/master
Browse files Browse the repository at this point in the history
Adding an identifier for SMC cards, the serial ID on the SMC form and correcting the spelling of the PNC encounter type
  • Loading branch information
slubwama authored Nov 1, 2016
2 parents 27afdd9 + 123f48f commit 93295d3
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public void install() throws Exception {
install(PatientIdentifierTypes.NATIONAL_ID);
install(PatientIdentifierTypes.ART_PATIENT_NUMBER);
install(PatientIdentifierTypes.RESEARCH_PATIENT_ID);
install(PatientIdentifierTypes.SMC_CLIENT_NUMBER);
log.info("Patient IdentifierTypes installed");

// install person attribute types
Expand All @@ -52,6 +53,6 @@ public void install() throws Exception {

//Install Encounter Type
log.info("Installing EncounterTypes");
install(EncounterTypes.PCN_ENCOUNTER_TYPE);
install(EncounterTypes.PNC_ENCOUNTER_TYPE);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Created by lubwamasamuel on 18/10/16.
*/
public class EncounterTypes {
public static EncounterTypeDescriptor PCN_ENCOUNTER_TYPE = new EncounterTypeDescriptor() {
public static EncounterTypeDescriptor PNC_ENCOUNTER_TYPE = new EncounterTypeDescriptor() {
@Override
public String name() {
return "PNC - Encounter";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,6 @@ public String formatDescription() {
+ "the Birth "
+ "Cohort number";
}

/*public Class<? extends IdentifierValidator> validator() {
return EIDIdentifierValidator.class;
}*/
};


Expand Down Expand Up @@ -160,10 +156,6 @@ public String uuid() {
return "a6217c17-5012-4514-b9f2-5d02d3d04c44";
}

/*public String format() {
return "^\\d+$";
}*/

public String formatDescription() {
return "Begins with 1 at the beginning of the financial year (July)";
}
Expand Down Expand Up @@ -209,9 +201,6 @@ public String formatDescription() {
}
};




public static PatientIdentifierTypeDescriptor HCT_NUMBER = new PatientIdentifierTypeDescriptor() {
@Override
public String name() {
Expand All @@ -224,11 +213,7 @@ public String description() {
}

public String uuid() { return "c9e42035-7112-45b3-bfcf-4b37e1091dd4"; }

/*public String format() {
return "[0-9]{4}[\\/][1][4-9]";
}*/


public String formatDescription() {
return "Begins with 1 at the beginning of the financial year (July), has 4 "
+ "digits followed by a / then 2 digits for the year";
Expand All @@ -251,13 +236,6 @@ public String uuid() {
return "8110f2d2-1f98-4c38-aef3-11b19bb0a589";
}

// TODO: The current format of the district TB number has been limited to cases from 2010 to 2019, but this can be
// rectified
// later
/*public String format() {
return "[X][X][X][\\/][0-9][0-9][0-9][\\/][1][0-9]";
}*/

public String formatDescription() {
return " The first three letters of the district, followed by / then 3 digits of the case number then / then "
+ "two digits for the year";
Expand All @@ -279,14 +257,7 @@ public String description() {
public String uuid() {
return "f0c16a6d-dc5f-4118-a803-616d0075d282";
}

/*public String format() {
return "[C][M][0-9a-zA-Z]{12}";
}
public String formatDescription() {
return "No spaces mix of numbers and letters";
}*/

};

public static PatientIdentifierTypeDescriptor RESEARCH_PATIENT_ID = new PatientIdentifierTypeDescriptor() {
Expand All @@ -305,5 +276,22 @@ public String uuid() {
return "20653abb-689c-4975-bbfa-00de7b507a95";
}
};

public static PatientIdentifierTypeDescriptor SMC_CLIENT_NUMBER = new PatientIdentifierTypeDescriptor() {

@Override
public String name() {
return "Safe Male Circumcision Client Number";
}

@Override
public String description() {
return "An identifier used for patients who undergo safe male circumcision";
}

public String uuid() {
return "37601abe-2ee0-4493-8ac7-22b4972190cf";
}
};

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<htmlform formName="HMIS 035a Safe Male Circumcision Client Card"
formDescription="Card for Capturing Patients undergoing circumcision"
formDescription="Captures clients undergoing safe male circumcision"
formEncounterType="244da86d-f80e-48fe-aba9-067f241905ee"
formUuid="9d9193e7-b038-4c44-a7a3-830baa288565"
formVersion="1.2"
Expand All @@ -12,7 +12,6 @@
formLabel="SMC Client Card">
<redirectOnSave
url="/coreapps/patientdashboard/patientDashboard.page?patientId={{patient.id}}&amp;encounterId={{encounter.id}}#visits"/>

<style>

form label, .form label {
Expand Down Expand Up @@ -339,6 +338,10 @@
<patient field="identifier" identifierTypeId="f0c16a6d-dc5f-4118-a803-616d0075d282"
required="false"/>
</td>
<td>
<label>Serial ID:</label>
<patient field="identifier" identifierTypeId="37601abe-2ee0-4493-8ac7-22b4972190cf"/>
</td>
</tr>
</tbody>
</table>
Expand Down Expand Up @@ -999,4 +1002,18 @@
<submit/>
</section>
</div>
<!-- End of HTML Form -->
<ifMode mode="EDIT" include="false">
<lookup complexExpression="
#set( $encounter = 0 )
#set( $encounter = $fn.latestEncounter('244da86d-f80e-48fe-aba9-067f241905ee'))
#if( $encounter != 0 )
&lt;script type=&quot;text/javascript&quot;>
if (window.location.href.indexOf('/module/htmlformentry/htmlForm.form') == -1) {
window.location.href = window.location.protocol + &quot;//&quot; + window.location.host + &quot;/&quot;+ OPENMRS_CONTEXT_PATH + &quot;/htmlformentryui/htmlform/editHtmlFormWithStandardUi.page?patientId=$encounter.patientId&amp;visitId=$encounter.visit.visitId&amp;formUuid=9d9193e7-b038-4c44-a7a3-830baa288565&amp;encounterId=$encounter.encounterId&amp;returnUrl=%2F&quot; + OPENMRS_CONTEXT_PATH + &quot;%2Fcoreapps%2Fclinicianfacing%2Fpatient.page%3FpatientId%3D$encounter.patientId&quot;;
}
&lt;/script>
#end"/>
</ifMode>
</htmlform>

0 comments on commit 93295d3

Please sign in to comment.