forked from MeasureAuthoringTool/bonnie
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
152 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
app/assets/javascripts/templates/measure/import_qrda_patients.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<div class="modal fade" id="importQdaPatientInProgressDialog" tabindex="-1" role="dialog" aria-hidden="true"> | ||
<div class="modal-dialog"> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<h1>Importing Patients...</h1> | ||
</div> | ||
<div class="modal-body"> | ||
<div class="progress progress-striped active"> | ||
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%"> | ||
<span class="sr-only">Importing Patients...</span> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="modal fade" id="importQrdaPatientsDialog" tabindex="-1" aria-hidden="true"> | ||
<div class="modal-dialog" role="dialog" aria-labelledby="modalTitle"> | ||
<div class="modal-content"> | ||
<form role="form" method="post" enctype="multipart/form-data" action="/patients/qrda_import"> | ||
<input name="authenticity_token" type="hidden" value="{{token}}"> | ||
<input name="measure_id" type="hidden" value="{{measure.id}}"> | ||
<input name="hqmf_set_id" type="hidden" value="{{measure.hqmf_set_id}}"> | ||
<div class="modal-header"> | ||
<h1 class="modal-title" id="modalTitle">Import patients into measure {{measure.title}}</h1> | ||
</div> | ||
<div class="modal-body"> | ||
<div class="alert alert-info">Please select a patient zip file exported from Bonnie QDM. By clicking Submit you agree to not upload any Protected Health Information (PHI) or Personally Identifiable Information (PII) while using this feature.</div> | ||
<div class="form-group"> | ||
<label for="measureFileInput" class="control-label">Patient zip file</label> | ||
<div> | ||
<input class="file nice_input" type="file" id="patientFileInput" name="patient_import_file"> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="modal-footer"> | ||
<button type="submit" id="importPatientsSubmit" class="btn btn-primary" disabled>Submit</button> | ||
<button type="button" id="importPatientsCancel" class="btn btn-default">Cancel</button> | ||
</div> | ||
</div> | ||
</form> | ||
</div><!-- /.modal-content --> | ||
</div><!-- /.modal-dialog --> | ||
</div><!-- /.modal --> |
41 changes: 41 additions & 0 deletions
41
app/assets/javascripts/views/import_qrda_patients_view.js.coffee
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
class Thorax.Views.ImportQrdaPatients extends Thorax.Views.BonnieView | ||
template: JST['measure/import_qrda_patients'] | ||
|
||
initialize: -> | ||
@measure = @model.get('cqmMeasure'); | ||
|
||
|
||
context: -> | ||
_(super).extend | ||
token: $('meta[name="csrf-token"]').attr('content') | ||
|
||
setup: -> | ||
@importQrdaPatientsDialog = @$("#importQrdaPatientsDialog") | ||
|
||
events: | ||
rendered: -> | ||
@$el.on 'hidden.bs.modal', -> @remove() unless $('#importQrdaPatientsDialog').is(':visible') | ||
'click #importPatientsCancel': 'cancel' | ||
'click #importPatientsSubmit': 'submit' | ||
'change #patientFileInput': 'fileChanged' | ||
'ready': 'setup' | ||
|
||
|
||
display: -> | ||
@importQrdaPatientsDialog.modal( | ||
"backdrop" : "static", | ||
"keyboard" : true, | ||
"show" : true) | ||
|
||
cancel: -> | ||
@importQrdaPatientsDialog.modal('hide') | ||
|
||
submit: (e) -> | ||
e.preventDefault() | ||
$(e.target).prop('disabled', true) | ||
@$('form').submit() | ||
@importQrdaPatientsDialog.modal('hide') | ||
@$("#importQrdaPatientInProgressDialog").modal backdrop: 'static' | ||
|
||
fileChanged: (e) -> | ||
@$('#importPatientsSubmit').prop('disabled', !fileName = $(e.target).val()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters