From f7435693f144394bc02c170734446d6f3d7acec8 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Thu, 7 Aug 2014 07:42:24 -0400 Subject: [PATCH] Fixup NCIP::ILS::make_header. Change it to take the whole NCIP request as its argument. Signed-off-by: Jason Stephenson --- lib/NCIP/ILS.pm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/NCIP/ILS.pm b/lib/NCIP/ILS.pm index 34f8f91..581b009 100644 --- a/lib/NCIP/ILS.pm +++ b/lib/NCIP/ILS.pm @@ -50,6 +50,8 @@ sub requestitem { # Other methods, just because. +# Handle a LookupVersion Request. You probably want to just call this +# one from your subclasses rather than reimplement it. sub lookupversion { } @@ -62,10 +64,18 @@ sub lookupversion { # NCIP::Header. sub make_header { my $self = shift; - my $initheader = shfit; + my $request = shift; + my $initheader; my $header; + for my $key (keys %$request) { + if ($request->{$key}->{InitiationHeader}) { + $initheader = $request->{$key}->{InitiationHeader}; + last; + } + } + if ($initheader && $initheader->{FromAgencyId} && $initheader->{ToAgencyId}) { $header = NCIP::Header->new( -- 2.43.2