Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
217 views
in Technique[技术] by (71.8m points)

sql - Dividing data -cache

[report]1

the attached code shows the result of each ward and it works well. I want just to divide the 5c ward into two wards in the report while it is one ward in the system. this ward is a mixed ward(5c) and I want to calculate the beds differently. I want to separate the beds of the 5c ward into two wards (5c-pediatric which has the first 6 beds of 5c and 5c-surgery which has the last 6 beds of 5c). I tried but I could not.

the the below shows each ward data. the desired report is to divide only 5c ward into 2 wards, we differeante the beds by the name if the bed name has pediatric means belong to pediatric and if the bed name has surgey means the bed belong to surgey

[the output of report]2

question from:https://stackoverflow.com/questions/65598821/dividing-data-cache

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

This question is more related to the internal InterSystems TrakCare structures rather than general SQL. Given the query you have you can't divide a ward into two because your query will return ward IDs and all further processing is done inside GetTotalRegular and ProcessData procedures presumably based on current ward ID. So you need to look into what those procedures are doing and in case of ward 5C process bed data into two rows or temporary globals rather than just one.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...