go to post Scott Beeson · Oct 11, 2016 I'll take a look at those docs, but I really like having direct access to my data so I can use it however I need (for instance in my custom dashboard, in a weekly report, manipulate it in Excel, etc, etc). I don't want my data to be trapped in Zen or require Cache code to retrieve. I actually have a SQL query that will give the average response time of a request for a given date range and message type: SELECT Name, AVG(ResponseTime) as AvgResponse FROM ( SELECT li.SessionId, li.name, datediff(ms,min(li.TimeCreated),max(lo.TimeCreated)) as ResponseTime FROM (Select h1.SessionId, TimeCreated, SAMLData_Organization, m1.name FROM ens.messageheader h1,HS_Message.XMLMessage m1 WHERE h1.MessageBodyId = m1.id) li LEFT JOIN (Select h2.SessionId, TimeCreated FROM ens.messageheader h2,HS_Message.XMLMessage m2 WHERE h2.MessageBodyId = m2.id) lo ON li.SessionId = lo.SessionId WHERE li.TimeCreated >= '2016-10-01' AND li.TimeCreated < '2016-10-02' AND Name = 'XDSB_QUERYREQUEST' GROUP BY li.SessionId ) GROUP BY Name
go to post Scott Beeson · Oct 11, 2016 After rereading this I'm even more confused. You are saying that you shouldn't query the data directly because those tables might not "stay the same"?
go to post Scott Beeson · Oct 11, 2016 I didn't know he had "Information Exchange". Are you sure he does?I've always been told performance was the reason for using my query environment and now you're saying it's because the data might be different or out of date??Also, I couldn't find the APIs you mentioned, can I get a link? Are these available in Healthshare or just this new "Information Exchange" sub-product?
go to post Scott Beeson · Oct 10, 2016 Everything except system metrics. Searches by CustomerDocuments in StorageAverage Query Response TimesNumber of ADTsetc.
go to post Scott Beeson · Oct 10, 2016 Thanks for the info! I found the statement, I believe, but I'm having trouble understanding. Quit $Case(pDT , "DT":$S(pVal?1(4N,6N,8N) &&($E(pVal,1,4)>1700)&&($E(pVal,1,4)<2200)&&(""=$E(pVal,5,6)||($E(pVal,5,6)>0&&($E(pVal,5,6)<=12)))&&(""=$E(pVal,7,8)||($E(pVal,7,8)>0&&($E(pVal,7,8)<=$Case($E(pVal,5,6),2:29,4:30,6:30,9:30,11:30,:31)))):$$$OK , 1:$$$ERROR($$$EnsErrGeneral,"Invalid date value '"_pVal_"' found for type '"_pDT_"' in segment "_$S($get(info("SegNum"))'="":info("SegNum")_":",1:"")_info("SegName")_", field "_info("fieldNum")_", repetition "_info("rep")_", component "_info("comp")_", subcomponent "_info("subComp")_".")) , "DTM":$S(pVal?1(4N,6N,8N,10N,12N,14N,14N1".".4N)&&(tZ?.1(1(1"+",1"-")4N)) &&($E(pVal,1,4)>1700)&&($E(pVal,1,4)<2200)&&(""=$E(pVal,5,6)||($E(pVal,5,6)>0&&($E(pVal,5,6)<=12)))&&(""=$E(pVal,7,8)||($E(pVal,7,8)>0&&($E(pVal,7,8)<=$Case($E(pVal,5,6),2:29,4:30,6:30,9:30,11:30,:31)))) &&(""=$E(pVal,9,10)||($E(pVal,9,10)>=0&&($E(pVal,9,10)<24)))&&(""=$E(pVal,11,12)||($E(pVal,11,12)>=0&&($E(pVal,11,12)<60)))&&(""=$E(pVal,13,14)||($E(pVal,13,14)>=0&&($E(pVal,13,14)<60))):$$$OK , 1:$$$ERROR($$$EnsErrGeneral,"Invalid date/time value '"_pVal_"' found for type '"_pDT_"' in segment "_$S($get(info("SegNum"))'="":info("SegNum")_":",1:"")_info("SegName")_", field "_info("fieldNum")_", repetition "_info("rep")_", component "_info("comp")_", subcomponent "_info("subComp")_".")) It looks like both `DT` and `DTM` require a format similar to "20161010" but what is up with the $Case($E(pVal,5,6),2:29,4:30,6:30,9:30,11:30,:31), this makes no sense to me. And why is it part of "DT" which seems to be date without time?
go to post Scott Beeson · Oct 10, 2016 Great answer. I work at an HIE, how come I've never heard of most of the "products"? Besides Patient Index, all these other things are new to me. Where can I find more info on the "Information Exchange" product? Can you purchase/implement these items separately or are they dependent upon each other? Where does the Clinical Viewer fit into this? How is Health Insight different that DeepSee?
go to post Scott Beeson · Oct 10, 2016 Try this: SELECT * FROM HS_SDA3_Streamlet.Encounter WHERE SourceMRN = '12345' (Replace 12345 with the MRN of the patient you want to list the records of) But as Robert mentioned, Intersystems does not recommend querying the tables directly. Do you know if you have a separate query environment set up by using the healthshare Mirror funtionality? The reason they don't recommend querying the live data directly is due to potential performance impact. But ultimately, that decision is up to you.
go to post Scott Beeson · Oct 10, 2016 This is all well and good but the whole point in a community like this is so that people don't have to call and subsequent users with similar questions have access to the information. I'm especially interested in the solution here.
go to post Scott Beeson · Oct 7, 2016 This explains it. And I'd heard this before, I guess it just really doesn't make sense to me. Sometimes it seems arbitrary which queries are fast and which are not.
go to post Scott Beeson · Oct 7, 2016 Thanks for the info. Since we're hosted by Intersystems I assume all that was taken into account :) I just want my data. :)
go to post Scott Beeson · Sep 12, 2016 Yeah the whole link menu has been a huge annoyance since day one.
go to post Scott Beeson · Aug 25, 2016 I actually have it set to e-x which should include data type validation, right?My question really is, how does that "DT" definition define a date? There's no regex or anything. How does it know if it should be YYYYMMDD HHMMSS or mm/dd/yy hh:mm:ss? <DataType name='DT' description='Date (2.8.13)'> <DataSubType piece='1' description='Date (2.8.13)'/> </DataType> doesn't really mean anything... does it?
go to post Scott Beeson · Aug 22, 2016 And just to provide some context to what I'm trying to accomplish, we have had numerous instances in the past where a customer started sending data we did not expect. In some cases, these changes technically met the schema and in other cases it violated it but we never had our productions set up to alert on validation exceptions. As a result of a few of these, I am currently doing a complete ADT remediation process where I am tightening the schemas and enabling alerting for validations on all namespaces.Is this not recommended? Do you have other input or advice?
go to post Scott Beeson · Aug 22, 2016 Thanks Dave, so how can you add "structure or length restrictions"?