# jdwang@thmu.edu.tw 2004.11.3
use strict;
# $line = "表單編號 病歷號 病患姓名 生日 診間 檢體類別 工作號 簽收日 時間 報告日 時間 項目代碼 項目名稱"
my $line = "CM-T250 160510 0015851333 王大三 男 0430801 住 309 MICU Blood A890009083 0891229 1629 0900101 0947 105 血液培養blood (請用血瓶採檢) ";
my ($P1,$P2,$P_Name,$P_Sex,$P_Birthday,$P_Location,$Room,$CheckType,$JobID,$SignDate,$SignTime,$ReportDate,$ReportTime,$Item1, $Item2,$RemainInfo) = $line 
        =~ /CM-T250\s+(\d+)\s(\d+)\s+(\D+)\s+(\D+)\s+(\d+)\s+(\D+)\s+(\d+)\s+(\D+)\s+(\w+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s(.+)/g;
  
print $line."\n";  
print "============================================================\n";   		   
print $P1."\n";
print $P2."\n";
print $P_Name."\n";
print $P_Sex."\n";
print $P_Birthday."\n";
print $P_Location."\n";
print $Room."\n";
print $CheckType."\n";
print $JobID."\n";
print $SignDate."\n";
print $SignTime."\n";
print $ReportDate."\n";
print $ReportTime."\n";
print $Item1."\n";
print $Item2."\n";
print "\n\n".$RemainInfo."\n";
print "============================================================\n";