Although I read several documentations, but I am not sure how to create list
or array objects and use them.

I created a class with string type property, which is list or array
collection.
For example,

Class IHIS.Patient Extends (%Persistent, %XML.Adaptor) [ ClassType =
persistent, ProcedureBlock ]
{
     Property Name As %String(MAXLEN = 20) [ Collection = list ];
}

And then, I created another class, it is web service class.

01: Class Service.PatientService Extends %SOAP.WebService [ ProcedureBlock ]
02: {
03:   Parameter SERVICENAME = "PatientService";
04:    Parameter LOCATION = "http://localhost/csp/ihis";;
05:    Parameter NAMESPACE = "http://tempuri.org";;
06:
07:    ClassMethod AddPatient() As %String [ WebMethod ]
08:    {
09:        s patient = ##class(IHIS.Patient).%New()
10:        d patient.Name.insert("hi")
11:        Quit "ok"
12:    }
13: }

But, I believe line 10 has problem.
How should I handle the list or array objects?

please let me know.
Thanks~ =)

- Song



Reply via email to