|
@@ -1812,6 +1812,100 @@ func (c *PatientApiController) ExecDoctorAdvice() {
|
1812
|
1812
|
}
|
1813
|
1813
|
}
|
1814
|
1814
|
|
|
1815
|
+ //针对异常未出库问题的脚本
|
|
1816
|
+ //if adminInfo.Org.Id == 10402 {
|
|
1817
|
+ //
|
|
1818
|
+ // newadviceInfo := &models.HisDoctorAdviceInfo{
|
|
1819
|
+ // ID: advice.ID,
|
|
1820
|
+ // UserOrgId: advice.UserOrgId,
|
|
1821
|
+ // PatientId: advice.PatientId,
|
|
1822
|
+ // HisPatientId: advice.HisPatientId,
|
|
1823
|
+ // AdviceType: advice.AdviceType,
|
|
1824
|
+ // AdviceDate: advice.AdviceDate,
|
|
1825
|
+ // StartTime: advice.StartTime,
|
|
1826
|
+ // AdviceName: advice.AdviceName,
|
|
1827
|
+ // AdviceDesc: advice.AdviceDesc,
|
|
1828
|
+ // ReminderDate: advice.ReminderDate,
|
|
1829
|
+ // SingleDose: advice.SingleDose,
|
|
1830
|
+ // SingleDoseUnit: advice.SingleDoseUnit,
|
|
1831
|
+ // PrescribingNumber: advice.PrescribingNumber,
|
|
1832
|
+ // PrescribingNumberUnit: advice.PrescribingNumberUnit,
|
|
1833
|
+ // DeliveryWay: advice.DeliveryWay,
|
|
1834
|
+ // ExecutionFrequency: advice.ExecutionFrequency,
|
|
1835
|
+ // AdviceDoctor: advice.AdviceDoctor,
|
|
1836
|
+ // Status: advice.Status,
|
|
1837
|
+ // CreatedTime: advice.CreatedTime,
|
|
1838
|
+ // UpdatedTime: advice.UpdatedTime,
|
|
1839
|
+ // AdviceAffirm: advice.AdviceAffirm,
|
|
1840
|
+ // Remark: advice.Remark,
|
|
1841
|
+ // StopTime: advice.StopTime,
|
|
1842
|
+ // StopReason: advice.StopReason,
|
|
1843
|
+ // StopDoctor: advice.StopDoctor,
|
|
1844
|
+ // StopState: advice.StopState,
|
|
1845
|
+ // ParentId: advice.ParentId,
|
|
1846
|
+ // ExecutionTime: advice.ExecutionTime,
|
|
1847
|
+ // ExecutionStaff: advice.ExecutionStaff,
|
|
1848
|
+ // ExecutionState: advice.ExecutionState,
|
|
1849
|
+ // Checker: advice.Checker,
|
|
1850
|
+ // RecordDate: advice.RecordDate,
|
|
1851
|
+ // DialysisOrderId: advice.DialysisOrderId,
|
|
1852
|
+ // CheckTime: advice.CheckTime,
|
|
1853
|
+ // CheckState: advice.CheckState,
|
|
1854
|
+ // DrugSpec: advice.DrugSpec,
|
|
1855
|
+ // DrugSpecUnit: advice.DrugSpecUnit,
|
|
1856
|
+ // Groupno: advice.Groupno,
|
|
1857
|
+ // RemindType: advice.RemindType,
|
|
1858
|
+ // FrequencyType: advice.FrequencyType,
|
|
1859
|
+ // DayCount: advice.DayCount,
|
|
1860
|
+ // WeekDay: advice.WeekDay,
|
|
1861
|
+ // TemplateId: advice.TemplateId,
|
|
1862
|
+ // Modifier: advice.Modifier,
|
|
1863
|
+ // DrugId: advice.DrugId,
|
|
1864
|
+ // Price: advice.Price,
|
|
1865
|
+ // PrescriptionId: advice.PrescriptionId,
|
|
1866
|
+ // MedListCodg: advice.MedListCodg,
|
|
1867
|
+ // FeedetlSn: advice.FeedetlSn,
|
|
1868
|
+ // Day: advice.DayCount,
|
|
1869
|
+ // ChildDoctorAdvice: nil,
|
|
1870
|
+ // Drug: models.Drug{},
|
|
1871
|
+ // Diagnosis: advice.Diagnosis,
|
|
1872
|
+ // Way: advice.Way,
|
|
1873
|
+ // HospApprFlag: advice.HospApprFlag,
|
|
1874
|
+ // LmtUsedFlag: advice.LmtUsedFlag,
|
|
1875
|
+ // HisOrderInfo: models.HisOrderInfo{},
|
|
1876
|
+ // IsMedicine: advice.IsMedicine,
|
|
1877
|
+ // ExecutionFrequencyId: advice.ExecutionFrequencyId,
|
|
1878
|
+ // Child: nil,
|
|
1879
|
+ // IsSettle: advice.IsSettle,
|
|
1880
|
+ // IsMobile: advice.IsMobile,
|
|
1881
|
+ // IsSelfDrug: advice.IsSelfDrug,
|
|
1882
|
+ // DrugWayCount: advice.DrugWayCount,
|
|
1883
|
+ // }
|
|
1884
|
+ // outListExport, _ := service.GetWarehouseOutListExport(advice.DrugId, advice.PatientId, advice.AdviceDate, advice.ID)
|
|
1885
|
+ //
|
|
1886
|
+ // var out_count int64
|
|
1887
|
+ // if len(outListExport) > 0 {
|
|
1888
|
+ // for _, item := range outListExport {
|
|
1889
|
+ // if item.CountUnit == medical.MaxUnit && medical.MaxUnit != medical.MinUnit {
|
|
1890
|
+ // out_count = item.Count * medical.MinNumber
|
|
1891
|
+ // }
|
|
1892
|
+ // if item.CountUnit == medical.MinUnit && medical.MaxUnit != medical.MinUnit {
|
|
1893
|
+ // out_count = item.Count
|
|
1894
|
+ // }
|
|
1895
|
+ // if item.CountUnit == medical.MaxUnit && medical.MaxUnit == medical.MinUnit {
|
|
1896
|
+ // out_count = item.Count * medical.MinNumber
|
|
1897
|
+ // }
|
|
1898
|
+ //
|
|
1899
|
+ // }
|
|
1900
|
+ // }
|
|
1901
|
+ // //按最小单位出库
|
|
1902
|
+ // var cha_count = prescribing_number_total - out_count
|
|
1903
|
+ //
|
|
1904
|
+ // newadviceInfo.PrescribingNumber = float64(cha_count)
|
|
1905
|
+ // newadviceInfo.PrescribingNumberUnit = medical.MinUnit
|
|
1906
|
+ // service.NewHisDrugsDelivery(advice.UserOrgId, creater, newadviceInfo, tx)
|
|
1907
|
+ //}
|
|
1908
|
+
|
1815
|
1909
|
}
|
1816
|
1910
|
}
|
1817
|
1911
|
|