-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sample collection #26
Changes from all commits
73d07f0
d572671
886513a
f44f904
5890ab4
cc8af81
8cdd4f6
f4beda2
f3d90c8
c51569f
d2461d8
a1c235e
8d71d2f
f50eb28
81c0d95
d337cf0
08771e5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
Uuid,Void/Retire,Name,Description,Required,Format,Format description,Validator,Location behavior,Uniqueness behavior | ||
${patientIdentifierType.sesEmrId.uuid},0,SES EMR ID,An ID generated by the SES EMR,0,,,,NOT_USED, | ||
Uuid,Void/Retire,Name,Description,Required,Format,Format description,Validator,Location behavior,Uniqueness behavior | ||
${patientIdentifierType.sesEmrId.uuid},0,SES EMR ID,An ID generated by the SES EMR,0,,,,NOT_USED, | ||
${patientIdentifierType.DNI.uuid},0,DNI,peruvian indentification document,0,,,,NOT_USED,UNIQUE | ||
${patientIdentifierType.Passport.uuid},0,Passport,international identification document,0,,,,NOT_USED,UNIQUE |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<htmlform formUuid="3C953068-B460-4B1A-8889-0AAD43447CD7" formName="Patient Registration Social" formEncounterType="873f968a-73a8-4f9c-ac78-9f4778b751b6" formVersion="1.0"> | ||
|
||
<!-- TODO find a better way to do this rather than copying the entire form: all we are doing here is removing the religion question --> | ||
|
||
<ifMode mode="VIEW" include="false"> | ||
<script type="text/javascript"> | ||
|
||
jq(function() { | ||
|
||
// remove the first title span that is automatically generated by the HFE | ||
if ( jq("#social span.title").length ) { | ||
jq("#social span.title").remove(); | ||
} | ||
|
||
}); | ||
</script> | ||
</ifMode> | ||
|
||
<ifMode mode="VIEW" include="false"> | ||
<h2><uimessage code="zl.registration.patient.social.header"/></h2> | ||
</ifMode> | ||
|
||
<div class="hidden"> | ||
<encounterProviderAndRole default="currentUser" encounterRole="cbfe0b9d-9923-404c-941b-f048adc8cdc0" required="true"/> | ||
<encounterLocation default="SessionAttribute:emrContext.sessionLocationId"/> | ||
</div> | ||
|
||
<input id="displayEncounterDate" value="false" type="hidden" /> | ||
|
||
<section id="social" sectionTag="section" headerStyle="title" headerCode=""> | ||
|
||
<fieldset> | ||
|
||
<div> | ||
<h3><uimessage code="zl.registration.patient.birthplace.label"/></h3> | ||
<p class="left"> | ||
<obs conceptId="PIH:PLACE OF BIRTH" id="placeOfBirth" showUnits="false" unitsCssClass="append-to-value" /> | ||
</p> | ||
</div> | ||
|
||
<div> | ||
<h3><uimessage code="zl.registration.patient.civilStatus.label"/></h3> | ||
<p class="left"> | ||
<obs conceptId="PIH:CIVIL STATUS" id="civilStatus" | ||
answerConceptIds="PIH:SINGLE OR A CHILD,PIH:MARRIED,PIH:LIVING WITH PARTNER,PIH:SEPARATED,PIH:DIVORCED,PIH:WIDOWED" | ||
answerCodes="zl.registration.patient.civilStatus.single.label,zl.registration.patient.civilStatus.married.label,zl.registration.patient.civilStatus.livingWithPartner.label,zl.registration.patient.civilStatus.separated.label,zl.registration.patient.civilStatus.divorced.label,zl.registration.patient.civilStatus.widowed.label" | ||
showUnits="false" unitsCssClass="append-to-value" style="dropdown"/> | ||
</p> | ||
</div> | ||
|
||
<div> | ||
<h3><uimessage code="zl.registration.patient.occupation.label"/></h3> | ||
<p class="left"> | ||
<obs conceptId="PIH:Occupation" id="occupation" | ||
answerConceptIds="PIH:BREWER,CIEL:162944,PIH:COMMERCE,PIH:DRIVER,PIH:FACTORY WORKER,PIH:FARMER,CIEL:159674,PIH:FRUIT OR VEGETABLE SELLER,PIH:HEALTH CARE WORKER,PIH:1404,PIH:HOUSEWORK/FIELDWORK,PIH:MANUAL LABORER,CIEL:162945,PIH:MINER,PIH:PROFESSIONAL,PIH:RETIRED,PIH:SHEPHERD,PIH:SHOP OWNER,PIH:STUDENT,PIH:Teacher,PIH:UNEMPLOYED,PIH:OTHER NON-CODED" | ||
answerCodes="zl.registration.patient.occupation.brewer.label,zl.registration.patient.occupation.civilServant.label,zl.registration.patient.occupation.commerce.label,zl.registration.patient.occupation.driver.label,zl.registration.patient.occupation.factoryWorker.label,zl.registration.patient.occupation.farmer.label,zl.registration.patient.occupation.fisherman.label,zl.registration.patient.occupation.fruitOrVegetableVendor.label,zl.registration.patient.occupation.healthCareWorker.label,zl.registration.patient.occupation.housework.label,zl.registration.patient.occupation.houseworkFieldwork.label,zl.registration.patient.occupation.manualLaborer.label,zl.registration.patient.occupation.marketVendor.label,zl.registration.patient.occupation.miner.label,zl.registration.patient.occupation.professional.label,zl.registration.patient.occupation.retired.label,zl.registration.patient.occupation.shepherd.label,zl.registration.patient.occupation.shopOwner.label,zl.registration.patient.occupation.student.label,zl.registration.patient.occupation.teacher.label,zl.registration.patient.occupation.unemployed.label,zl.registration.patient.occupation.other.label" | ||
showUnits="false" unitsCssClass="append-to-value" size="dropdown" /> | ||
</p> | ||
</div> | ||
</fieldset> | ||
</section> | ||
|
||
<ifMode mode="VIEW" include="false"> | ||
<div id="buttons"> | ||
<button class="submitButton confirm right" onclick="submitHtmlForm()"><uimessage code="mirebalais.save"/><i class="icon-spinner icon-spin icon-2x" style="display: none; margin-left: 10px;"></i></button> | ||
<button type="button" class="cancel"><uimessage code="emr.cancel"/></button> | ||
</div> | ||
</ifMode> | ||
|
||
</htmlform> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,5 +50,43 @@ | |
} | ||
} | ||
}, | ||
"dispositionConfig": "file:configuration/pih/pih-dispositions-default.json" | ||
"extraIdentifierTypes": [ | ||
"${patientIdentifierType.DNI.uuid}", | ||
"${patientIdentifierType.Passport.uuid}" | ||
], | ||
"dispositionConfig": "file:configuration/pih/pih-dispositions-default.json", | ||
"findPatientColumnConfig": [ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I made a couple changes here, see below... instead of a "type of identifier" column and a "identifier" column, this renders a separate column for DNI and Passport (feel free to adjust the labels as you see fit). I believe this isn't exactly what you wanted, but it seemed good to do this as a start as we work through potential changes to the Core Apps module. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This could be a nice workaround. But i think in the future we might add more document types, therefore having more columns. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cool, yeah, makes sense @MiguelAHPpih see my updated comments on the coreapps pull request about moving forward with supporting multiple identifiers per column: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm ok with this, until we get the coreapps function. Mergin it! |
||
{ | ||
"type": "identifier", | ||
"label": "DNI", | ||
"value": "${patientIdentifierType.DNI.uuid}", | ||
"width": "80px" | ||
}, | ||
{ | ||
"type": "identifier", | ||
"label": "Passport", | ||
"value": "${patientIdentifierType.Passport.uuid}", | ||
"width": "80px" | ||
}, | ||
{ | ||
"type": "name", | ||
"label": "coreapps.search.name", | ||
"width": "200px" | ||
}, | ||
{ | ||
"type": "gender", | ||
"label": "coreapps.gender", | ||
"width": "65px" | ||
}, | ||
{ | ||
"type": "age", | ||
"label": "coreapps.age", | ||
"width": "50px" | ||
}, | ||
{ | ||
"type": "birthdate", | ||
"label": "coreapps.birthdate", | ||
"width": "100px" | ||
} | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
$(() => { | ||
(async () => { | ||
// Sección: Arreglo de UI | ||
document.querySelector("#iframe > legend").innerText = "Solicitud de Análisis"; | ||
|
||
// Sección: Llamadas a API - EMR | ||
const urlParams = new URLSearchParams(window.location.search); | ||
const encounterId = urlParams.get("encounterId"); | ||
const patientId = urlParams.get("patientId"); | ||
// Subsección: Encounter - Orders | ||
const encounter = await $.get(`/openmrs/ws/rest/v1/encounter/${encounterId}`); | ||
//examenes=orders.display; | ||
const fechaVisitaValue = new Date(Date.parse(encounter.encounterDatetime)).toLocaleString(); | ||
const examenes = []; | ||
//console.log(encounter); | ||
$("#fecha").text(new Date(Date.parse(encounter.encounterDatetime)).toLocaleString()); | ||
$("#local").text(encounter.location.display); | ||
$("#proyecto").text(encounter.location.display); | ||
encounter.orders.forEach((orders) => { | ||
//console.log(orders); | ||
examenes.push(orders.display); | ||
$("#examenes").append($(`<td>${orders.display}</td>`)); | ||
}); | ||
const paciente = await $.get(`/openmrs/ws/rest/v1/patient/${patientId}`); | ||
let nombresValue=paciente.person.display.split(" ")[2]; | ||
let apePaternoValue=paciente.person.display.split(" ")[1].slice(0,-1); | ||
let apeMaternoValue=paciente.person.display.split(" ")[0]; | ||
mhuamani98 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
let fecnac=new Date(Date.parse(paciente.person.birthdate)).toLocaleDateString(); | ||
let fechaNacimientoValue=fecnac.substring(0,10); | ||
mhuamani98 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
let sexoValue=paciente.person.gender; | ||
paciente.identifiers.forEach(data => { | ||
console.log(data); | ||
tipoDocumentoValue = data.display.split('= ')[0]; | ||
$("#documento").text(tipoDocumentoValue); | ||
numeroDocumentoValue = data.display.split('= ')[1]; | ||
$("#numerodocumento").text(numeroDocumentoValue); | ||
}); | ||
// Sección: Llamadas a API - SEIS | ||
const request = { | ||
Paciente: { | ||
TipoDocumento: tipoDocumentoValue, | ||
NumeroDocumento: numeroDocumentoValue, | ||
Nombres: nombresValue, | ||
ApellidoPaterno: apePaternoValue, | ||
ApellidoMaterno: apeMaternoValue, | ||
FechaNacimiento: fechaNacimientoValue, | ||
Sexo: sexoValue | ||
}, | ||
Visita: { | ||
FechaVisita: fechaVisitaValue | ||
}, | ||
SolicitudAnalisis: { | ||
Examenes: examenes | ||
} | ||
}; | ||
console.log("Objeto de solicitud a API SEIS"); | ||
console.log(request); | ||
})(); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two lines add the DNI and Passport to the patient header (and make them editable via the header). Not sure if that's what you want, but I wanted to add it in as a example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.