Guest User

Untitled

a guest
May 26th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. pragma solidity ^0.4.23;
  2.  
  3. contract emergencyRecord
  4. {
  5. struct ERrecord
  6. {
  7. string bloodType;
  8. string allegy1;
  9. string allergy2;
  10. string issue1;
  11. string issue2;
  12. string issue3;
  13. }
  14. }
  15. contract patientProfile is emergencyRecord
  16. {
  17.  
  18. struct patientProfileStruct
  19. {
  20. string firstName;
  21. string lastI;
  22. //address to mesaging system
  23. bool emergencyRecord;
  24.  
  25. }
  26. ERrecord public myERrecord ;
  27. patientProfileStruct public myData ;
  28. function setERrecord(string _bloodType, string _allergy1, string _issue1,string _issue2) public
  29. {
  30. myData.emergencyRecord = true;
  31. myERrecord = ERrecord(_bloodType,_allergy1,"0",_issue1,_issue2,"0");
  32.  
  33. }
  34. function setProfileData(string _firstName, string _lastInitial) public
  35. {
  36. myData.firstName = _firstName;
  37. myData.lastI = _lastInitial;
  38. }
  39.  
  40. }
  41. contract doctorProfile
  42. {
  43. struct doctorStruct
  44. {
  45. string firstName;
  46. string lastName;
  47. //address to mesaging system
  48. string hostpitalName;
  49. string doctorID;
  50. }
  51. doctorStruct public myData;
  52. function setProfileData(string _firstName, string _lastName, string _hostpitalName, string _doctorID) public
  53. {
  54. myData.firstName = _firstName;
  55. myData.lastName = _lastName;
  56. myData.hostpitalName = _hostpitalName;
  57. myData.doctorID = _doctorID;
  58. }
  59.  
  60. }
Add Comment
Please, Sign In to add comment