日期:2014-05-17 浏览次数:20735 次
declare curn cursor for select ActionId,ItemId,GroupID ,Medicare,MedicareRate,BeginTime ,[Name],[Type],Category ,Code,Usage,TotalDosage ,TotalDosageUnit,OneDosageUnit,Frequency ,PackQty,OneDosage,BaseQty ,Drugstore,AdviceItem,ChildrenRate ,CurDoctorId,CurDoctorName,Remark,AdviceId from emrPrescribe where PatientNo=@PatientNo and ExecuteTime=@ExecuteTime open curn fetch next from curn into @Actionid,@ItemId,@GroupID ,@Medicare,@MedicareRate,@BeginTime ,@Name,@Type,@Category ,@Code,@Usage,@TotalDosage ,@TotalDosageUnit,@OneDosageUnit,@Frequency ,@PackQty,@OneDosage,@BaseQty ,@Drugstore,@AdviceItem,@ChildrenRate ,@CurDoctorId,@CurDoctorName,@Remark,@AdviceId WHILE (@@fetch_status = 0) begin exec submitToLis --@Actionid @lisid ,@Code ,@AdviceItem ,@BaseQty ,@AdviceCount ,@zd exec submitDrugsToHis @PatientNo ,@Actionid ,@tmpGroupid ,@DeptName ,@Name ,@Code ,@Quantity ,@Unit ,@DrugstoreType ,@DCAType end fetch next from curn into @Actionid,@ItemId,@GroupID ,@Medicare,@MedicareRate,@BeginTime ,@Name,@Type,@Category ,@Code,@Usage,@TotalDosage ,@TotalDosageUnit,@OneDosageUnit,@Frequency ,@PackQty,@OneDosage,@BaseQty ,@Drugstore,@AdviceItem,@ChildrenRate ,@CurDoctorId,@CurDoctorName,@Remark,@AdviceId end close curn deallocate curn