From 19577be27bfa9eda8058b0d52d46472c08821f1c Mon Sep 17 00:00:00 2001 From: madanpiyush Date: Fri, 9 Nov 2012 21:12:25 +0530 Subject: [PATCH 1/2] RAXAJSS-613 Religion fields/code uncommented --- src/registrationextjs4/app/controller/Main.js | 11 ++- .../app/view/RegistrationConfirm.js | 35 +++++----- .../app/view/RegistrationPart1.js | 68 +++++++++---------- .../app/view/SearchConfirm.js | 43 ++++++------ .../app/view/SearchPart2.js | 13 ++-- 5 files changed, 80 insertions(+), 90 deletions(-) diff --git a/src/registrationextjs4/app/controller/Main.js b/src/registrationextjs4/app/controller/Main.js index 9357abe6..e0645fea 100644 --- a/src/registrationextjs4/app/controller/Main.js +++ b/src/registrationextjs4/app/controller/Main.js @@ -90,8 +90,7 @@ Ext.define('Registration.controller.Main', { Ext.getCmp('educationConfirm').setText(Ext.getCmp('education').value); Ext.getCmp('casteConfirm').setText(Ext.getCmp('caste').value); Ext.getCmp('occupationConfirm').setText(Ext.getCmp('occupation').value); - // TODO: https://raxaemr.atlassian.net/browse/RAXAJSS-613 - // Ext.getCmp('religionConfirm').setText(Ext.getCmp('religion').value); + Ext.getCmp('religionConfirm').setText(Ext.getCmp('religion').value); Ext.getCmp('residentialAreaConfirm').setText(Ext.getCmp('residentialArea').value); Ext.getCmp('stretConfirm').setText(Ext.getCmp('street').value); if(!(!Ext.getCmp('patientPrimaryContact').value || Ext.getCmp('patientPrimaryContact').value === "")) { @@ -234,8 +233,7 @@ Ext.define('Registration.controller.Main', { {componentId: 'caste', uuid: localStorage.casteUuidpersonattributetype}, {componentId: 'education', uuid: localStorage.educationUuidpersonattributetype}, {componentId: 'occupation', uuid: localStorage.occupationUuidpersonattributetype}, - // TODO: https://raxaemr.atlassian.net/browse/RAXAJSS-613 - // {componentId: 'religion', uuid: localStorage.religionUuidpersonattributetype}, + {componentId: 'religion', uuid: localStorage.religionUuidpersonattributetype}, {componentId: 'tehsil', uuid: localStorage.tehsilUuidpersonattributetype}, {componentId: 'district', uuid: localStorage.districtUuidpersonattributetype}, {componentId: 'patientPrimaryContact', uuid: localStorage.primaryContactUuidpersonattributetype}, @@ -555,11 +553,10 @@ Ext.define('Registration.controller.Main', { //function which reset all the fields in new patient registertation form _resetNewPatientRegistrationForm: function() { - // TODO: https://raxaemr.atlassian.net/browse/RAXAJSS-613 - var fields = ['oldPatientIdentifier', 'patientFirstName', 'patientLastName', 'patientFirstNameHindi', 'patientLastNameHindi', 'relativeFirstName', 'relativeLastName', 'patientAge', 'dob', 'street', 'town', 'residentialArea', 'tehsil', 'district', 'state', 'patientPrimaryContact', 'patientSecondaryContact', 'education', 'caste', 'occupation', 'complaintArea', 'heightIDcm', 'weightIDkg', 'bmiNumberfieldID']; + var fields = ['oldPatientIdentifier', 'patientFirstName', 'patientLastName', 'patientFirstNameHindi', 'patientLastNameHindi', 'relativeFirstName', 'relativeLastName', 'patientAge', 'dob', 'street', 'town', 'residentialArea', 'tehsil', 'district', 'state', 'patientPrimaryContact', 'patientSecondaryContact', 'education', 'caste', 'occupation', 'complaintArea', 'heightIDcm', 'weightIDkg', 'bmiNumberfieldID','religion']; for(var i = 0; i < fields.length; i++) { Ext.getCmp(fields[i]).reset(); } }, -}); \ No newline at end of file +}); diff --git a/src/registrationextjs4/app/view/RegistrationConfirm.js b/src/registrationextjs4/app/view/RegistrationConfirm.js index 0a18e5f9..d68d7170 100644 --- a/src/registrationextjs4/app/view/RegistrationConfirm.js +++ b/src/registrationextjs4/app/view/RegistrationConfirm.js @@ -309,24 +309,23 @@ Ext.define('Registration.view.RegistrationConfirm', { name: 'occuption', id: 'occupationConfirm' }] - // TODO: https://raxaemr.atlassian.net/browse/RAXAJSS-613 - // }, { - // xtype: 'fieldcontainer', - // fieldLabel: Ext.i18n.appBundle.getMsg('RaxaEmrReg.view.rc.Religion'), - // layout: 'hbox', - // combineErrors: true, - // defaultType: 'text', - // labelAlign: 'right', - // labelPad: 20, - // labelWidth: 250, - // anchor: '95%', - // defaults: { - // hideLabel: 'true' - // }, - // items: [{ - // name: 'religion', - // id: 'religionConfirm' - // }] + }, { + xtype: 'fieldcontainer', + fieldLabel: Ext.i18n.appBundle.getMsg('RaxaEmrReg.view.rc.Religion'), + layout: 'hbox', + combineErrors: true, + defaultType: 'text', + labelAlign: 'right', + labelPad: 20, + labelWidth: 250, + anchor: '95%', + defaults: { + hideLabel: 'true' + }, + items: [{ + name: 'religion', + id: 'religionConfirm' + }] }] },{ xtype: 'container', diff --git a/src/registrationextjs4/app/view/RegistrationPart1.js b/src/registrationextjs4/app/view/RegistrationPart1.js index 46feb32e..934d5eb6 100644 --- a/src/registrationextjs4/app/view/RegistrationPart1.js +++ b/src/registrationextjs4/app/view/RegistrationPart1.js @@ -625,41 +625,39 @@ Ext.define('Registration.view.RegistrationPart1', { }] }, { - // TODO: https://raxaemr.atlassian.net/browse/RAXAJSS-613 - // xtype: 'fieldcontainer', - // fieldLabel: Ext.i18n.appBundle.getMsg('RaxaEmrReg.view.rp1.Religion'), - // layout: 'hbox', - // combineErrors: true, - // defaultType: 'textfield', - // labelAlign: 'right', - // labelPad: 20, - // labelWidth: 200, - // anchor: '95%', - // defaults: { - // hideLabel: 'true' - // }, - // items: [{ - // xtype: 'combo', - // name: 'religion', - // id: 'religion', - // layout: 'hbox', - // width: 172, - // typeAhead: true, - // minChars: 1, - // queryMode: 'local', - // store: new Ext.data.SimpleStore({ - // fields: ['religion'], - // data: [ - // [Ext.i18n.appBundle.getMsg('RaxaEmrReg.view.rp1.Religion.1')], - // [Ext.i18n.appBundle.getMsg('RaxaEmrReg.view.rp1.Religion.2')], - // [Ext.i18n.appBundle.getMsg('RaxaEmrReg.view.rp1.Religion.3')], - // [Ext.i18n.appBundle.getMsg('RaxaEmrReg.view.rp1.Religion.4')] - // ] - // }), - // displayField: 'religion' - - // }] - // }, { + xtype: 'fieldcontainer', + fieldLabel: Ext.i18n.appBundle.getMsg('RaxaEmrReg.view.rp1.Religion'), + layout: 'hbox', + combineErrors: true, + defaultType: 'textfield', + labelAlign: 'right', + labelPad: 20, + labelWidth: 200, + anchor: '95%', + defaults: { + hideLabel: 'true' + }, + items: [{ + xtype: 'combo', + name: 'religion', + id: 'religion', + layout: 'hbox', + width: 172, + typeAhead: true, + minChars: 1, + queryMode: 'local', + store: new Ext.data.SimpleStore({ + fields: ['religion'], + data: [ + [Ext.i18n.appBundle.getMsg('RaxaEmrReg.view.rp1.Religion.1')], + [Ext.i18n.appBundle.getMsg('RaxaEmrReg.view.rp1.Religion.2')], + [Ext.i18n.appBundle.getMsg('RaxaEmrReg.view.rp1.Religion.3')], + [Ext.i18n.appBundle.getMsg('RaxaEmrReg.view.rp1.Religion.4')] + ] + }), + displayField: 'religion' + }] + }, { xtype: 'container', layout: { type: 'hbox', diff --git a/src/registrationextjs4/app/view/SearchConfirm.js b/src/registrationextjs4/app/view/SearchConfirm.js index 40dccdbb..20568259 100644 --- a/src/registrationextjs4/app/view/SearchConfirm.js +++ b/src/registrationextjs4/app/view/SearchConfirm.js @@ -211,28 +211,27 @@ Ext.define('Registration.view.SearchConfirm', { flex: 1, allowBlank: false }] - // TODO: https://raxaemr.atlassian.net/browse/RAXAJSS-613 - // }, { - // xtype: 'fieldcontainer', - // fieldLabel: Ext.i18n.appBundle.getMsg('RaxaEmrReg.view.sc.Religion'), - // layout: 'hbox', - // combineErrors: true, - // defaultType: 'textfield', - // labelAlign: 'right', - // labelPad: 20, - // labelWidth: 250, - // anchor: '95%', - // defaults: { - // hideLabel: 'true' - // }, - // items: [{ - // name: 'religion', - // id: 'religionSearchedPatient', - // emptyText: Ext.i18n.appBundle.getMsg('RaxaEmrReg.view.sc.Religion.emptytext'), - // readOnly: true, - // flex: 1, - // allowBlank: false - // }] + }, { + xtype: 'fieldcontainer', + fieldLabel: Ext.i18n.appBundle.getMsg('RaxaEmrReg.view.sc.Religion'), + layout: 'hbox', + combineErrors: true, + defaultType: 'textfield', + labelAlign: 'right', + labelPad: 20, + labelWidth: 250, + anchor: '95%', + defaults: { + hideLabel: 'true' + }, + items: [{ + name: 'religion', + id: 'religionSearchedPatient', + emptyText: Ext.i18n.appBundle.getMsg('RaxaEmrReg.view.sc.Religion.emptytext'), + readOnly: true, + flex: 1, + allowBlank: false + }] }, { xtype: 'textfield', id: 'residentialAreaSearchedPatient', diff --git a/src/registrationextjs4/app/view/SearchPart2.js b/src/registrationextjs4/app/view/SearchPart2.js index 2a5f7ae4..d33dab6e 100644 --- a/src/registrationextjs4/app/view/SearchPart2.js +++ b/src/registrationextjs4/app/view/SearchPart2.js @@ -93,9 +93,7 @@ Ext.define('Registration.view.SearchPart2', { cellClick: { fn: function () { //All fields are initially set to '-' if data is not available, they remain same otherwise take respective values - // TODO: https://raxaemr.atlassian.net/browse/RAXAJSS-613 - // 'religionSearchedPatient' - var itemsToReset = ['patientNameSearchedPatient','ageSearchedPatient','sexSearchedPatient','residentialAreaSearchedPatient','stretSearchedPatient','townSearchedPatient','oldPatientIdentifierSearchedPatient','occupationSearchedPatient','relativeNameSearchedPatient','tehsilSearchedPatient','secondaryContactNumberSearchedPatient','primaryContactNumberSearchedPatient','districtSearchedPatient','stateSearchedPatient','casteSearchedPatient','educationSearchedPatient']; + var itemsToReset = ['patientNameSearchedPatient','ageSearchedPatient','sexSearchedPatient','residentialAreaSearchedPatient','stretSearchedPatient','townSearchedPatient','oldPatientIdentifierSearchedPatient','occupationSearchedPatient','relativeNameSearchedPatient','tehsilSearchedPatient','secondaryContactNumberSearchedPatient','primaryContactNumberSearchedPatient','districtSearchedPatient','stateSearchedPatient','casteSearchedPatient','educationSearchedPatient','religionSearchedPatient']; for(var j=0 ; j < itemsToReset.length ; j++) { Ext.getCmp(itemsToReset[j]).setValue('-'); @@ -165,11 +163,10 @@ Ext.define('Registration.view.SearchPart2', { { Ext.getCmp('educationSearchedPatient').setValue(temp.attributes[i].value); } - // TODO: https://raxaemr.atlassian.net/browse/RAXAJSS-613 - // if(temp.attributes[i].attributeType.display.search('Religion')>=0) - // { - // Ext.getCmp('religionSearchedPatient').setValue(temp.attributes[i].value); - // } + if(temp.attributes[i].attributeType.display.search('Religion')>=0) + { + Ext.getCmp('religionSearchedPatient').setValue(temp.attributes[i].value); + } } var l = Ext.getCmp('mainRegArea').getLayout(); l.setActiveItem(REG_PAGES.SEARCH_CONFIRM.value); From e63f89e4c01a7bb9f1e4bc316e4a47e013874058 Mon Sep 17 00:00:00 2001 From: madanpiyush Date: Sun, 11 Nov 2012 23:01:27 +0530 Subject: [PATCH 2/2] RegFeePayment(Paid/Credit) concept added in Reg Module --- src/registrationextjs4/app/controller/Main.js | 10 ++++++++++ .../app/view/IllnessDetails.js | 20 ++++++++++++++++++- .../app/view/RaxaEmrReg_en-US.properties | 4 ++-- src/resources/scripts/util.js | 6 ++++++ 4 files changed, 37 insertions(+), 3 deletions(-) diff --git a/src/registrationextjs4/app/controller/Main.js b/src/registrationextjs4/app/controller/Main.js index e0645fea..74cd2615 100644 --- a/src/registrationextjs4/app/controller/Main.js +++ b/src/registrationextjs4/app/controller/Main.js @@ -492,6 +492,16 @@ Ext.define('Registration.controller.Main', { }); jsonencounter.data.obs.push(jsonencounterregfee.data); } + if(this._isOkToSendByREST('regFeePayment')) { + console.log("pushing obs.. regFeePayment"); + var jsonencounterregfee = Ext.create('Registration.model.obsModel', { + obsDatetime: t, + person: localStorage.newPatientUuid, + concept: localStorage.regFeePaymentUuidconcept, + value: Ext.getCmp('regFeePayment').value + }); + jsonencounter.data.obs.push(jsonencounterregfee.data); + } if(this._isOkToSendByREST('complaintArea')) { console.log("pushing obs.. complaintArea"); var jsonencountercomplaint = Ext.create('Registration.model.obsModel', { diff --git a/src/registrationextjs4/app/view/IllnessDetails.js b/src/registrationextjs4/app/view/IllnessDetails.js index 5d06edab..06474e91 100644 --- a/src/registrationextjs4/app/view/IllnessDetails.js +++ b/src/registrationextjs4/app/view/IllnessDetails.js @@ -84,7 +84,25 @@ Ext.define('Registration.view.IllnessDetails', { value: 10, hideTrigger: true, allowBlank: false - }] + }, + { + xtype: 'combo', + id: 'regFeePayment', + layout: 'hbox', + width: 175, + typeAhead: true, + minChars: 1, + queryMode: 'local', + value: 'Paid', + displayField: 'regFeePayment', + store: new Ext.data.SimpleStore({ + fields: ['regFeePayment'], + data: [ + ['Paid'], + ['Credit'] + ] + }) + }] }] },{ xtype: 'container', diff --git a/src/registrationextjs4/app/view/RaxaEmrReg_en-US.properties b/src/registrationextjs4/app/view/RaxaEmrReg_en-US.properties index aa877806..93d2e1a1 100644 --- a/src/registrationextjs4/app/view/RaxaEmrReg_en-US.properties +++ b/src/registrationextjs4/app/view/RaxaEmrReg_en-US.properties @@ -97,8 +97,8 @@ RaxaEmrReg.view.id.phone=Phone No RaxaEmrReg.view.id.relation=Relation To Patient RaxaEmrReg.view.id.title3=New Registration RaxaEmrReg.view.id.RF=Registration Fees -RaxaEmrReg.view.id.collected=Fees Collected -RaxaEmrReg.view.id.credit=On Credit +RaxaEmrReg.view.id.collected=Paid +RaxaEmrReg.view.id.credit=Credit RaxaEmrReg.view.id.back=Back RaxaEmrReg.view.id.cancel=Cancel RaxaEmrReg.view.id.next=Next diff --git a/src/resources/scripts/util.js b/src/resources/scripts/util.js index f71dc1c6..a29babc9 100644 --- a/src/resources/scripts/util.js +++ b/src/resources/scripts/util.js @@ -109,6 +109,12 @@ var resourceUuid = { "varName": "regfee", "displayName": "REGISTRATION FEE" }, + "regFeePayment": { + "resource": "concept", + "queryTerm": "regFeePayment", + "varName": "regFeePayment", + "displayName": "REGISTRATION FEE PAYMENT" + }, "systolicbloodpressure": { "resource": "concept", "queryTerm": "SYSTOLIC BLOOD PRESSURE",