My requirement is to retrieve only one side of hierarchy i.e. I want to retrieve all the ILLNESS & TREATMNT segments for one particular patient. I don't want BILLING, PAYMENT & HOUSHOLD segments.
I am a beginner to IMS, could you please help with above?
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
STEP2 : Loop1 - GN with PATIENT qualified SSA, ILLNESS unqualified SSA.
You need to add until GE/GB logic to loop1.
STEP3 : Loop2(within Loop1) - GN with PATIENT qualified SSA, ILLNESS unqualified SSA, TREATMNT unqualifed SSA until GE/GB.
Treatment is a child of illness - once you have an illness segment, you need to load a fully qualified ssa for that illness segment.
Perhaps you will only have 1 illness segment - or perhaps you won't have any. Always code for every possible agenda.
Why are you using GU on the patient segment? Do you already have the key? The reason you are only getting the first patient is because you are using a GU. A get unique - with or without a fully qualified ssa - will always position you on the first segment in the database on your first call.
You need to use 'loop" logic for the patient segment with a GN if you want more than just the first patient segment. Also, don't forget GB logic there.
Once you have a patient segment, then load the key of that patient into a qualified SSA for your loop1[/i]
I gave GU because i want to display Patient segment as well. Yes i had the key and i am looking for all the Illness and Treatment segment occurrences under the above Patient. And also i have 2 Illness segment occurrences under this Patient.
Treatment is a child of illness - once you have an illness segment, you need to load a fully qualified ssa for that illness segment
Now i understood that i need to qualify Illness before retrieving Treatmnt segment occurrences. Here is where i went wrong and got only first Illness and not the second one since i was using unqualified Illness SSA in loop2.
Now i got what i needed. Many thanks..