diff --git a/app/assets/javascripts/provider-search.js b/app/assets/javascripts/provider-search.js index 7028388..f23edc0 100644 --- a/app/assets/javascripts/provider-search.js +++ b/app/assets/javascripts/provider-search.js @@ -5,6 +5,8 @@ $(() => { updateProviderCity({ target: { value: $('#city-input').val() } }); updateProviderSpecialty({ target: { value: $('#specialty-select').val() } }); updateProviderName({ target: { value: $('#name-input').val() } }); + updateProviderActiveDate({ target: { value: $('#active-input').val() } }); + updateProviderActive({ target: { value: $('#is-active-input').val() } }); } }); @@ -70,6 +72,15 @@ const updateProviderName = function (event) { updateProviderSearchParam(event, 'name'); }; +const updateProviderActive = function (event) { + console.log("in here!"); + updateProviderSearchParam(event, 'active'); +} + +const updateProviderActiveDate = function (event) { + providerParams['date'] = 'le' + event.target.value + '&date=ge' + event.target.value; +}; + const submitProviderSearch = function (_event) { const params = Object.entries(providerParams) .filter(([key, value]) => value && value.length > 0) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 57bb277..ed8d48a 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -447,6 +447,7 @@ def good_response(response) ].freeze INDIVIDUAL_AND_GROUP_SPECIALTIES = [ + { value: '101200000X', name: 'Drama Therapist' }, { value: '101Y00000X', name: 'Counselor' }, { value: '101YA0400X', name: 'Addiction (Substance Use Disorder) Counselor' }, { value: '101YM0800X', name: 'Mental Health Counselor' }, @@ -611,6 +612,7 @@ def good_response(response) { value: '171000000X', name: 'Military Health Care Provider' }, { value: '1710I1002X', name: 'Independent Duty Corpsman' }, { value: '1710I1003X', name: 'Independent Duty Medical Technicians' }, + { value: '171400000X', name: 'Health & Wellness Coach' }, { value: '171100000X', name: 'Acupuncturist' }, { value: '171M00000X', name: 'Case Manager/Care Coordinator' }, { value: '171R00000X', name: 'Interpreter' }, @@ -831,6 +833,7 @@ def good_response(response) { value: '2084B0002X', name: 'Obesity Medicine (Psychiatry & Neurology) Physician' }, { value: '2084B0040X', name: 'Behavioral Neurology & Neuropsychiatry Physician' }, { value: '2084D0003X', name: 'Diagnostic Neuroimaging (Psychiatry & Neurology) Physician' }, + { value: '2084F0202X', name: 'Forensic Psychiatry Physician' }, { value: '2084H0002X', name: 'Hospice and Palliative Medicine (Psychiatry & Neurology) Physician' }, { value: '2084N0008X', name: 'Neuromuscular Medicine (Psychiatry & Neurology) Physician' }, @@ -1044,6 +1047,7 @@ def good_response(response) { value: '2472R0900X', name: 'Renal Dialysis Technician' }, { value: '2472V0600X', name: 'Veterinary Technician' }, { value: '247ZC0005X', name: 'Clinical Laboratory Director (Non-physician)' }, + { value: '342000000X', name: 'Transportation Network Company' }, { value: '363A00000X', name: 'Physician Assistant' }, { value: '363AM0700X', name: 'Medical Physician Assistant' }, { value: '363AS0400X', name: 'Surgical Physician Assistant' }, @@ -1322,7 +1326,7 @@ def good_response(response) { value: '320600000X', name: 'Residential Treatment Facility, Mental Retardation and/or Developmental Disabilities' }, { value: '320700000X', name: 'Residential Treatment Facility, Physical Disabilities' }, { value: '320800000X', name: 'Community Based Residential Treatment Facility, Mental Illness' }, - { value: '320900000X', name: 'Community Based Residential Treatment Facility, Mental Retardation and/or Developmental Disabilities' }, + { value: '320900000X', name: 'Intellectual and/or Developmental Disabilities Community Based Residential Treatment Facility' }, { value: '322D00000X', name: 'Residential Treatment Facility, Emotionally Disturbed Children' }, { value: '323P00000X', name: 'Psychiatric Residential Treatment Facility' }, { value: '324500000X', name: 'Substance Abuse Rehabilitation Facility' }, diff --git a/app/controllers/providers_controller.rb b/app/controllers/providers_controller.rb index 3bd224e..0431cf4 100644 --- a/app/controllers/providers_controller.rb +++ b/app/controllers/providers_controller.rb @@ -63,7 +63,7 @@ def search .each_with_object(base_params) do |(local_key, fhir_key), search_params| search_params[fhir_key] = modifiedparams[local_key] end - # binding.pry + # binding.pry @bundle = @client.search( FHIR::PractitionerRole, search: { parameters: query } @@ -140,7 +140,9 @@ def roles zipcode: 'location.address-postalcode', city: 'location.address-city', specialty: 'specialty', - name: 'practitioner.name' + name: 'practitioner.name', + date: 'date', + active: 'active' }.freeze end diff --git a/app/views/providers/index.html.erb b/app/views/providers/index.html.erb index cb344ee..6e75d39 100644 --- a/app/views/providers/index.html.erb +++ b/app/views/providers/index.html.erb @@ -30,6 +30,11 @@ + + + + +