Skip to content
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

Revert 257 mpoc 478 #265

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
2 changes: 1 addition & 1 deletion ui/app/clinical/common/views/visitPagination.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<span class="visit-date">
<span>{{::visitHistoryEntry.startDatetime | bahmniDate}}</span>
<span ng-show="::visitHistoryEntry.stopDatetime"> - {{::visitHistoryEntry.stopDatetime | bahmniDate}}</span>
<span ng-if="::visitSummary.visitType">({{::visitSummary.visitType.display || visitSummary.visitType}})</span>
<span ng-if="::visitSummary.visitType">({{::visitSummary.visitType.display || visitSummary.visitType | translate}})</span>
<span ng-show="::visitHistoryEntry.isActive()" title="Current Visit"><i class="fa fa-star current-visit-icon"></i></span>
</span>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ <h2 class="section-title has-toggle" toggle="addTreatment">
<select ng-if="!treatmentConfig.isHiddenField('durationUnits')" id="duration-unit"
class=" duration-unit" ng-model="treatment.durationUnit"
ng-options="item.name as item.name for item in treatmentConfig.getDurationUnits()"
ng-disabled="treatmentConfig.getDurationUnits().length == 1"
required></select>
</div>
</article>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
ng-keyup="suggest(targetModel[attribute.name])"
ng-blur="validateField(false)"
ng-mouseleave="validateField(true)"
title="{{::'REGISTRATION_OCCUPATION_CHOICE' | translate}}"
ng-required="{{::attribute.required}}" ng-style="{'border': borderColor, 'background': backgroundColor}">
<ul class="ui-front ui-autocomplete ui-menu ui-widget ui-widget-content ui-corner-all" ng-if="showTag && filterOcuppation.length > 0" ng-hide="hideList"
style="position:absolute; top:31px; width:192px">
Expand Down
2 changes: 1 addition & 1 deletion ui/app/i18n/clinical/locale_en.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
"MEDICATION_ADD_DRUG_FORM_TITLE": "Order Drug",
"MEDICATION_ADD_ORDERSET_FORM_TITLE": "Order an Order Set",
"MEDICATION_LABEL_DOSE" :"Dose",
"MEDICATION_LABEL_UNITS" :"Units",
"MEDICATION_LABEL_UNITS" :"Units/Pharmaceutical Form",
"MEDICATION_LABEL_FREQUENCY" :"Frequency",
"MEDICATION_LABEL_ROUTE" :"Route",
"MEDICATION_LABEL_DURATION" :"Duration",
Expand Down
4 changes: 2 additions & 2 deletions ui/app/i18n/clinical/locale_pt_BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@
"MEDICATION_LABEL_ROUTE": "Via",
"MEDICATION_LABEL_START_DATE": "Data início da medicação",
"MEDICATION_LABEL_TOTAL_QUANTITY": "Quantidade total",
"MEDICATION_LABEL_UNITS": "Unidades",
"MEDICATION_LABEL_UNITS": "Unidades/Forma Farmacêutica",
"MEDICATION_NEW_PRESCRIPTION": "Nova prescrição",
"MEDICATION_NEW_TREATMENTS": "Novo tratamento",
"MEDICATION_NO_PRESCRIPTION_SAVED_PLACEHOLDER": "A prescrição ainda não foi gravada",
Expand Down Expand Up @@ -362,7 +362,7 @@
"FIRST_APSS_CONSULTATION_A": "APSS - Primeira Consulta",
"FIRST_CLINICAL_CONSULTATION": "Consulta Clínica",
"FIRST_CLINICAL_CONSULTATION_A": "Primeira Consulta Clínica",
"FOLLOWUP_CLINICAL_CONSULTATION": "Consulta Clinica",
"FOLLOWUP_CLINICAL_CONSULTATION": "Consulta Clínica",
"FOLLOWUP_CLINICAL_CONSULTATION_A": " Clínica - Consulta de Seguimento",
"ORDER_TYPE": "Exames",
"BIRTHDATE_ESTIMATED": "Estimado",
Expand Down
4 changes: 2 additions & 2 deletions ui/app/i18n/registration/locale_pt_BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
"REGISTRATION_NUMBERS_OLY": "Introduza números positivos apenas",
"REGISTRATION_CHARACTER_OLY": "Introduza caracteres apenas",
"REGISTRATION_CHARACTER_AND_NUMBERS_OLY": "Introduza números e/ou caracteres apenas",
"REGISTRATION_OCCUPATION_CHOICE": "Começa a digitar uma ocupação/profissão",
"REGISTRATION_OCCUPATION_CHOICE": "Introduza uma ocupação/profissão",
"REGISTRATION_CHOOSE_AN_OPTION": "Selecione uma opção",
"PATTERN_REGISTRATION_NUMBERS_ONLY": "Números positivos apenas",
"PATTERN_REGISTRATION_CHARACTERS_ONLY": "Introduza caracteres apenas",
Expand All @@ -176,7 +176,7 @@
"Observations":"Observações",
"REGISTRATION_REQUIRED_INVALID_FIELD": "Preencha os campos correctamente.",
"REGISTRATION_PLACEHOLDER_FOR_NID_SEQUENCIAL_CODE" : "Ex: 12345",
"REGISTRATION_PLACEHOLDER_FOR_NID_YEAR" : "YYYY",
"REGISTRATION_PLACEHOLDER_FOR_NID_YEAR" : "AAAA",
"REGISTRATION_PLACEHOLDER_FOR_NID_HEALTHFACILITY_CODE" : "Ex: 12345678",
"US_REG_DATE_MESSAGE" : "Digite uma data válida."
}
4 changes: 1 addition & 3 deletions ui/app/registration/views/age.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,21 @@
<div class="input-prepend">
<span class="add-on">{{ ::'REGISTRATION_LABEL_YEARS' | translate}}</span>
<input type="number" id="ageYears" name="ageYear" max="120" ng-model="patient.age.years" min="0"
ng-required="::!dobMandatory" title="{{ ::'REGISTRATION_LABEL_NUMERIC_YEARS' | translate}}"
ng-required="::!dobMandatory"
ng-change="patient.calculateBirthDate();checkDuplicatePatients();checkValidationForm()" ng-blur="handleUpdate('age')"
ng-disabled="isAgeDisabled" ng-class="{ 'illegalValue': submitted && this.myForms.myForm.ageYear.$invalid || this.myForms.myForm.ageYear.$invalid && !this.myForms.myForm.ageYear.$pristine}"
>
</div>
<div class="input-prepend">
<span class="add-on">{{ ::'REGISTRATION_LABEL_MONTHS' | translate}}</span>
<input type="number" id="ageMonths" name="ageMonths" max="12" ng-model="patient.age.months" min="0"
title="{{ ::'REGISTRATION_LABEL_NUMERIC_MONTHS' | translate}}"
ng-change="patient.calculateBirthDate();checkDuplicatePatients();checkValidationForm()"
ng-disabled="isAgeDisabled" required
>
</div>
<div class="input-prepend">
<span class="add-on">{{ ::'REGISTRATION_LABEL_DAYS' | translate}}</span>
<input type="number" id="ageDays" name="ageDays" max="31" ng-model="patient.age.days" min="0"
title="{{ ::'REGISTRATION_LABEL_NUMERIC_DAYS' | translate}}"
ng-change="patient.calculateBirthDate();checkDuplicatePatients();checkValidationForm()"
ng-disabled="isAgeDisabled" required
>
Expand Down
8 changes: 4 additions & 4 deletions ui/app/registration/views/newpatient.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<span class="add-on">{{ ::'REGISTRATION_HEALTH_FACILITY_CODE' | translate}}</span>
<input type="text" name="healthFacilityCode" id="healthFacilityCode" ng-model="NID.healthFacilityCode"
pattern-validate onfocus="this.value=''" focus-me="true" placeholder="{{::'REGISTRATION_PLACEHOLDER_FOR_NID_HEALTHFACILITY_CODE' | translate}}"
focus-on="patient.primaryIdentifier.hasOldIdentifier" title="{{ ::'REGISTRATION_NUMBERS_OLY' | translate}}"
focus-on="patient.primaryIdentifier.hasOldIdentifier"
ng-blur="buildFinalNID()" minlength="8" ng-pattern="regexDigits" maxlength="8" size=8 required
ng-class="{'illegalValue' : submitted && this.myForms.myForm.healthFacilityCode.$invalid || this.myForms.myForm.healthFacilityCode.$invalid && !this.myForms.myForm.healthFacilityCode.$pristine || this.myForms.myForm.healthFacilityCode.$error.pattern}" >
<p class="help-block" ng-show="this.myForms.myForm.healthFacilityCode.$error.minlength && !this.myForms.myForm.healthFacilityCode.$error.pattern">{{::'MINLENGTH_HEALTH_FACILITY_CODE' | translate}}</p>
Expand All @@ -83,13 +83,13 @@
<div class="input-prepend">
<span class="add-on">{{ ::'REGISTRATION_SERVICE_CODE' | translate}}</span>
<input type="text" name="serviceCode" id="serviceCode" ng-model="NID.serviceCode" pattern-validate
focus-on="patient.primaryIdentifier.hasOldIdentifier" disabled size="2" title="{{ ::'REGISTRATION_NUMBERS_OLY' | translate}}"
focus-on="patient.primaryIdentifier.hasOldIdentifier" disabled size="2"
ng-init="NID.serviceCode='01'">
</div>

<div class="input-prepend">
<span class="add-on">{{ ::'REGISTRATION_NID_YEAR' | translate}}</span>
<input type="number" id="nidYear" name="nidYear" ng-model="NID.year" pattern-validate title="{{::'REGISTRATION_NUMBERS_OLY' | translate}}"
<input type="number" id="nidYear" name="nidYear" ng-model="NID.year" pattern-validate
focus-on="patient.primaryIdentifier.hasOldIdentifier" ng-blur="buildFinalNID()" min="1900" size="4"
max="{{currentYear}}" minlength="1" maxlength="4" required placeholder="{{::'REGISTRATION_PLACEHOLDER_FOR_NID_YEAR' | translate}}"
ng-class="{'illegalValue' : submitted && this.myForms.myForm.nidYear.$invalid || this.myForms.myForm.nidYear.$invalid && !this.myForms.myForm.nidYear.$pristine}">
Expand All @@ -98,7 +98,7 @@
<div class="input-prepend">
<span class="add-on">{{ ::'REGISTRATION_SEQUENTIAL_CODE' | translate}}</span>
<input type="text" name="sequentialCode" id="sequentialCode" ng-model="NID.sequentialCode" pattern-validate
focus-on="patient.primaryIdentifier.hasOldIdentifier" ng-blur="buildFinalNID()" title="{{ ::'REGISTRATION_NUMBERS_OLY' | translate}}"
focus-on="patient.primaryIdentifier.hasOldIdentifier" ng-blur="buildFinalNID()"
minlength="5" ng-pattern="regexDigits" maxlength="5" size="8" required placeholder="{{::'REGISTRATION_PLACEHOLDER_FOR_NID_SEQUENCIAL_CODE' | translate}}"
ng-class="{'illegalValue' : submitted && this.myForms.myForm.sequentialCode.$invalid || !this.myForms.myForm.sequentialCode.$pristine && this.myForms.myForm.sequentialCode.$invalid || this.myForms.myForm.sequentialCode.$error.pattern || this.myForms.myForm.sequentialCode.$error.minlength}">
<p class="help-block" ng-show="this.myForms.myForm.sequentialCode.$error.minlength && !this.myForms.myForm.sequentialCode.$error.pattern">{{::'MINLENGTH_REGISTRATION_SEQUENTIAL_CODE' | translate}}</p>
Expand Down
24 changes: 11 additions & 13 deletions ui/app/registration/views/patientcommon.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,10 @@
<input data-ng-switch-when="true" type="text" name="givenName" id="givenName" field-validation="::fieldValidation"
ng-model="$parent.patient.givenName" non-blank pattern-validate my-autocomplete
source="getAutoCompleteList" response-map="getDataResults" data-item-type="personName"
placeholder="{{ ::'REGISTRATION_LABEL_PATIENT_FIRSTNAME' | translate}}"
title="{{::'REGISTRATION_CHARACTER_OLY' | translate}}">
placeholder="{{ ::'REGISTRATION_LABEL_PATIENT_FIRSTNAME' | translate}}">

<input data-ng-switch-default type="text" name="givenName" field-validation="::fieldValidation" id="givenName" ng-model="patient.givenName" non-blank
pattern-validate placeholder="{{ ::'REGISTRATION_LABEL_PATIENT_FIRSTNAME' | translate}}"
title="{{::'REGISTRATION_CHARACTER_OLY' | translate}}">
pattern-validate placeholder="{{ ::'REGISTRATION_LABEL_PATIENT_FIRSTNAME' | translate}}">
</span>

<span data-ng-switch="::isAutoComplete('givenName')"
Expand All @@ -43,11 +41,11 @@
ng-model="$parent.patient.givenName" non-blank pattern-validate my-autocomplete
source="getAutoCompleteList" response-map="getDataResults" data-item-type="personName"
placeholder="{{ ::'REGISTRATION_LABEL_PATIENT_FIRSTNAME' | translate}}" field-validation="::fieldValidation"
title="{{::'REGISTRATION_CHARACTER_OLY' | translate}}" focus-me="true" ng-pattern="regexCharacters">
focus-me="true" ng-pattern="regexCharacters">

<input data-ng-switch-default type="text" name="givenName" id="givenName" ng-model="patient.givenName" non-blank
pattern-validate placeholder="{{ ::'REGISTRATION_LABEL_PATIENT_FIRSTNAME' | translate}}"
title="{{::'REGISTRATION_CHARACTER_OLY' | translate}}" focus-me="true" ng-pattern="regexCharacters"
focus-me="true" ng-pattern="regexCharacters"
ng-change="checkDuplicatePatients()" required field-validation="::fieldValidation"
ng-class="{'illegalValue' : submitted && this.myForms.myForm.givenName.$invalid || this.myForms.myForm.givenName.$error.pattern || (this.myForms.myForm.givenName.$error.required && !this.myForms.myForm.givenName.$pristine)}">
<p class="help-block" ng-show="this.myForms.myForm.givenName.$error.pattern">{{::'PATTERN_REGISTRATION_CHARACTERS_ONLY' | translate}}</p>
Expand All @@ -58,11 +56,11 @@
ng-model="$parent.patient.middleName" pattern-validate my-autocomplete
source="getAutoCompleteList" response-map="getDataResults" data-item-type="personName"
placeholder="{{ ::'REGISTRATION_LABEL_PATIENT_MIDDLE_NAME' | translate}}" field-validation="::fieldValidation"
title="{{::'REGISTRATION_CHARACTER_OLY' | translate}}" ng-pattern="regexCharacters">
ng-pattern="regexCharacters">

<input data-ng-switch-default type="text" name="middleName" id="middleName" ng-model="patient.middleName"
pattern-validate placeholder="{{ ::'REGISTRATION_LABEL_PATIENT_MIDDLE_NAME' | translate}}" field-validation="::fieldValidation"
title="{{::'REGISTRATION_CHARACTER_OLY' | translate}}" ng-pattern="regexCharacters">
ng-pattern="regexCharacters">
<p class="help-block" ng-show="this.myForms.myForm.middleName.$error.pattern">{{::'PATTERN_REGISTRATION_CHARACTERS_ONLY' | translate}}</p>
</span>

Expand All @@ -71,13 +69,13 @@
ng-model="$parent.patient.familyName" pattern-validate my-autocomplete
source="getAutoCompleteList" response-map="getDataResults" data-item-type="personName"
placeholder="{{ ::'REGISTRATION_LABEL_PATIENT_LAST_NAME' | translate}}"
title="{{::'REGISTRATION_CHARACTER_OLY' | translate}}" field-validation="::fieldValidation"
field-validation="::fieldValidation"
ng-required="::isLastNameMandatory" ng-change="checkDuplicatePatients()" ng-pattern="regexCharacters"
ng-class="{'illegalValue' : submitted && this.myForms.myForm.familyName.$invalid || this.myForms.myForm.familyName.$error.pattern || (this.myForm.familyName.$error.required && !this.myForm.familyName.$pristine)}">

<input data-ng-switch-default type="text" name="familyName" id="familyName" ng-model="patient.familyName"
pattern-validate placeholder="{{ ::'REGISTRATION_LABEL_PATIENT_LAST_NAME' | translate}}"
title="{{::'REGISTRATION_CHARACTER_OLY' | translate}}" field-validation="::fieldValidation"
field-validation="::fieldValidation"
ng-required="::isLastNameMandatory" ng-pattern="regexCharacters"
ng-class="{'illegalValue' : submitted && this.myForms.myForm.familyName.$invalid || this.myForms.myForm.familyName.$error.pattern || (this.myForm.familyName.$error.required && !this.myForm.familyName.$pristine)}">
<p class="help-block" ng-show="this.myForms.myForm.familyName.$error.pattern">{{::'PATTERN_REGISTRATION_CHARACTERS_ONLY' | translate}}</p>
Expand All @@ -89,7 +87,7 @@
<article class="form-field" ng-repeat="attribute in ::attributeRow"
ng-if="attribute.name == 'NICK_NAME'" ng-class="::{'right-form-field' : $index%2 != 0}">
<attribute-types target-model="patient" attribute="::attribute"
field-validation="::fieldValidation" is-auto-complete="isAutoComplete" title="{{::'REGISTRATION_CHARACTER_OLY' | translate}}"
field-validation="::fieldValidation" is-auto-complete="isAutoComplete"
get-auto-complete-list="getAutoCompleteList" get-data-results="getDataResults"
is-read-only="isReadOnly" handle-update="handleUpdate"></attribute-types>
</article>
Expand Down Expand Up @@ -167,14 +165,14 @@
<article class="form-field" ng-repeat="attribute in ::attributeRow" ng-if="attribute.name == 'MOTHER_NAME'"
ng-class="::{'right-form-field' : $index%2 != 0}">
<attribute-types target-model="patient" attribute="::attribute" field-validation="::fieldValidation"
is-auto-complete="isAutoComplete" get-auto-complete-list="getAutoCompleteList" title="{{::'REGISTRATION_CHARACTER_OLY' | translate}}"
is-auto-complete="isAutoComplete" get-auto-complete-list="getAutoCompleteList"
ng-pattern="regexCharacters" get-data-results="getDataResults" is-read-only="isReadOnly" handle-update="handleUpdate"></attribute-types>
</article>

<article class="form-field" ng-repeat="attribute in ::attributeRow" ng-if="attribute.name == 'FATHER_NAME'"
ng-class="::{'right-form-field' : $index%2 != 0}">
<attribute-types target-model="patient" attribute="::attribute" field-validation="::fieldValidation"
is-auto-complete="isAutoComplete" get-auto-complete-list="getAutoCompleteList" title="{{::'REGISTRATION_CHARACTER_OLY' | translate}}"
is-auto-complete="isAutoComplete" get-auto-complete-list="getAutoCompleteList"
get-data-results="getDataResults" is-read-only="isReadOnly" handle-update="handleUpdate"></attribute-types>
</article>

Expand Down