{"version":3,"sources":["../../src/patient-api/module.js","../../src/patient-api/services/ConsentRepository.js","../../src/patient-api/services/PatientSettingsRepository.js","../../src/patient-api/services/PatientSettingsService.js"],"names":["angular","module","value","FeatureList","ViewClinicalSummary","Problems","ViewMedications","ViewProcedures","ViewImmunizations","ViewLabTestResults","ViewEducationMaterial","UpdateDemographics","UpdateInsurance","ViewMedicationAllergies","ViewMedicalHistory","RequestRxRefills","ViewCompleteChart","RequestAppointments","ResetPasswordFromLogin","ViewPatientStatement","SendReceiveMessages","ViewAppointments","CheckIn","ViewPatientLedger","RequestAssistanceFromLogin","MakeAPayment","AllowGenerateCCD","PatientMessageAttachment","ViewDocuments","VaccineAdminList","Adult","Pediatric","MessageSubType","PatientAttachment","factory","AprimaRestangular","getPracticeConsent","uid","get","one","getChartConsent","userId","getAgreementPrivacyPolicyPath","postUserAgreedToPracticeConsent","customPOST","postChartConsent","getAgreementPrivacyPolicyImage","requestSettings","restangular","queryString","page","height","width","downloadAgreementPrivacyPolicy","downloadApiDocumentation","storage","patientFeatures","userid","setFeatureList","set","getFeatureList","PatientSettingsRepository","CurrentUser","$q","_","GuidList","loadPatientFeatures","featureList","then","data","PatientFeatures","featureListIndexed","find","Id","getPatientFeatures"],"mappings":"AAAAA,QAAQC,OAAO,qBAAsB,CACjC,cACA,sBACA,SAGA,cACA,gBACA,gBACA,yBAEJD,QAAQC,OAAO,sBAAsBC,MAAM,WAAY,CACnDC,YAAe,CAACC,oBAAuB,uCACnCC,SAAY,uCACZC,gBAAmB,uCACnBC,eAAkB,uCAClBC,kBAAqB,uCACrBC,mBAAsB,uCACtBC,sBAAyB,uCACzBC,mBAAsB,uCACtBC,gBAAmB,uCACnBC,wBAA2B,uCAC3BC,mBAAsB,uCACtBC,iBAAoB,uCACpBC,kBAAqB,uCACrBC,oBAAuB,uCACvBC,uBAA0B,uCAC1BC,qBAAwB,uCACxBC,oBAAuB,uCACvBC,iBAAoB,uCACpBC,QAAW,uCACXC,kBAAqB,uCACrBC,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S9D,YAAYY,mBAClEC,kBAAqBgD,EAAEQ,KAAKL,YAAa,CAACM,GAAIR,SAAS9D,YAAYa,oBACnEC,oBAAuB+C,EAAEQ,KAAKL,YAAa,CAACM,GAAIR,SAAS9D,YAAYc,sBACrEC,uBAA0B8C,EAAEQ,KAAKL,YAAa,CAACM,GAAIR,SAAS9D,YAAYe,yBACxEC,qBAAwB6C,EAAEQ,KAAKL,YAAa,CAACM,GAAIR,SAAS9D,YAAYgB,uBACtEC,oBAAuB4C,EAAEQ,KAAKL,YAAa,CAACM,GAAIR,SAAS9D,YAAYiB,sBACrEC,iBAAoB2C,EAAEQ,KAAKL,YAAa,CAACM,GAAIR,SAAS9D,YAAYkB,mBAClEC,QAAW0C,EAAEQ,KAAKL,YAAa,CAACM,GAAIR,SAAS9D,YAAYmB,UACzDC,kBAAqByC,EAAEQ,KAAKL,YAAa,CAACM,GAAIR,SAAS9D,YAAYoB,oBACnEC,2BAA8BwC,EAAEQ,KAAKL,YAAa,CAACM,GAAIR,SAAS9D,YAAYqB,6BAC5EC,aAAgBuC,EAAEQ,KAAKL,YAAa,CAACM,GAAIR,SAAS9D,YAAYsB,eAC9DC,iBAAoBsC,EAAEQ,KAAKL,YAAa,CAACM,GAAIR,SAAS9D,YAAYuB,mBAClEC,yBAA6BqC,EAAEQ,KAAKL,YAAa,CAACM,GAAIR,SAAS9D,YAAYwB,4BAG/EkC,0BAA0BH,eAAea,uBAUjDG,mBANqB,WACrB,OAAOb,0BAA0BD","file":"aprima-patient-api.min.js","sourcesContent":["angular.module('aprima-patient-api', [\r\n 'restangular',\r\n 'angularLocalStorage',\r\n 'lodash',\r\n\r\n //aprima\r\n 'aprima-core',\r\n 'aprima-bridge',\r\n 'aprima-config',\r\n 'aprima-legacy-common'\r\n]);\r\nangular.module('aprima-patient-api').value('GuidList', {\r\n 'FeatureList': {'ViewClinicalSummary': '27d5a4b8-1c68-45bb-a89f-023fbc5fc370',\r\n 'Problems': 'c7f48f12-cea2-45a2-b6c3-bf69f404d624',\r\n 'ViewMedications': 'c7f48f12-cea2-45a2-b6c3-bf69f404d624',\r\n 'ViewProcedures': '937a64e0-1c2a-42ab-ab29-877e8555f812',\r\n 'ViewImmunizations': '0354d96b-e135-4753-b06c-1634e6745299',\r\n 'ViewLabTestResults': '217ea966-914f-4036-9d97-b8d0f69ba1a4',\r\n 'ViewEducationMaterial': 'aaad592b-0bff-4141-9f1c-504786cfe873',\r\n 'UpdateDemographics': 'db28aa45-8e4e-4646-bd98-332c718ace12',\r\n 'UpdateInsurance': '349cdc7a-781c-4586-8414-12f79b1b6d1d',\r\n 'ViewMedicationAllergies': '49d7f6a3-546f-4b90-8237-7573328cb324',\r\n 'ViewMedicalHistory': '7ec64d3e-e5b1-40c8-a61d-8aaa1f92e312',\r\n 'RequestRxRefills': 'b77f8f32-2d6a-4c67-bcb1-c5040cf5a7d7',\r\n 'ViewCompleteChart': 'aa04ca02-089b-4455-8566-cf9d766487b6',\r\n 'RequestAppointments': 'ec14ccd3-e629-458d-8ff0-0bcfa932a1be',\r\n 'ResetPasswordFromLogin': 'e4374e8f-c437-4fed-9f56-28bf780d49a6',\r\n 'ViewPatientStatement': '27fd1c02-42b7-441c-8b2a-4998a1aa1762',\r\n 'SendReceiveMessages': '5b780e05-5dcc-44de-a617-52d7f4a118d8',\r\n 'ViewAppointments': '19a6fc42-14a5-4df8-91fc-60ed9be714c7',\r\n 'CheckIn': '3ae462ed-a97c-4681-97c8-8e901b08f331',\r\n 'ViewPatientLedger': 'd092edc0-32fa-42a5-b14f-b4bb6c3fc1bd',\r\n 'RequestAssistanceFromLogin': '91c6168b-afc4-4964-87a4-e8e3fc6a960c',\r\n 'MakeAPayment': 'a3978397-4796-43b3-9586-7f24e41aee33',\r\n 'AllowGenerateCCD': '74763879-aa19-4cc5-a309-9517471903fa',\r\n 'PatientMessageAttachment' : '25c3a27d-a63c-4198-b94b-eaa75cb045b3',\r\n 'ViewDocuments' : '73187c49-163c-4c71-8133-151539dd9dfe'\r\n },\r\n 'VaccineAdminList': {\r\n 'Adult': '187D09C3-F59F-446F-AF14-3D8E1A3BD920',\r\n 'Pediatric': '6B1B35B9-85A8-499E-83D9-11EBB24CEA04'\r\n },\r\n 'MessageSubType':{\r\n 'PatientAttachment': 'd8799ae1-d76c-4def-b7cd-1d89955a7446' //Attachment Approval\r\n }\r\n});","angular.module('aprima-patient-api').factory('ConsentRepository',\r\n ['AprimaRestangular', function (AprimaRestangular) {\r\n 'use strict';\r\n\r\n function getPracticeConsent(uid) {\r\n var restangular = AprimaRestangular.get('patient');\r\n return restangular.one('consents/' + uid + '/practiceconsent').get();\r\n }\r\n\r\n function getChartConsent(userId) {\r\n var restangular = AprimaRestangular.get('patient');\r\n return restangular.one('consents/' + userId + '/chartconsent').get();\r\n }\r\n\r\n function postChartConsent(userId) {\r\n var restangular = AprimaRestangular.get('patient');\r\n return restangular.one('consents/' + userId + '/chartconsent').customPOST();\r\n }\r\n\r\n function getAgreementPrivacyPolicyPath(uid) {\r\n var restangular = AprimaRestangular.get('patient');\r\n return restangular.one('consents/' + uid + '/agreementprivacypolicypath').get();\r\n }\r\n\r\n function getAgreementPrivacyPolicyImage(requestSettings) {\r\n var restangular = AprimaRestangular.get('patient');\r\n\r\n var queryString = '?page=' + requestSettings.page + '&height=' + requestSettings.height + '&width=' + requestSettings.width;\r\n return restangular.one('consents/agreementprivacypolicyimage/' + queryString).get();\r\n }\r\n\r\n function downloadAgreementPrivacyPolicy() {\r\n var restangular = AprimaRestangular.get('patient');\r\n return restangular.one('consents/agreementprivacypolicy/').get();\r\n }\r\n\r\n function postUserAgreedToPracticeConsent(uid) {\r\n var restangular = AprimaRestangular.get('patient');\r\n return restangular.one('consents/' + uid + '/practiceconsent').customPOST();\r\n }\r\n\r\n function downloadApiDocumentation() {\r\n var restangular = AprimaRestangular.get('patient');\r\n return restangular.one('consents/apidocumentation/').get();\r\n }\r\n \r\n return{\r\n getPracticeConsent: getPracticeConsent,\r\n getChartConsent: getChartConsent,\r\n getAgreementPrivacyPolicyPath: getAgreementPrivacyPolicyPath,\r\n postUserAgreedToPracticeConsent: postUserAgreedToPracticeConsent,\r\n postChartConsent: postChartConsent,\r\n getAgreementPrivacyPolicyImage: getAgreementPrivacyPolicyImage,\r\n downloadAgreementPrivacyPolicy: downloadAgreementPrivacyPolicy,\r\n downloadApiDocumentation: downloadApiDocumentation\r\n };\r\n }]);","angular.module('aprima-patient-api').factory('PatientSettingsRepository',\r\n ['AprimaRestangular', 'storage',\r\n function (AprimaRestangular, storage) {\r\n 'use strict';\r\n\r\n var patientFeatures = function (userid) {\r\n return AprimaRestangular.get('patient').one('settings/usersettings/' + userid).get();\r\n };\r\n var setFeatureList = function (value){\r\n return storage.set('featureList', value);\r\n };\r\n var getFeatureList = function () {\r\n return storage.get('featureList');\r\n };\r\n\r\n return {\r\n patientFeatures: patientFeatures,\r\n setFeatureList: setFeatureList,\r\n getFeatureList: getFeatureList\r\n };\r\n\r\n }]);","angular.module('aprima-patient-api').factory('PatientSettingsService',\r\n ['PatientSettingsRepository', 'CurrentUser', '$q', '_', 'GuidList',\r\n function (PatientSettingsRepository, CurrentUser, $q, _, GuidList) {\r\n 'use strict';\r\n\r\n var loadPatientFeatures = function () {\r\n\r\n var userId = CurrentUser.get().userId,\r\n featureList;\r\n\r\n return PatientSettingsRepository\r\n .patientFeatures(userId)\r\n .then(function (data) {\r\n featureList = data.PatientFeatures;\r\n\r\n var featureListIndexed = {\r\n 'ViewClinicalSummary': _.find(featureList, {Id: GuidList.FeatureList.ViewClinicalSummary}),\r\n 'ViewDocuments': _.find(featureList, {Id: GuidList.FeatureList.ViewDocuments}),\r\n 'ViewMedications': _.find(featureList, {Id: GuidList.FeatureList.ViewMedications}),\r\n 'ViewProcedures': _.find(featureList, {Id: GuidList.FeatureList.ViewProcedures}),\r\n 'ViewImmunizations': _.find(featureList, {Id: GuidList.FeatureList.ViewImmunizations}),\r\n 'ViewLabTestResults': _.find(featureList, {Id: GuidList.FeatureList.ViewLabTestResults}),\r\n 'ViewEducationMaterial': _.find(featureList, {Id: GuidList.FeatureList.ViewEducationMaterial}),\r\n 'UpdateDemographics': _.find(featureList, {Id: GuidList.FeatureList.UpdateDemographics}),\r\n 'UpdateInsurance': _.find(featureList, {Id: GuidList.FeatureList.UpdateInsurance}),\r\n 'ViewMedicationAllergies': _.find(featureList, {Id: GuidList.FeatureList.ViewMedicationAllergies}),\r\n 'ViewMedicalHistory': _.find(featureList, {Id: GuidList.FeatureList.ViewMedicalHistory}),\r\n 'RequestRxRefills': _.find(featureList, {Id: GuidList.FeatureList.RequestRxRefills}),\r\n 'ViewCompleteChart': _.find(featureList, {Id: GuidList.FeatureList.ViewCompleteChart}),\r\n 'RequestAppointments': _.find(featureList, {Id: GuidList.FeatureList.RequestAppointments}),\r\n 'ResetPasswordFromLogin': _.find(featureList, {Id: GuidList.FeatureList.ResetPasswordFromLogin}),\r\n 'ViewPatientStatement': _.find(featureList, {Id: GuidList.FeatureList.ViewPatientStatement}),\r\n 'SendReceiveMessages': _.find(featureList, {Id: GuidList.FeatureList.SendReceiveMessages}),\r\n 'ViewAppointments': _.find(featureList, {Id: GuidList.FeatureList.ViewAppointments}),\r\n 'CheckIn': _.find(featureList, {Id: GuidList.FeatureList.CheckIn}),\r\n 'ViewPatientLedger': _.find(featureList, {Id: GuidList.FeatureList.ViewPatientLedger}),\r\n 'RequestAssistanceFromLogin': _.find(featureList, {Id: GuidList.FeatureList.RequestAssistanceFromLogin}),\r\n 'MakeAPayment': _.find(featureList, {Id: GuidList.FeatureList.MakeAPayment}),\r\n 'AllowGenerateCCD': _.find(featureList, {Id: GuidList.FeatureList.AllowGenerateCCD}),\r\n 'PatientMessageAttachment' : _.find(featureList, {Id: GuidList.FeatureList.PatientMessageAttachment})\r\n };\r\n\r\n PatientSettingsRepository.setFeatureList(featureListIndexed);\r\n });\r\n };\r\n\r\n var getPatientFeatures = function (){\r\n return PatientSettingsRepository.getFeatureList();\r\n };\r\n\r\n return {\r\n loadPatientFeatures: loadPatientFeatures,\r\n getPatientFeatures: getPatientFeatures\r\n };\r\n }\r\n ]);"]}