vagabonding electron has asked for the wisdom of the Perl Monks concerning the following question:
<Outpatient_Services> <Outpatient_Service> <Outpatient_Clinic> <AM_Key>AM01</AM_Key> <Description>Description of the Outpatient_Clinic</Description> <Explanations>Explanations to the Outpatient_Clinic</Explanations> </Outpatient_Clinic> </Outpatient_Service> <Outpatient_Service> <Outpatient_Clinic> <AM_Key>AM01</AM_Key> <Description>Description of the Outpatient_Clinic</Description> <Explanations>Explanations to the Outpatient_Clinic</Explanations> </Outpatient_Clinic> </Outpatient_Service> <Outpatient_Service> <Outpatient_Clinic> <AM_Key>AM02</AM_Key> <Description>Description of the Outpatient_Clinic</Description> <Capacities_Outpatient_Clinic> <Care_Point> <VA_VU_Key_Outpatient_Clinic>VA01</VA_VU_Key_Outpatient_Clinic> </Care_Point> <Care_Point> <Other> <VA_VU_Other_Key_Outpatient_Clinic>VA00</VA_VU_Other_Key_Outpatient_Cl +inic> <Description>Other Care Point of the Outpatient Clinic</Description> </Other> </Care_Point> </Capacities_Outpatient_Clinic> </Outpatient_Clinic> </Outpatient_Service> <Outpatient_Service> <Outpatient_Clinic_Special> <AM_Special_Key>AM06</AM_Special_Key> <Description>Description of the Outpatient_Clinic</Description> <Capacities_Outpatient_Clinic_Special> <Capacity> <LK_Key>LK01</LK_Key> </Capacity> <Capacity> <LK_Key>LK02</LK_Key> </Capacity> </Capacities_Outpatient_Clinic_Special> <Explanations>Explanations to the Outpatient_Clinic</Explanations> </Outpatient_Clinic_Special> </Outpatient_Service> <Outpatient_Service> <Outpatient_Clinic> <AM_Key>AM04</AM_Key> </Outpatient_Clinic> </Outpatient_Service> <Outpatient_Service> <Outpatient_Clinic> <Other> <AM_Other_Key>AM00</AM_Other_Key> <Type>Type of the other Outpatient Clinic</Type> </Other> <Description>Description of the Outpatient Clinic</Description> <Capacities_Outpatient_Clinic> <Care_Point> <VA_VU_Key_Outpatient_Clinic>VA02</VA_VU_Key_Outpatient_Clinic> </Care_Point> <Care_Point> <Other> <VA_VU_Other_Key_Outpatient_Clinic>VA00</VA_VU_Other_Key_Outpatient_Cl +inic> <Description>Other Care Point of the Outpatient Clinic</Description> </Other> </Care_Point> </Capacities_Outpatient_Clinic> <Explanations>Explanations to the Outpatient_Clinic</Explanations> </Outpatient_Clinic> </Outpatient_Service> </Outpatient_Services>
- Outpatient_Services: AM11: 1 AM07: 1 AM04: 1
- Outpatient_Services: Outpatient_Service: - AM11: 1 - AM07: 1 - AM04: 1
Could you please give me a hint?'Outpatient_Service' => sub { if (exists $_[1]->{Outpatient_Clinic}) { if ( exists $_[1]->{Outpatient_Clinic}->{Other} ) { return $_[1]->{Outpatient_Clinic}->{Description} => 1 } else { return $_[1]->{Outpatient_Clinic}->{AM_Key} => 1 } } elsif ( exists $_[1]->{Outpatient_Clinic_Special} ) { return $_[1]->{Outpatient_Clinic_Special}->{Description} => 1; + # as a way out. } else { } },
|
|---|