Handle.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?php
  2. namespace app\common\library;
  3. use think\facade\Config;
  4. /**
  5. * 检查检验参数处理
  6. */
  7. class Handle
  8. {
  9. /*
  10. * 主索引ID
  11. */
  12. public static function makeMpi():string
  13. {
  14. return date('YmdHis').rand(100000,999999);
  15. }
  16. /*
  17. * 主索引ID
  18. */
  19. public static function makeMpiKey($idCard):string
  20. {
  21. return md5($idCard);
  22. }
  23. // /*
  24. // * 就诊患者标识
  25. // */
  26. // public static function makePatientCode($code,$seriesNum): string
  27. // {
  28. // return md5($code.$seriesNum);
  29. // }
  30. /*
  31. * 就诊患者标识
  32. */
  33. public static function makePatientCode($mpi, $code, $seriesNum): string
  34. {
  35. return md5($mpi.$code.$seriesNum);
  36. }
  37. /*
  38. * 检查申请单标识
  39. */
  40. public static function makeApplicationCode($code,$requestId): string
  41. {
  42. return md5($code.$requestId);
  43. }
  44. /*
  45. * 检验申请单标识
  46. */
  47. public static function makeMedicalOrderCode($code,$orderId,$labItemCode): string
  48. {
  49. return md5($code.$orderId.$labItemCode);
  50. }
  51. /*
  52. * 检查报告标识
  53. */
  54. public static function makeExamReportCode($patientCode, $reportId):string
  55. {
  56. return md5($patientCode.$reportId);
  57. }
  58. /*
  59. * 检验报告单标识
  60. */
  61. public static function makeInspectReportCode($patientCode, $reportId):string
  62. {
  63. return md5($patientCode.$reportId);
  64. }
  65. /*
  66. *
  67. */
  68. public static function makeInspectReportItemCode($inspectReportCode, $labItemCode): string
  69. {
  70. return md5($inspectReportCode.$labItemCode);
  71. }
  72. }