data into a format i can put into a json doc using the following code:
Code: Select all
domains
xav_PairLst = xav_pairs*.
xav_pairs = xav_Pair*.
xav_Pair = av(col_name,data_type).
data_type = string;real;xav_pairs;xav_PairLst.
Code: Select all
XAV_Pairs1 =
[av("EntityUID","808b259b-a996-4649-9cdb-21e4cd5fe654"),
av("Addresses",[av("InstanceName", "Home Address"),
av("Zip", "30135"),
av("State", "GA"),
av("Country","USA"),
av("Address1", "6513 Osceola Way")
]),
av("Description","Demographic Profile"),
av("OwnerUID","115f1838-6cc4-40d5-bcf2-5fb19fd27fe0"),
av("SpecificTypeID", "d8347260-f601-4ba7-a1d8-7da53fc965b4"),
av("Identifications",[[av("InstanceName","Test Account"),
av("IdentificationKey","Membership"),
av("IdentificationValue", "1232445-234")
],[av("InstanceName", "Individual"),
av("IdentificationKey", "Individual"),
av("IdentificationValue", "0001")
]]),
av("ReleaseStatusID",0),
av("ConceptInstanceUID","c7033682-0a4d-4e49-b5d1-574369ca4865"),
av("EffectiveDate","Feb 2, 2017 10:04:26 AM"),
av("Name",[av("InstanceName","EntityName"),
av("FirstName","Michael"),
av("FullName","Michael W. Saxon"),
av("LastName","Saxon"),
av("MiddleName","W.")
])
] ,
XAV_Pairs5 =
[av("EntityUID","808b259b-a996-4649-9cdb-21e4cd5fe654"),
av("Description","Employee Profile"),
av("OwnerUID","08830664-0647-48ab-b0cf-0949a6b14713"),
av("SpecificTypeID","b750a104-dfe9-43f4-ae1d-73241a58a4bc"),
av("ReleaseStatusID",0),
av("EmployeeID","004"),
av("ConceptInstanceUID","a7d03848-1282-4b44-95c1-5c52ce9512b8"),
av("EffectiveDate","Feb 2, 2017 10:04:26 AM")
],
Rest5 = [av("attributes",
[av("EntityUID", "808b259b-a996-4649-9cdb-21e4cd5fe654"),
av("Description","Patient Profile"),
av("OwnerUID","691621e7-e25d-4bbf-b22a-b8eabf93de7e"),
av("SpecificTypeID","4ea1b8cf-3b38-4e08-bd57-4995c938616e"),
av("ReleaseStatusID", 0),
av("PatientID","sdlgjdlgldjf"),
av("ConceptInstanceUID","ada105e0-33dc-4722-aff9-7d9f2e61b49c"),
av("EffectiveDate","Feb 2, 2017 10:04:26 AM")
])],
Rest = [av("attributes",XAV_Pairs5)|Rest5],
_Doc = [av("abstractions", [ av("attributes",[XAV_Pairs1|Rest])])].
the first av at the top has a string instead of another av pair. i was hoping the domain would translate it but i am missing something. i tried both string and text(string) with no luck.
i will look hard at the rpc example because this is for loading a doc from a service using jdoc
but i know av(col_name,data_value) does use data_value for both text and numbers so i attempted to do the same with this.
i get either error c504 : The expression has type '::string', which is incompatible with the type 'main::data_type'
or
The expression has type 'A$*', which is incompatible with the type 'main::data_type' when using
text(string)
by the way, thanks for the lead of the rpc/json service example, it looks good. if it eliminates
the need for the above approach l will scrap it and just dive in to that. i was trying to define a
list structure that would make reaching down into the doc easily.
AEH