Written by

Question steven Henry · Jul 10

How to change the Address in InterSystems Trakcare for Objectscript

Hello my friends,

I have a problem with Objectscript, why the value of address become like this ?

everything works fine except the Address,

this is my code, do I need something to make this into real address ? should I put something in my code ? 

 set paper=obj.PAADMPAPMIDR.PAPMIPAPERDR

            if '$isobject(paper) continue

            set Address=paper.PAPERStName

thank you for your help

Best Regards,

Steven Henry

Product version: HealthShare 2025.1
$ZV: IRIS for UNIX (Red Hat Enterprise Linux 8 for x86-64) 2023.1.1 (Build 380_0_23762U) Fri Oct 18 2024 17:32:14 EDT [Health:5.1.0-1.m1]

Comments

steven Henry  Jul 10 to Chris Stewart

I just put GetAt(1) and it works 

this is the correction that I've been made :

set Address=paper.PAPERStName.GetAt(1)

0
Timo Lindenschmid · Jul 11

From a performance aspect i would not use objects to retrieve the data, but use SQL.

SQL will take care of the conversion for you.

e.g.

select PAADM_PAPMI_DR->PAPMI_PAPER_DR->PAPER_StName
from SQLUSer.PA_Adm
where
PAADM_Hospital_DR = 2and
PAADM_AdmDate>='19/03/2025'and
PAADM_AdmDate<='19/03/2025'
0