Robert Cemper · Jan 29, 2018 go to post

suggested steps:

#1)Add   Property Experiment As %String;   to     Class SCHED.TracerEntry

#2) Write a Utility  Class to move  the existing content from  SCHED.SchedEntry.Experiment in to the all List entries.

#3)
If you are satisfied and all methods access the new location of Experiment​
You may remove all old content of  SCHED.SchedEntry.Experiment . Set it to ""
and set the property to INTERNAL, PRIVATE or just delete SCHED.SchedEntry.Experiment . BUT don't touch the storage map! 

This is not a necessary step but just kind of clean up.

Robert Cemper · Jan 29, 2018 go to post

NOTE:  I had commented out the two &html lines in the Testing Method... and doing a Ctrl-O still work.

Most likely your browser displays a cached version.
Clean all caches on the way to browser and you will see the changes. It's a principle issue.
with <input type="file" /> you select a file name local to your browser. That's just pure HTML.

And what you have in hands is a file reference. Not the file itself.
So what you may do next is to SUBMIT it to server.
 
But scanning your menu you expect to open, modify, copy, ...  
That's nothing to be done from Browser but by a local application.

 

Robert Cemper · Jan 25, 2018 go to post

the only effect is a smaller resultset of the subquery.
it doesn't speed up the inner collection /sort process (+ inner  WHERE ) before TOP is applied.

I'm with you it's not intuitive and I think TOP ALL could be a default.  But that's not happening. 

Robert Cemper · Jan 25, 2018 go to post

In principle OK.
But also ODBC or JDBC connection have timeouts limits. Though  they are typically longer than CSP.

Robert Cemper · Jan 25, 2018 go to post

Yeah!
it's not only no timeout but you can easy debug all your SQLCOMPUTED  code.

Robert Cemper · Jan 24, 2018 go to post
select *, %vid from (select * from UACCESSRIGHT order by RIGHTID) 
failed on wrong syntax

If you use ORDER BY in a SubSELECT you have to add a TOP clause as well. e.g.

select *, %vid from (select TOP ALL * from UACCESSRIGHT order by RIGHTID)  where %vid between 10 and 20

Robert Cemper · Jan 24, 2018 go to post

Postcondition is preferred
especially  quit:error     or   continue:ignore

for i=1:1:5 write i," "     is as fine as    for i=1:1:5 {  write i," " } write "end"

but this is really bad:

         f i=1:1:5 d  w "? "
          .w i," "
         w "end"
Robert Cemper · Jan 22, 2018 go to post

I see 2 options

#1) 

add the ChangeItem holding the last change in addition to your list of Objects.
and add the appiopriate indices.
like this:

Class Rick.ChangeList Extends %Persistent
{
  Property Title As %String;
  Property Changes As list Of Rick.ChangeItem;
/// Last change added to list
  Property Last As Rick.ChangeItem;
  Index xlast On Last.Change;
}

 

This looks simple but it requires that any program that adds a change also 
updates the "Last" property.
If this isn't feasible you may use %OnBeforeAddToSaveSet() or similar to insert you "Last" object during %Save().
It requires more space on disk and is not redundant.
It doesn't generate entries for existent records.This requires a special update exercise.

#2)

Add the property to be indexed as SqlComputed and index it.
This is not so speedy but gives you the flexibility not just check the last element
and has no impact or dependency on any existing code using it.

Class Rick.ChangeList Extends %Persistent
{
  Property Title As %String;
  Property Changes As list Of Rick.ChangeItem;
  Property lastDate As %TimeStamp [ Calculated, SqlComputed ,
          SqlComputeCode = { set {*} = ##class(Rick.ChangeList).ChangeDate({ID}) }];
Index xdate On lastDate [ Data = lastText ];
}
ClassMethod ChangeDate(ID As %Integer)
{
  set obj=##class(Rick.ChangeList).%OpenId(ID)    
     ,item=obj.Changes.GetAt(obj.Changes.Count())
   quit item.Change
}
Robert Cemper · Jan 19, 2018 go to post

what you describe sounds pretty much like code management, versioning.
these tools depend on appropriate plugins to Word, EXCEL, Eclipse, ....
to trap the SAVE in the appropriate "editor"

BUT this always means to have a specific piece of code installed on your client if you expect some "automatic" upload.
This thing may upload/download your documents over HTTP, WebSockets or whatever.
browsers should NEVER be allowed to access your local machine without manual confirmation.

Robert Cemper · Jan 19, 2018 go to post

#1)
authentication is switched on/off  in Mgmt Portal 
 System > Security Management > Web Applications and bound to the specific WebApplication

#2)​ 
CSP has typically a persistent %session object. 
You can that switch off by a Class parameter. 
#3) You have 2 typical places for private Classmethods:

OnPreHTTP() before anything goes back to browser or similar. 
You typically place your private authentication there.
http://docs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls?…
OnPage() which means when you have already replied with an HTTP header...

Some Example

Class csp.NoSession Extends %CSP.Page
{
/// This parameter controls the CSP session support. By default CSP will use a persistent session
/// which holds a license until the session is ended or times out. If you override this then this
/// CSP page will use a transient session which is never persisted.
Parameter UseSession As BOOLEAN = 0;
ClassMethod OnPage() As %Status
{
    &html<<html><head></head><body><pre>
    <h3> %session dump </h3>
 >
    zwrite %session
    write "<h3> %request dump </h3>",!
    zwrite %request
    write "<h3> %response dump </h3>",!
    zwrite %response
 &html<
 </pre></server></body></html>>
    Quit $$$OK
}
/// Event handler for <b>PreHTTP</b> event: this is invoked before
/// the HTTP headers for a CSP page have been sent. All changes to the
/// <class>%CSP.Response</class> class, such as adding cookies, HTTP headers,
/// setting the content type etc. must be made from within the OnPreHTTP() method.
/// Also changes to the state of the CSP application such as changing
/// %session.EndSession or %session.AppTimeout must be made within the OnPreHTTP() method.
/// It is prefered that changes to %session.Preserve are also made in the OnPreHTTP() method
/// as this is more efficient, although it is supported in any section of the page.
/// Return <b>0</b> to prevent <method>OnPage</method> from being called.
ClassMethod OnPreHTTP() As %Boolean [ ServerOnly = 1 ]
{
   
quit $$$OK
}
}
Robert Cemper · Jan 19, 2018 go to post
I found method GetJWT gets called with localpriv and localpub as parameters
ClassMethod GetJWK(JWKS As %DynamicObject, Alg As %String, Kid As %String) As %DynamicObject
{
 Set arr=JWKS.keys                ;line +1
 Set iter=arr.%GetIterator()      ;line +2

But there is no array keys  and no %DynamicArray object found. 
so it fails on  %GetIterator().

              my guess {"keys":[  .... ]}  could be the solution. 

w localpriv
{ "kty": "RSA"
, "n": "s0hguxNL5Xb6_Fk3u_fnZrUXuRnjj1wIEGXlsnqbu4rptiDYeX9dEQm29eDe5fhXWjrPtU33WA_zz0Y9R5z7EaX4ZlZG7PlFlm5vu3bEu-qeuMp8Xb3hPMyND-87JGrbB1t5i-BgMpjQoelhYT8iqzE1fEtUGYyNn2dhSwIVwqIaRt4ly65oyW9Ea7VL92kmCEgUmIn-lrEfvygfbEL2H-9dW42dAMvEwLCQGM7iX1zuHRAH9Ec9kwnaBb2kfHzoSJXZm5WcuPYJIWZrvu1RbHcZBFff0GwCDTH1bfECmr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OSqhqoz4Wia0a9tyfJ_FUG8urMT6dUkPKk"
, "qi": "WsLO8yNdoSMF3sYAISKhx_NJ5ua6PISaezUpYk6WgENHfUnwXXiDpDgx8AKae2vRpPaGoHhJkiih5JHTtVWNGUXB0-DItnX0jodM78NT31XefKuE4Pg6nLtrpPlQpRqL6Gj1en2FcVtQ5TblOaFO9dkBoBB-gGWK9dy0WPR5D9w"
}
w localpub
{"kty":"RSA"
,"use":"sig"
,"n":"ALaMFdNTmzUu1wnMGNmsIkBMJUS4EdMAe2HXpQ-k4aDk94znJuCi9OJnJQU4lm4nqgEWdzMVVQMlqZ3ihlXx5vpFzmb4m4EkAcmK0ULVCLL9QRqvuwbOjeXW8pJlcH-EAQKnkMzF6GbtmmDubK46bx2GaQh8rLYAfLvoIwXfyrXIday2VdRNz_3yGzLoxr5QxcFml46479mY3xXwmTSMvVNHEN4F1xPnsLQoNPH3guA104dm8S-f2z_vczHBdSrgiJibesdOP3ugYlxJvDDT3WSf3WW7cjAn8M3vZmCNTPWe6JEewsc6cDBiFWn9UUomulFUV_uucTsV_NXMd8nQ_Hs"
,"e":"AQAB"
}
Robert Cemper · Jan 18, 2018 go to post

just for better readability of the audience I transformed your WHEN condition that dictates speed.

(HL7.{MSH:MessageType.TriggerEvent}!="S14")
&&
(HL7.{MSH:SendingFacility.NamespaceID} CONTAINS "CASE")
&&
(
 (HL7.{RGSgrp(1).AIL:LocationResourceID(1).Room} CONTAINS "OSU UH ENDO")
 ||
 (HL7.{RGSgrp(1).AIL:LocationResourceID(1).Room} CONTAINS "OSU UH BRONC")
 ||
 (HL7.{RGSgrp(1).AIL:LocationResourceID(1).Room} CONTAINS "OSU UHE ENDO")
 ||
 (HL7.{RGSgrp(1).AIL:LocationResourceID(1).Room} CONTAINS "OSU UHE BRONC")
 ||
 (HL7.{RGSgrp(1).AIL:LocationResourceID(1).Room} CONTAINS "OSU STONERIDGE ENDO")
 ||
 (
  (HL7.{RGSgrp(1).AIL:LocationResourceID(1).Room} StartsWith "MER")
  &&
  GroupIDExists(HL7,"AIS","3.1","GIProvationMERProcedures")
 )
 ||
 (
  (
   (HL7.{RGSgrp(1).AIL:LocationResourceID(1).Room} StartsWith "ONT ENDO")
   ||
   (HL7.{RGSgrp(1).AIL:LocationResourceID(1).Room} StartsWith "GAL OR")
   ||
   (HL7.{RGSgrp(1).AIL:LocationResourceID(1).Room} StartsWith "GAL ENDO")
   ||
   (HL7.{RGSgrp(1).AIL:LocationResourceID(1).Room} StartsWith "BUC OR")
  )
  &&
  GroupIDExists(HL7,"AIS","3.1","GIProvationAVIProcedures")
 )
 ||
 (
  ((HL7.{RGSgrp(1).AIL:LocationResourceID(1).Room} StartsWith "HOC OR")
  ||
  (HL7.{RGSgrp(1).AIL:LocationResourceID(1).Room} StartsWith "HOC ENDO")
  )
  &&
  GroupIDExists(HL7,"AIS","3.1","GIProvationHOCProcedures")
 )

It shows me that you basically check on  (HL7.{RGSgrp(1).AIL:LocationResourceID(1).Room}
I see not much opportunity for optimization of CONTAINS
But for your StartsWith you may try this construct:

  In(SubString((HL7.{RGSgrp(1).AIL:LocationResourceID(1).Room},1,6),"HOC OR","HOC EN")
or
 In(SubString((HL7.{RGSgrp(1).AIL:LocationResourceID(1).Room},1,6),"ONT EN","GAL OR","GAL EN",BUC OR")

An HealthShare expert might be able to answer if it is possible to have an index on the fields of your WHEN condition.

A different approach could be to handle the whole WHEN in a Custom Utility Function

http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY…

Robert Cemper · Jan 17, 2018 go to post

the code is already included in the CSP example
the file comes a MIME data in %request:

for easier reading compile the CSP file and see the generated class   csp.upload.cls  in SAMPLES


<!-- As form is submitted to this page look to see if we have the stream in the %request object -->
<csp:if condition='($data(%request.MimeData("FileStream",1)))'>
<hr><br>
Submitted filename: <b>#(..EscapeHTML(%request.MimeData("FileStream",1).FileName))#</b><br>
Size of file: <b>#(..EscapeHTML(%request.MimeData("FileStream",1).Size))#</b><br>
Mime Section: <b>#(..EscapeHTML(%request.MimeData("FileStream",1).MimeSection))#</b><br>
Type of stream: <b>#(..EscapeHTML($classname(%request.MimeData("FileStream",1))))#</b><br>
Content Type: <b>#(..EscapeHTML(%request.MimeData("FileStream",1).ContentType))#</b><br>
<br>
First 200 characters of stream:<br>
<ul>
<script language="Cache" runat="server">
 

See also doc on %CSP.Request

http://docs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls?…

Robert Cemper · Jan 17, 2018 go to post

It seems you try to call ans Action that is not defined / compiled

  /// Get class name for a message descriptor class for this web method based on the SOAPAction
Method GetMsgClass(action As %String, messageChildlist As %Integer, Output methodName As %String, bodyStream As %GlobalCharacterStream = "") As %String [ Internal, ServerOnly = 1 ]
{
Set (methodName,className,msgClass,methodList)=""
Set class=$classname()
Set methodList=$get($$$SOAPParametersSoapActionList(class,action))
>>>> this is line +3   ^^^^^^^^^^^^^^^^^^^^^^^^^^^

this translates to and there is no attempt to write something. 

#define SOAPParametersSoapActionList(%class,%soapAction) ^oddCOM(%class,$$$cCLASSxmldata,"P",0,"soapAction",$select(%soapAction="":$c(0),1:%soapAction))

But finally: . . . .  stNow"),h:\dev5\</text>

Does your Caché Server Instance have access right to  the bolded directory location ????  This smells like  <PROTECT>
 

Robert Cemper · Jan 16, 2018 go to post

Hey, Nicole

That's excellent !!!

What ever I click on shows up in "Atelier Documentation" Tab.

Thanks for the hint! yes

Robert Cemper · Jan 15, 2018 go to post

You may try to cheat it by changing the <input> tag to 

    <input type=file size=30 name=FileStream onchange="javascript: alert(this.value);">

and you get in CHROME  and Firefox

C:\fakepath\EUR_Meldung.pdf

and fakepath doesn't exist obviously

while IE11 and EDGE on Windows10 tell me the real path (!)

C:\Users\ich\Desktop\EUR\EUR_Meldung.pdf

I give no further comment related to security & privacy on products from M$

Robert Cemper · Jan 15, 2018 go to post

OK, you look for something different than I understood.

The CLASS REFERENCE to DocBook seems to be not directly available as in Studio.
Just by external  access to Documentation ....
Part of it is found if you have an class in your editor and move your cursor over a class name
then you get a volatile class description that you can nail down by clicking or <F2>
Its's pretty similar to the DocBook version EXCEPT that you have no further references (e.g. Data Types or %Status or  ...)
So it's not a multi level navigation like in browser!
For illustration I have done this for %Persitent.  For %Populate, %XML.Adaptor you have do again and again.

 

Robert Cemper · Jan 15, 2018 go to post

Easier:

in tab Server Explorer clickk to ADD NEW Sever Connection  (green cross)

Robert Cemper · Jan 15, 2018 go to post

Could you pls. be a little bit more precise in what context you expect the reference?
A screenshot would be nice to explain your issue.

Robert Cemper · Jan 12, 2018 go to post

To my understanding the structure of your global is irrelevant in this context.
If you want to use sharding forget about ALL global access.
You only access works over SQL !  (at least at the moment, objects may follow in some future)
It's the decision of the sharing logic where and how data are stored in globals.
If you ignore this and continue with direct global access you have a good chance to break it.

Robert Cemper · Jan 8, 2018 go to post

This naming "mistake" of %ZEN caused a lot of extra checks and workarounds that we may have to carry around forever. crying
My personal proposal "CSP#"  written as CSPXX (CSPX was already used by Ensemble) didn't win the  internal naming contest. wink
Guess why.  laugh
 

Robert Cemper · Jan 7, 2018 go to post

List of supported nnenmonics for ANSI terminals (X364)

%X364 ; BINDING FOR ANSI X3.64 NAMESPACE, NOV/92 ; LRS952 06/07/05
  
APC ; Application program command
BEL ; Ring the bell
CBT(%1) ; Cursor backward tabulation %1 tab stops
CCH ; Cancel character
CHA(%1) ; Cursor horizontal absolute (move to column %1)
CHT(%1) ; Cursor horizontal tabulation (forward %1 tab stops)
CNL(%1) ; Cursor next line (cursor down %1 lines)
CPL(%1) ; Cursor preceding line (cursor up %1 lines)
CPR ; Cursor position report (return in $KEY)
CTC(%1,%2,%3,%4,%5,%6,%7,%8,%9) ; Cursor tabulation control
CUB(%1) ; Cursor backward %1 columns
CUD(%1) ; Cursor down %1 lines
CUF(%1) ; Cursor forward %1 columns
CUP(%2,%1) ; Cursor position (column %1, line %2)
CUU(%1) ; Cursor up %1 lines
CVT(%1) ; Cursor vertical tabulation
DAQ(%1,%2,%3,%4,%5,%6,%7,%8,%9) ; Define area qualification
DCH(%1) ; Delete %1 characters
DCS ; Device control string
DL(%1) ; Delete %1 lines
DSR(%1) ; Device status report - type %1 - return in $KEY
EA(%1) ; Erase in area
ECH(%1) ; Erase %1 characters
ED(%1) ; Erase in display (%1=0 cursor-to-end,1 begin-to-cursor,2 entire scr)
EF(%1) ; Erase in field
EL(%1) ; Erase in line (%1=0 cursor-to-end, 1 begin-to-cursor, 2 entire line)
EPA ; End of protected area
ESA ; End of selected area
HPA(%1) ; Horizontal position attribute (cursor to column %1)
HPR(%1) ; Horizontal position relative (cursor forward %1 columns)
HTJ ; Horizontal tab with justify
HTS ; Horizontal tabulation set
HVP(%1,%2) ; Horizontal and vertical position (column %1, line %2)
ICH(%1) ; Insert %1 characters
IL(%1) ; Insert %1 lines
IND ; Index
INT ; Interrupt
MC ; Media copy
MW ; Message waiting
NEL ; Next line
NP(%1) ; Next page (advance %1 pages of terminal display memory)
OSC ; Operating system command
PLD ; Partial line down
PLU ; Partial line up
PM ; Privacy message
PP(%1) ; Preceding page (backup %1 pages of terminal display memory)
PU1 ; Private use one
PU2 ; Private use two
REP ; Repeat
RI ; Reverse index
RIS ; Reset to initial state
RM(%1,%2,%3,%4,%5,%6,%7,%8,%9) ; Reset mode
SEM ; Select editing extent mode
SGR(%1,%2,%3,%4,%5,%6,%7,%8,%9) ; Select graphic rendition %1 thru %9
SM(%1,%2,%3,%4,%5,%6,%7,%8,%9) ; Set mode
SPA ; Start of protected area
SS2 ; Single shift two
SS3 ; Single shift three
SSA ; Start of selected area
ST ; String terminator
STS ; Set transmit state
SU ; Scroll up
TBC ; Tabulation clear
VPA(%1) ; Vertical position attribute (move to row %1 at same column)
VPR(%1) ; Vertical position relative (move down %1 lines at same column)
VTS ; Vertical tabulation sets

Robert Cemper · Jan 6, 2018 go to post

This was more a code correction exercise. 
Honestly I wouldn't have done it that way at all. But using %XML.TextReader instead.
It was just to late in the evening to do a pretty solution.
The next auditor may do it.
 

BTW. for Attributes it'S %lev+1*3