Browse Source

Merge branch 'dev' of http://code.pacsonline.cn/zskk_bg/yuanchengpasc into pro

lgy 6 years ago
parent
commit
1ac0523467
2 changed files with 57 additions and 32 deletions
  1. 47 30
      .idea/workspace.xml
  2. 10 2
      application/inter/controller/Dcquery.php

+ 47 - 30
.idea/workspace.xml

@@ -25,7 +25,7 @@
       <file leaf-file-name="Doctors.php" pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/application/manage/controller/Doctors.php">
           <provider selected="true" editor-type-id="text-editor">
-            <state vertical-scroll-proportion="-153.29033">
+            <state vertical-scroll-proportion="0.0">
               <caret line="225" column="14" selection-start-line="225" selection-start-column="8" selection-end-line="225" selection-end-column="14" />
               <folding />
             </state>
@@ -35,7 +35,7 @@
       <file leaf-file-name="Index.php" pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/application/inter/controller/Index.php">
           <provider selected="true" editor-type-id="text-editor">
-            <state vertical-scroll-proportion="-5.677419">
+            <state vertical-scroll-proportion="0.0">
               <caret line="13" column="31" selection-start-line="13" selection-start-column="31" selection-end-line="13" selection-end-column="31" />
               <folding>
                 <marker date="1538980832890" expanded="true" signature="895:939" placeholder="select count... templates" />
@@ -47,7 +47,7 @@
       <file leaf-file-name="Messages.php" pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/application/inter/controller/Messages.php">
           <provider selected="true" editor-type-id="text-editor">
-            <state vertical-scroll-proportion="-17.032259">
+            <state vertical-scroll-proportion="0.0">
               <caret line="40" column="5" selection-start-line="40" selection-start-column="5" selection-end-line="40" selection-end-column="5" />
               <folding />
             </state>
@@ -57,9 +57,11 @@
       <file leaf-file-name="Login.php" pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/application/inter/controller/Login.php">
           <provider selected="true" editor-type-id="text-editor">
-            <state vertical-scroll-proportion="-0.7096774">
-              <caret line="61" column="46" selection-start-line="61" selection-start-column="46" selection-end-line="61" selection-end-column="46" />
-              <folding />
+            <state vertical-scroll-proportion="-9.225806">
+              <caret line="73" column="46" selection-start-line="73" selection-start-column="46" selection-end-line="73" selection-end-column="46" />
+              <folding>
+                <marker date="1536866580312" expanded="true" signature="2344:2515" placeholder="SELECT m.id,... menu" />
+              </folding>
             </state>
           </provider>
         </entry>
@@ -67,13 +69,25 @@
       <file leaf-file-name="Dcquery.php" pinned="false" current-in-tab="true">
         <entry file="file://$PROJECT_DIR$/application/inter/controller/Dcquery.php">
           <provider selected="true" editor-type-id="text-editor">
-            <state vertical-scroll-proportion="0.46434784">
-              <caret line="121" column="51" selection-start-line="121" selection-start-column="51" selection-end-line="121" selection-end-column="51" />
+            <state vertical-scroll-proportion="0.5408696">
+              <caret line="127" column="37" selection-start-line="127" selection-start-column="37" selection-end-line="127" selection-end-column="37" />
               <folding />
             </state>
           </provider>
         </entry>
       </file>
+      <file leaf-file-name="Index.php" pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/application/index/controller/Index.php">
+          <provider selected="true" editor-type-id="text-editor">
+            <state vertical-scroll-proportion="-7.806452">
+              <caret line="15" column="29" selection-start-line="15" selection-start-column="29" selection-end-line="15" selection-end-column="29" />
+              <folding>
+                <element signature="e#227#256#0#PHP" expanded="true" />
+              </folding>
+            </state>
+          </provider>
+        </entry>
+      </file>
       <file leaf-file-name="Writereport.php" pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/application/inter/controller/Writereport.php">
           <provider selected="true" editor-type-id="text-editor">
@@ -125,8 +139,8 @@
         <option value="$PROJECT_DIR$/application/manage/controller/Doctors.php" />
         <option value="$PROJECT_DIR$/application/inter/controller/Base.php" />
         <option value="$PROJECT_DIR$/application/inter/controller/Writereport.php" />
-        <option value="$PROJECT_DIR$/application/index/controller/Index.php" />
         <option value="$PROJECT_DIR$/application/inter/controller/Messages.php" />
+        <option value="$PROJECT_DIR$/application/index/controller/Index.php" />
         <option value="$PROJECT_DIR$/application/inter/controller/Dcquery.php" />
       </list>
     </option>
@@ -177,6 +191,8 @@
       <foldersAlwaysOnTop value="true" />
     </navigator>
     <panes>
+      <pane id="Scratches" />
+      <pane id="Scope" />
       <pane id="ProjectPane">
         <subPane>
           <PATH>
@@ -377,8 +393,6 @@
           </PATH>
         </subPane>
       </pane>
-      <pane id="Scratches" />
-      <pane id="Scope" />
     </panes>
   </component>
   <component name="PropertiesComponent">
@@ -792,7 +806,6 @@
       <provider selected="true" editor-type-id="text-editor">
         <state vertical-scroll-proportion="0.3269565">
           <caret line="36" column="90" selection-start-line="36" selection-start-column="90" selection-end-line="36" selection-end-column="90" />
-          <folding />
         </state>
       </provider>
     </entry>
@@ -814,50 +827,54 @@
     </entry>
     <entry file="file://$PROJECT_DIR$/application/manage/controller/Doctors.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state vertical-scroll-proportion="-153.29033">
+        <state vertical-scroll-proportion="0.0">
           <caret line="225" column="14" selection-start-line="225" selection-start-column="8" selection-end-line="225" selection-end-column="14" />
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/application/inter/controller/Login.php">
+    <entry file="file://$PROJECT_DIR$/application/inter/controller/Index.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state vertical-scroll-proportion="-0.7096774">
-          <caret line="61" column="46" selection-start-line="61" selection-start-column="46" selection-end-line="61" selection-end-column="46" />
-          <folding />
+        <state vertical-scroll-proportion="0.0">
+          <caret line="13" column="31" selection-start-line="13" selection-start-column="31" selection-end-line="13" selection-end-column="31" />
+          <folding>
+            <marker date="1538980832890" expanded="true" signature="895:939" placeholder="select count... templates" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/application/index/controller/Index.php">
+    <entry file="file://$PROJECT_DIR$/application/inter/controller/Messages.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state vertical-scroll-proportion="0.22956522">
-          <caret line="10" column="29" selection-start-line="10" selection-start-column="29" selection-end-line="10" selection-end-column="29" />
+        <state vertical-scroll-proportion="0.0">
+          <caret line="40" column="5" selection-start-line="40" selection-start-column="5" selection-end-line="40" selection-end-column="5" />
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/application/inter/controller/Index.php">
+    <entry file="file://$PROJECT_DIR$/application/inter/controller/Login.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state vertical-scroll-proportion="-5.677419">
-          <caret line="13" column="31" selection-start-line="13" selection-start-column="31" selection-end-line="13" selection-end-column="31" />
+        <state vertical-scroll-proportion="-9.225806">
+          <caret line="73" column="46" selection-start-line="73" selection-start-column="46" selection-end-line="73" selection-end-column="46" />
           <folding>
-            <marker date="1538980832890" expanded="true" signature="895:939" placeholder="select count... templates" />
+            <marker date="1536866580312" expanded="true" signature="2344:2515" placeholder="SELECT m.id,... menu" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/application/inter/controller/Messages.php">
+    <entry file="file://$PROJECT_DIR$/application/index/controller/Index.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state vertical-scroll-proportion="-17.032259">
-          <caret line="40" column="5" selection-start-line="40" selection-start-column="5" selection-end-line="40" selection-end-column="5" />
-          <folding />
+        <state vertical-scroll-proportion="-7.806452">
+          <caret line="15" column="29" selection-start-line="15" selection-start-column="29" selection-end-line="15" selection-end-column="29" />
+          <folding>
+            <element signature="e#227#256#0#PHP" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/application/inter/controller/Dcquery.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state vertical-scroll-proportion="0.46434784">
-          <caret line="121" column="51" selection-start-line="121" selection-start-column="51" selection-end-line="121" selection-end-column="51" />
+        <state vertical-scroll-proportion="0.5408696">
+          <caret line="127" column="37" selection-start-line="127" selection-start-column="37" selection-end-line="127" selection-end-column="37" />
           <folding />
         </state>
       </provider>

+ 10 - 2
application/inter/controller/Dcquery.php

@@ -96,7 +96,7 @@ class Dcquery extends Controller
         $info = array();
         $study_info = DB::table('studies')->where('id',$study_id)->field('studyuid,studyid,patient_id')->find();
         $info['studyInstanceUid'] = $study_info['studyuid'];
-        $patient_info = DB::table('patient_infos')->where('id',$study_info['patient_id'])->field('institution_id,temp_patient_id,name,age,sex')->find();
+        $patient_info = DB::table('patient_infos')->where('id',$study_info['patient_id'])->field('birthday,institution_id,temp_patient_id,name,age,sex')->find();
         $date = DB::table('exams')->where('patient_id',$study_info['patient_id'])->field('exam_datetime')->find();
         $institution = DB::table('institution')->where('id',$patient_info['institution_id'])->field('name')->find();
         $info['patientName'] = $patient_info['name'];
@@ -118,7 +118,15 @@ class Dcquery extends Controller
         $info['seriesList'] = $series;
         $return  = array();
         $return['transactionId'] = $study_info['studyuid'];
-        $info['patientAge'] = $patient_info['age'];
+        if(!empty($patient_info['age'])){
+            $info['patientAge'] = $patient_info['age'];
+        }elseif(!empty($patient_info['birthday'])){
+            $time = date('Ymd',time());
+            $age = floor(($time - $patient_info['birthday'])/10000);
+            $info['patientAge'] =  $age;
+        }else{
+            $info['patientAge'] = '';
+        }
         $info['patientSex'] = $patient_info['sex'];
         $info['studyDate'] = $date['exam_datetime'];
         $info['studyid'] = $study_info['studyid'];