View previous topic :: View next topic
|
Author |
Message |
tanuj
New User
Joined: 08 Jan 2007 Posts: 2 Location: pune
|
|
|
|
Hi,
Could you please let me know the diff b/w below two calls as both will give the same result.
Hospital
|
Ward
|
Patient
1)
GU PATIENT (PATNAME = KRISH)
2)
GN PATIENT (PATNAME = KRISH)
Thanks,
Tanuj |
|
Back to top |
|
|
Sandy Zimmer
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
If that is the ONLY SSA in your call and the patient is a child of ward which is a child of hospital, you will not get anything with a GU.
THINK about it. |
|
Back to top |
|
|
tanuj
New User
Joined: 08 Jan 2007 Posts: 2 Location: pune
|
|
|
|
As per my understanding, its surely return a qualified patient segment.
Hospital
|
Ward
|
Patient
GU PATIENT (PATNAME = KRISH)
In this case, as we have not mentioned any SSA for Hospital and Ward, DL/I will assume an Unqualified SSA for each missing or skipped segment types.
Could you please check and let me know ? |
|
Back to top |
|
|
Sandy Zimmer
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
I do not need to CHECK - I KNOW!
Hospital is the root - there can be 1 to many ward segments beneath that root. There then can be 1 to many patient segments beneath that ward.
The patient name "KRISH" may or may not be unique - it quite possibly can exist in may hospitals and within those many hospitals - in many wards.
IMS does not ASS-U-ME!
You cannot do a GU to a child segment or a segment down the chain without qualifying it's parent and above. THINK - IMS is positional - not relative. |
|
Back to top |
|
|
Suthagar
New User
Joined: 01 Jul 2005 Posts: 26 Location: Chennai
|
|
|
|
Hi Tanuj,
Though it is a bad way of coding (Qualified SSA for a 2nd level child segment without having an SSA for Parent and 1st level child), The code works as follows:
1. The first occurrence of the root segment (Hospital) would be fetched.
2. Under the fetched Hospital the first occurrence of the Ward segment would be fetched next.
3. It will search for the value PATIENT (PATNAME = KRISH) in the Patient segment.
Note:
When you are setting position in IMS database, the calls GU and GN works same (There is no difference).
Cheers,
Suthagar.S |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Quote: |
IMS does not ASS-U-ME!
|
|
|
Back to top |
|
|
|