Advertisement
Guest User

Untitled

a guest
Oct 24th, 2016
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. function get_data(id) {
  2. $.when(
  3. // Get the Patient Data
  4. $.ajax({
  5. type: "GET",
  6. url: "http://web.testlab.local:57773/csp/healthshare/hsaccess/fhir/Bundle/" + id,
  7. data: {
  8. CacheUserName: "intersystems",
  9. CachePassword: "Qwerty1!"
  10. },
  11. dataType: 'json',
  12. success: function(data) {
  13. console.log("Got a response!")
  14. parse_json_content(data);
  15. }
  16. })
  17. ).then(function() {
  18. // All is ready now, so...
  19. console.log("All is ready. Lets populate the page!");
  20. $('#resultarea_for_patient').html(patient_content).hide().fadeIn(2000);
  21.  
  22. setTimeout(function() {
  23. $('#resultarea_for_doctor').hide().html(doctor_content).fadeIn(2000);
  24. }, 200);
  25. setTimeout(function() {
  26. $('#resultarea_for_diagnoses').hide().html(diagnostic_content).fadeIn(2000);
  27. }, 300);
  28. setTimeout(function() {
  29. $('#resultarea_for_medication').hide().html(medicational_content).fadeIn(2000);
  30. }, 400);
  31. setTimeout(function() {
  32. $('#resultarea_for_risks').hide().html(risk_content).fadeIn(2000);
  33. }, 600);
  34. });
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement