#Object Data Model

0 Followers · 499 Posts

An object data model is that data or code is composed of modules that combine data and procedures that work on the data.

Learn more.

Question sween · Dec 10, 2018

Hello,

I am pretty stuck here and would appreciate any help or advice on an approach to this...

I have a single claim file, ingested that has 7 claims inside of it, I am pulling each claim out based on a qualifier, then want to remove all of the others and do something with the one that is left over.

My problem is I cant seem to figure out how to Remove the Claims programatically...

1
0 310
Question Tirthankar Bachhar · Dec 3, 2018

Hi,

When we define a %String property, and don't mention any MAXLEN, by default it uses 50 as defined in class %Library.String.

As a result, when we try to save data more than 50 characters, it fails with below error.

ERROR #7201: Datatype value 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' length longer than MAXLEN allowed of 50

This is very challenging when we parse data and tries to store it in SDA3 structure, because in many places its always set to 50, which is not enough.

12
0 2032
Question Pravin Barton · Nov 20, 2018

For each instance of an XML-enabled class I want to control whether a property is projected as an empty element or not projected at all. With string properties, I can set the value as $c(0) for an empty element, or an empty string for no projection. But it looks like this isn't consistent for properties with type %Boolean or %Integer. With booleans $c(0) gets projected as "false". With integers $c(0) stays as a zero-width space in the XML output (which gives me a SAX parser error if I try to read it).

Is there a way to do this that works for all datatype properties?

2
0 666
Question Justin Wilson · Nov 9, 2018

I need to dynamically create a class based on a parameter passed into a class method.  Basically the method takes in a string that contains the name of the class I need to create a new instance of. 

I need something along these lines. 

ClassMethod someMethod(className As %String)
{
	set classObject = ##class(className).%New()

...
}

Trying to do this right results in a class not found error because it seems to be treating the variable as a literal string.

3
1 1195
Question Scott Roth · Oct 31, 2018

I am working on my first REST operation concept and had a question about the Property Parameters. If I put a value in CAPTION, does that mean that when I use it in my call that it will come out in the URL?

For example...

Property enumerationType As %String(CAPTION = "enumeration_type");

Then in my operation...

Set tURL=..Adapter.URL_"?q="_pRequest.enumerationType

so when it builds the URL it looks like...

3
0 448
Question Frank SERVAIS · Nov 1, 2018

I downloaded and installed the trial version of Caché.
it is installed in c:\intersystems\Trycache
I changed the system environment settings so that
GLOBALS_PATH = c:\intersystems\Trycache
and PATH includes c:\intersystems\Trycache\bin
Caché works, and I can login, use the globals, etc...

1
0 381
Article Alberto Fuentes · Feb 19, 2016 1m read

Attached code contains a very basic $system.WorkMgr example.

It uses several jobs (workers) to update different chunks of rows of a table.

Steps:

  • Creates a table with 100 records.
  • Split table  in chunks 
  • Initialize WorkMgr and queue chunks to workers.
    • Every worker simply sets its process number in the Job field of the processed row. 

In this case, I have tested the example in a 8-core laptop:

1
0 924
Question David.Satorres6134 · Oct 22, 2018

Hi all,

We are moving to IRIS our productions, and everything seems to go fine. But we are facing a problem because we are using the object %Library. CacheObject in some classes, and IRIS doesn't seem to recognize it. At the IRIS documentation (https://docs.intersystems.com/irislatest/csp/documatic/%25CSP.Documatic…) the object is effectively removed, and I can't find the equivalent.

Has anyone faced this? Which is the new object in IRIS? 

3
0 442
Question Sean Connelly · Oct 17, 2018

I can directly order over a MultiDimensional property, e.g.

set key=$order(obj.prop(key))

However I have a generic method that has to use the $property method, if I know the keys then I can just fetch a value with...

set value=$property(obj,"prop","key")

But if I don't know the keys then I am not aware of a solution to do this, e.g.

set key=$order($property(obj,"prop",key))

will not work.

There must be an internal solution as a zw command on obj is able to list all of the keys. I'm wondering if there is a $zu function or other trick that can do this. Any ideas?

Thanks,
Sean.

6
0 586
Article Daniel Kutac · Apr 13, 2017 3m read

Recently, a partner company started to develop an Angular client for their Cache application. Together, we decided to leverage the power of Caché dynamic objects to exchange JSON encoded data between client and server parts. However, we realized that currently there is a gap in Cache JSON implementation that prevents simple use of traditional registered and persistent classes to exposed their data with the same ease as with XML. I wrote a small JSON adapter, that does the job and bridgers the gap. It's purpose is simple expose data described by a regular Cache class in a one-to-one fashion to

7
1 2234
Question Stephen Wilson · Oct 8, 2018

I think I already know the answer to this but I thought I'd ask anyway. So the Node.js adapter allows you to perform operations directly on Globals. Does the InterSystems.Data.CacheClient.dll or InterSystems.CacheExtreme.dll provide a mechanism to access Gobals directly or are you accessing globals via Caché ObjectScript classes?

5
0 631
Question Oliver Wilms · Oct 15, 2018

Hello, our Team is trying to develop Ensemble DTL to transform incoming X12 files into persistent data records. We created a persistent class and we can insert data using SQL. We tried to verify that %Save() gets called by adding %AddToSaveSet() method to persistent class and there writing to a global. We had to extend our persistent class with Ens.VDoc.Interface class or we could not see %Save() being called from Ensemble DTL. We suspect that %Save() gets some kind of error. We tried to debug by overwriting Transform() method in our DTL class. We got "<METHOD DOES NOT EXIST> 148

3
0 913
Question Vivek Ranjan · Sep 28, 2018

Method1(){

Set OID1=##class(Table).%OpenId(100)

// do Kill OID

}

&SQL(Update Table Set  Column=88)

Method2(){

Set OID2=##class(Table).%OpenId(100)

// Or do %Reload()

Set OID.Column=99

Do OID.%Save()

}

// Column 1 still holds value as 1

For getting the updated value I should do Kill OID in Method1

4
0 672
Question Ravi Nagpal · Oct 10, 2018

Hi, 

Can we create a new class in the studio using any command rather then using the Menu Item Option from Menu Bar in Studio . 

Requirement : Create/Draft a new class and able to extends the other classes using  a command in Cache Class .

In other words , I want to Dig in the Menu Item class from which Menu bar is created in studio and option are provided  Like New..., Open..., etc 

Thanks, 

Ravi 

1
0 296
Question sansa stark · Oct 9, 2018

Hi all,By using LDAP cache method ##Class(%SYS.LDAP).GetValuesLen(LD,CurrentEntry,Attribute) we get the list of attributes but in "ObjectSid" attribute have the SID in binary format(objectSid^U¤:c@ãºþÕLCP]). how to convert to the readable format from the binary format in cache side. Please help us to proceed further

3
0 439
Question John Murray · Oct 2, 2018

Using our cool new debugging extension for Visual Studio Code I'm trying to debug a CreateProjection method of a class, but when I compile it the work apparently gets done in one of the worker jobs, so my breakpoint never triggers.

Is there a compiler flag or qualifier to force the compilation to be done in-process rather than getting handed off to a worker job?

4
0 516
Question Stephen Wilson · Oct 4, 2018

You have a global ^CODE("TNO","BIO",291,"AKI") that may or may not exist. On the data side of the global ref it can have  a boolean value of 0 (false) or 1 (true) and this global is wrapped up in a Caché class accessible from myobject.AKI property. At the object level, how do you check whether the property is defined ie. is there a $DATA equivalent for Cache Object properties? Also, how would you kill /null the property as opposed to making the value  0 (false) or an empty string?

10
0 3836