We have a stored procedure with one input parameter and one input/output parameter.
declare @hl7message nvarchar(max) = 'Pass the hl7 message here',
@output nvarchar(max);
EXEC sp_InsertHl7 @hl7message, @outputresult = @output OUTPUT;
print @output;
@output value will be "Pass" or "Fail"
Below code is inserting the HL7 successfully into the target DB, but not returning the output value as expected.