Re: Setting FrameRate for the output movie file
A small typing mistake ,
I have typed as,
"so the frame should be 1" instead of "so the frame rate should be 1"
Try exporting to Windows Media at 8Mbps. Any higher data rate and the PC might choke on it.
But make sure his monitor is capable of 1920X1080 because more likely he would be just as happy with 1290X720 and the quality would be even better at that size using the same data rate.
Similar Messages
-
Validating against schema file for the output XML file
Hi,
I am using XSLT for mapping. The output message is generated according to the mappings but it is not validate aganist schema of target . I am using xsd file from external defination section as target. Can any body help me in this regard.
Thanks,
Mallikarjun.Mhi,
if you talk about the schema of a target message type
than validation only works if you use graphical
message mapping
not with: xslt,java, abap
Regards,
michal
<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions">XI FAQ - Frequently Asked Questions</a> -
Where can I set the log level for the "Inbox log file" ?
From the Siebel 8 Bookshelf, it says :
"To set the level of the Inbox log file for troubleshooting
*In Siebel Tools, set the Log Level for the Inbox log file (Alias = InboxLog) to 5*."
But where exactly in Siebel Tools can I find that Log Level ? Which object does the Siebel bookshelf talk about ?Hi,
Loglevels are not configured in Siebel Tools. You have to configure them with the siebel client. You can find a parameter at "Administration - Server Configuration / Server / Events"
Search for "Inbox General Log Events". Set this parameter to 5. It think this should help you.
Cheers Andreas -
LabWindows / CVI: how to change the output executable file name
For example, I have an A project a.prj, I do not want to compile the output file is a.exe, but b.exe.
I will try to save as a.prj b.prj, a.cws save as b.cws
eg:a.prj ---->(output)--->b.exe
Solved!
Go to Solution.You can go to Build >> Target Settings menu item, select Release (or Release 64) in the Configuration filed and set the name of the executable to create in Application FIle field, withouyt need to change the prj or cws filename.
See the complete description of available options here.
Proud to use LW/CVI from 3.1 on.
My contributions to the Developer Zone Community
If I have helped you, why not giving me a kudos? -
Want to display a space after last field in the output txt file
hi
I want to display a space after last field in the output txt file which is generaed by my program on utility server the last field lengyt we have defined is four and in database it is of three characters and requirement is to disppaly the last fourth field as space in the output file w hich is not shown as the txt file automatically gets closed at the third place as it is the last field in the record and ind atabase records are of therss char only but user wants to display this fourth position in the notepad output file as space ( which is last field in the output file)
eg
name house street country
record output coming in file
ram h3 street3 thn now this thn which is last field the notepad get closed at thn only
i want to display one space in last field for the whole of output file
ie ram h3 street3 thn(space)
sham h4 street4 sgp(space) so on......
we need to show this space in the output file as blank
regards
Arorahi Atish
i am using
loop at gt_sagadr_outtab into wa_sagadr_outtab
move wa_sagadr_outtab-country to wa_sagadr_text+223(226).
endloop
in this last field ie country i need to display the last 226 as blank as only country key is two char in database so the last space is not shown
i am not unsing the fM as tolb by you
and afterwards
i am usning
Concatenate 'Sagadr_' sy-datum sy-uzeit '.dat' into gv_filename_sagadr.
CALL FUNCTION 'FILE_GET_NAME'
EXPORTING
CLIENT = SY-MANDT
LOGICAL_FILENAME = gc_lfile
OPERATING_SYSTEM = SY-OPSYS
PARAMETER_1 = gc_param1
PARAMETER_2 = gc_send
PARAMETER_3 = gv_filename_sagadr
USE_PRESENTATION_SERVER = ' '
WITH_FILE_EXTENSION = ' '
USE_BUFFER = ' '
ELEMINATE_BLANKS = 'X'
IMPORTING
EMERGENCY_FLAG =
FILE_FORMAT =
FILE_NAME = gv_filepath_sagadr
EXCEPTIONS
FILE_NOT_FOUND = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
and lastly
open dataset gv_filepath_sagadr for output in text mode encoding default.
if sy-subrc eq 0.
loop at gt_sagadr_text into wa_sagadr_text.
transfer wa_sagadr_text to gv_filepath_sagadr.
endloop.
endif.
close dataset gv_filepath_sagadr.
if sy-subrc = 0.
message S002 with gv_filepath_sagadr. "Files & created on Application server
endif.
SO NOT SURE WHERE TO USE THE CODE AND HOW -
How do I change the image selected for the finalized movies pane in all events?
How do I change the image selected for the finalized movies pane in all events? I made a movie some time ago in iMovie, and a still from this now appears as the image for Finalized Movies in the All Events pane (as well as showing up if I then click on this pane to take me to Finalized Movies). Anyone know how to change or delete this image, please?
Unfortunately, the suggested solution in that thread does not work and the thread appears to be closed to replies. That is, even though I am logged in the Reply|Quote|Mark as answer|Report as abuse items are missing.
The suggested solution is:
First, I found I had "img100.png" in C:\Windows\Web\Screen and
C:\Windows\WinSxS\x86_microsoft-windows-themeui-client_31bf3856ad364e35_6.2.9200.16384_none_69ee3fa2269e545e
1. Belonging to the Administrators Group, I replaced file Owner TrustedInstaller with my Username on both "img100.png" files
2. After resizing the image I wanted to see on the Login screen to the resolution of "img100.png" file,
I copied and pasted it to both "img100.png" files keeping this way the format (extension) and resolution of the original "img100.png" file,
which I permanently deleted.
However, I have not been able to replace the img100.pgn in C:\Windows\Web\Screen even after taking ownership of it and setting the permissions for my userid to All. I edit it with mspaint and then try to save it. The save starts that then says the
save was interrupted.
The appears to be some additional protection besides the standard acls.
http://www.saberman.com -
How can I modify the Fit, Crop, or Ken Burns effect for the entire movie?
How can I modify the Fit, Crop, or Ken Burns effect for the entire movie? I've been having to go through them all individually which takes forever.
You could try Edit > Select All then click on the crop button and change the setting from Ken Burns to Fit.
I find that this only works if you do not have the Automatic Cross Dissolve transitions in place.
If you do, File > Project Theme and uncheck the transitions and remove them.
After you have changed from Ken Burns to Fit, you can re-apply them.
Easiest way in future is to set up your project (File > Project Properties) before you start adding photos.
z. -
Scale does not work for the target movie when using a poster movie
Hello,
I have various size video files that I want to scale to a certain display area on a website. I'm using the scale="tofit" attribute. It works fine for the poster movie but when the target movie is loaded it does not scale! Is this a QT bug or by design? Is there a workaround to this or am I doing things wrong? All help is greatly appreciated.
<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="489" height="280" codebase="http://www.apple.com/qtactivex/qtplugin.cab">
<param name="autoplay" value="false">
<param name="controller" value="true">
<param name="href" value="heaven.mov">
<param name="pluginspage" value="http://www.apple.com/quicktime/download/indext.html">
<param name="target" value="myself">
<param name="type" value="video/quicktime">
<param name="src" value="movies/PosterTest.mov">
<param name="scale" value="tofit" >
<embed src="movies/PosterTest.mov" href="heaven.mov" width="489" height="280" autoplay="false" controller="true" border="0" pluginspage="http://www.apple.com/quicktime/download/indext.html" target="myself" type="video/quicktime" scale="tofit">
</object>
Dell inspiron 8200 Windows XP ProAfter quite a lot of Googling I found what I was looking for. This solution was quite hard to find. I found it on http://blog.deconcept.com/2005/01/26/web-standards-compliant-javascript-quicktim e-detect-and-embed (I'm using Geoff Stearns's script to embed my movies, it works great!)
Anyway here is a url to the final solution:
http://developer.apple.com/documentation/QuickTime/WhatsNewQT5/QT5NewChapt1/chap ter1_section32.html -
How to remove the extra space in the output pdf file?
Hi All
In our RTF layout template we have both static content and dynamic content.
In RTF template we have used many if-else,choose,For each loops.
On the account of that,In the output pdf file, we are getting lot of empty space in the place of that coding(if-else,choose,For each loops).
Is there anyway to reduce the space in the output pdf file?
Please suggest some ideas.
Thanks in Advance.White space is NOT your friend!
Make sure you don't have any unwanted whitespace between commands and especially tagged on the end of lines. Chain your commands together with no whitespace and let them wrap, do not enter carriage returns.
Cheers,
Dave -
Inspection Lot creation for the 103 movement type
<<Don't ask for or offer points>>
Dear Experts,
we have the requirement of Creating the Inspection lot for the 103 movement type. we have done all the necessary settings for 103 movement type (in OMJJ and under the node Quality Management --> Quality Inspection -->Inspection Lot Creation -->Inspection for Goods Movements) but still I am unable to achieve the results. Same is happening for 105 movements.
Kindly let us know what settings need to be done in order to achieve the same.
Full points will be awarded for the reply
Regards.
Edited by: Matt on Sep 18, 2011 4:44 PMHi,
If you have activated two inspection types (eg 01, 0101) of same inspection lot origin (01), in material master you should have a preferred indicator set for the inspection type for which you want to be selected when you perform goods receipt.
This check box is available in the inspection type set up in the Material master.
Also check whether the post to inspection stock indicator is set for the material (in the inspection type), then only material will be posted to inspection stock.
Please confirm, what happens to the stock after making MIGO. check in MMBE and confirm
Go through the link and maintain the necessary settings. I think default settings for 01 type should work.
http://help.sap.com/saphelp_470/helpdata/en/2d/350e4d448c11d189420000e829fbbd/content.htm
Regards
Hari -
Junk Characters in the output XML file after Parsing
Hi
I am using DOM parser to parse an XML file.
After parsing the input XML file, i am fetching some contents
from the same and also putting the same contents in the parsed output file which is also an XML file.
The problem here is that the after putting the contents to the output XML file from the input XML file,
some junk character appears at the end of each and every tag in the outputfile.
The junk character is some thing like this : " ampersand hash thirteen and a semicolon "
(*THE MESSAGE DID NOT ACCEPT THE SYMBOLS KINDLY TRANSLATE THE ABOVE WORDINGS*
INTO SYMBOLS)
This character gets appended at the end of each and every tag in the output file due to which the output file
is not recognised as an XML file.
Please let me know as to why is this character appearing and also please suggest some solution
for the same.
-Thanks in Advance.
Edited by: itskarthik on Oct 10, 2008 7:16 AM
Edited by: itskarthik on Oct 10, 2008 7:18 AM
Edited by: itskarthik on Oct 10, 2008 7:19 AM
Edited by: itskarthik on Oct 10, 2008 7:19 AM
Edited by: itskarthik on Oct 10, 2008 7:23 AM
Edited by: itskarthik on Oct 10, 2008 7:23 AMWierd.
Try this piece of code. (You can always change it to use input file and output file instead of string if you want)
What is your output?
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.Result;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.w3c.dom.Document;
public class XMLTest {
public static void main(String[] args) throws Exception {
String input = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n" +
"<test>\r\n" +
"</test>";
System.out.println("Input:");
lookForCR(input);
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
Document doc = factory.newDocumentBuilder().parse( new ByteArrayInputStream(input.getBytes()) );
Source source = new DOMSource(doc);
ByteArrayOutputStream bArrOut = new ByteArrayOutputStream();
Result result = new StreamResult( new StripOutputStream( bArrOut ) );
Transformer xformer = TransformerFactory.newInstance().newTransformer();
xformer.transform(source, result);
System.out.println("\nResult:");
lookForCR(bArrOut.toString());
System.out.println("\nDone");
public static void lookForCR(String input) throws Exception {
char[] chars =input.toCharArray();
for ( char chr : chars ) {
if (chr == 13 ) {
System.out.println("Has 0x0D character!!");
class StripOutputStream extends OutputStream {
OutputStream out = null;
public StripOutputStream(OutputStream out) {
this.out = out;
@Override
public void write(int b) throws IOException {
if ( b != 13 )
out.write(b);
}- Roy -
Best settings for highest quality for exporting a .mov file to h.264
Hi,
I want to know what the best settings are for the highest quality for exporting a .mov file (720p50) to h.264. I want the same quality as the original.
I want to know the data rate etc.
regards,
Jeroen
Message was edited by: Woudgraaf-AVThere is no way to get the exact same quality when transcoding from an editing source to a highly compressed H.264 QT. However, you can get a real high quality by adjusting the data rate.
However, these things depend on the length of the original. I routinely encode H.264s with good results in the 3000-5000 data rate range. I also make sure that I use multiple pass encoding. Take a short snippet of your project (10 seconds or so), and try various bit rates until you have one you like that doesn't take forever.
Andy -
Is there any meaning to the iMovie .mov file names?
I went into iMovie Events folder and looked at the a specific event folder.
A sample of the imported video file names are as follows -
clip-2007-12-01 14;51;04.mov
clip-2007-12-01 15;32;09.mov
clip-2007-12-01 17;00;33.mov
clip-2007-12-01 17;19;44.mov
How does iMac name the video files? Is there some kind of logic to the naming of the videos that I am not aware of?
The first file (clip-2007-12-01 14;51;04.mov) is a 2s video and the second (clip-2007-12-01 15;32;09.mov)is a 13s video.How does iMac name the video files? Is there some kind of logic to the naming of the videos that I am not aware of?
To add a bit to what Winston has already said... Files imported via the "Import from Camera..." option are typically files captured from a camcorder or a device which iMovie '08 considers to be a camcorder. Thus the prefix "Clip-". Theoretically, the "2007-12-01 14;51;04" represents the date time group when the files was imported or the "time stamp" from the recording device which may or may bear any resemblance to a factual time. And as was previously pointed out, the ".mov" is a standard extension signifying the file container type. Therefore "clip-2007-12-01 14;51;04.mov" is a file clip imported or created on the 1st of December in 2007 at 2:51:04 PM and placed in an MOV (generic) file container.
With regard to the file container itself, this is determined by the method of import. Files imported at the "Finder" level are imported with their original "Finder" name and in the same file container as the original file. Camcorder files, on the other hand fall into two separate classes -- those requiring some sort of conversion and those that don't. An standard definition DV file is imported in its original DV container since it does not require any conversion. Files encapsulated in MPEG (like HDV, AVCHD, or MPEG-2), however, need to transformed to make them "edit" compatible with iMovie '08. At the very least, the audio is demuxed to "elementary" AIFF file(s) resampled to 48.0 KHz with 16-bit sampling and is now in a "temporal" compression format. In the case of HDV and AVCHD, the video is extracted/converted and can then be merged/synchronized with the audio and saved. This merging and saving of diverse content is what produces the MOV file container in the same manner as using the "Save As..." file command in QT Pro. HDD SD content however must undergo additional processing. Since the 'muxed" MPEG2/AC3 content does not share a common time reference, a "time" track is added to the container for audio time reference and to reduce/minimize drifting between audio and video tracks, the modified MPEG-2 video (now essentially having been turned into an Motion-JPEG video) is provided with an internal track start and/or end time offset and the whole saved in the generic MOV file container. -
For the Attribute Movement type(BWA) we use Value " 201" and not "101" why?
Hello Experts,
We are in SRM 7.0 classic scenario,
For the Attribute Movement type(BWA) we use Value " 201" and not "101" and provide the Source syst(backend R/3)
Can you all plz help me understand what is the difference if use value "101" for the Attribute Movement type(BWA)
Also,can you all plz help me understand if we shd use value "101" or "201" for the Attribute Movement type(BWA) and under what scenario.
Any pointers will be highly appreciated.
Thanks & Regards,
RKSHi,
Movment type " 201 maintained for the Classic scenario only.
It is necessary to maintain the attribute if the default material group for a given user (or) sit is set to a backend logical system. The EBP system knows that if the user is set for backend procurement ,that there might be a possibility for a reservation to be generated therefore it checks to see that a value for this attribute is maintained. The BWA value should be defined for the as 201 preceeded by the logical system and a backslash.
101 should not be used. This isfor the Good receipt.
In the extended classic scenario when you do the confirmations in SRM the movement type 101 will be created in the
backend system (R/3 or ECC6.0)
Regards
Ganesh Kumar .G -
Ref cursor stopped returning values for the output.
Hi Everyone,
My DB version is
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
Please do have a look at the code, and let me know where I've gone wrong, because select query is fetching data. Previously procedure was returning values too through ref cursor. Please correct me where I've gone wrong.
create or replace
PROCEDURE
SPL_SPN_MISSING_EMR_AOE_DTL (IN_PATIENT_ID NUMBER,
IN_FACILITY_ID NUMBER,
IN_DRAW_DT DATE,
IN_REQUISITION_NUMBER ORDER_REQUISITION_HEADER.REQUISITION_NUMBER%TYPE,
IN_CORP_ACRONYM CORPORATION.CORPORATION_ACRONYM%TYPE,
IN_ABCDEF_MRN PATIENT.ABCDEF_MRN%TYPE,
IN_ACCOUNT_NUMBER FACILITY_ACCOUNT_DETAIL.ACCOUNT_NUMBER%TYPE,
IN_HLAB_NUM FACILITY_ACCOUNT_DETAIL.HLAB_NUM%TYPE,
OV_COMMENTS OUT VARCHAR2,
OR_QUES_AND_ANS OUT SYS_REFCURSOR) AS
* Copyright (C) 2013 ABCDEF Laboratories
* All Rights Reserved
* This Work Contains Trade Secrets And Confidential Material Of
* ABCDEF Laboratories., And Its Use Of Disclosure In Whole Or In Part
* Without Express Written Permission Of ABCDEF Laboratories Is Prohibited.
* Company : ABCDEF Laboratories
* Project : ABCDEF Scorpion
* Name : SPL_SPN_MISSING_EMR_AOE_DTL
* In Parameters : In_Patient_Id Number
* In_Facility_Id Number
* In_Draw_Dt Date
* In_Requisition_Number Order_Requisition_Header.Requisition_Number%Type,
* In_Corp_Acronym Corporation.Corporation_Acronym%Type
* In_ABCDEF_Mrn Patient.ABCDEF_Mrn%Type
* In_Account_Number Facility_Account_Detail.Account_Number%Type
* In_Hlab_Num Facility_Account_Detail.Hlab_Num%Type
* Out Parameters : OV_COMMENTS Out Varchar2
* OR_QUES_AND_ANS Out Sys_Refcursor
* Description : This Procedure Will Fetch The Mising Emr Aoe Detail And Provide
* Necessary Comments As Well.
* Modification History :
* Date Version No. Author Description
* 21/01/2014 1.0 ABCDEF Initial Version
* 27/01/2014 1.1 ABCDEF Restricted the output for duplicate questions
* and answers, partially answered AOE. Also renamed
* the output variable names.
CC_PACKAGE_NAME CONSTANT VARCHAR2(50) := 'SPL_SPN_MISSING_EMR_AOE_DTL';
CC_PROCEDURE_NAME CONSTANT VARCHAR2(50) := 'SPL_SPN_MISSING_EMR_AOE_DTL';
VC_AVL_PAT_QUES VARCHAR2(1000);
VC_DUP_PAT_QUES VARCHAR2(1000);
VC_ACTUAL_QUES VARCHAR2(1000);
VC_ACTUAL_QUES_CNT NUMBER:= 0;
VR_QUES_AND_ANS SYS_REFCURSOR;
VN_AVL_PAT_QUES_CNT NUMBER := 0;
VN_DUP_PAT_QUES_CNT NUMBER := 0;
VN_EXACT_PAT_ID_CNT NUMBER := 0;
VN_DUPL_PAT_ID NUMBER := 0;
VN_EXTERNAL_ID PATIENT.EXTERNAL_ID%TYPE;
VC_OBX_QUES VARCHAR2(1000);
VC_OBX_QUES_CNT NUMBER := 0;
VN_OBX_QUES_CNT NUMBER := 0;
PAT_EXTERNAL_ID PATIENT.EXTERNAL_ID%TYPE;
VC_EXACT_BOOLEAN_VAL VARCHAR2(10) := 'FALSE';
VC_EXACT_PAR_BOOLEAN_VAL VARCHAR2(10) := 'FALSE';
VC_DUPL_BOOLEAN_VAL VARCHAR2(10) := 'FALSE';
VC_DUPL_PAR_BOOLEAN_VAL VARCHAR2(10) := 'FALSE';
VC_REJECTED_BOOLEAN_VAL VARCHAR2(10) := 'FALSE';
VC_REJECTED_PAR_BOOLEAN_VAL VARCHAR2(10) := 'FALSE';
VC_COMMENTS VARCHAR2(100);
VC_PAR_COMMENTS VARCHAR2(100);
VC_RETURN_EXACT_PAT CHAR(1) := 'N';
VC_RETURN_DUPL_PAT CHAR(1) := 'N';
VC_RETURN_REJECT_PAT CHAR(1) := 'N';
VC_CHK_FOR_EXT_ID CHAR(1) := 'N';
VN_MAX_MSG_ID INTERFACE_A04_OBX_SEGMENT.MSG_ID%TYPE;
VN_MAX_COUNT NUMBER := 0;
VN_ITERATION_RUN NUMBER := 0;
BEGIN
SPL_SPN_ERROR_LOGGING_SPK.INFO_PROC
(IC_PACKAGE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IC_PROCEDURE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IN_BATCH_ID => '100'
,IC_MESSAGE_TEXT => 'Start of the procedure with Patient_Id:'||IN_PATIENT_ID||' Facility_Id:'||IN_FACILITY_ID||
' Draw_Dt:'||IN_DRAW_DT||' Requisition_Number:'||IN_REQUISITION_NUMBER||' Corp_Acronym:'||IN_CORP_ACRONYM||
' ABCDEF_Mrn:'||IN_ABCDEF_MRN||' Account_Number:'||IN_ACCOUNT_NUMBER||' Hlab_Num:'||IN_HLAB_NUM);
<<AOE_TEST_LOOP>>
FOR AOE_REC IN (SELECT ORD.TEST_ID
FROM ORDER_REQUISITION_DETAIL ORD
WHERE ORD.REQUISITION_HDR_ID = (SELECT ORH.REQUISITION_HDR_ID
FROM ORDER_REQUISITION_HEADER ORH
WHERE ORH.REQUISITION_NUMBER = IN_REQUISITION_NUMBER)
AND ORD.TEST_CODE IN (SELECT TEST_CODE FROM INTERFACE_ADT_AOE_MASTER WHERE SOURCE_SYSTEM = IN_CORP_ACRONYM))
LOOP
VN_ITERATION_RUN := VN_ITERATION_RUN + 1;
SELECT COUNT(DISTINCT PATIENT_ID)
INTO VN_EXACT_PAT_ID_CNT
FROM EMR_ADTAOE_DTL
WHERE PATIENT_ID = IN_PATIENT_ID
AND TEST_ID = AOE_REC.TEST_ID
AND FACILITY_ID = IN_FACILITY_ID
AND (DRAW_DATE = IN_DRAW_DT
OR DRAW_DATE = TO_DATE('2999/12/31','YYYY/MM/DD'))
AND SOURCE_SYSTEM = IN_CORP_ACRONYM ;
--Collecting all questions in interface_adt_aoe_master
SELECT STRAGG(SUB1.QUESTION_CODE), COUNT(SUB1.QUESTION_CODE)
INTO VC_ACTUAL_QUES, VC_ACTUAL_QUES_CNT
FROM (SELECT DISTINCT QUESTION_CODE FROM INTERFACE_ADT_AOE_MASTER
WHERE TEST_CODE = (SELECT TEST_CODE FROM TEST WHERE TEST_ID = AOE_REC.TEST_ID)
AND SOURCE_SYSTEM = IN_CORP_ACRONYM
ORDER BY QUESTION_CODE) SUB1;
SPL_SPN_ERROR_LOGGING_SPK.INFO_PROC
(IC_PACKAGE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IC_PROCEDURE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IN_BATCH_ID => '100'
,IC_MESSAGE_TEXT => 'vc_actual_ques:'||VC_ACTUAL_QUES ||
' vn_exact_pat_id_cnt:'||VN_EXACT_PAT_ID_CNT||
' aoe_rec.test_id:'||AOE_REC.TEST_ID||
' VN_ITERATION_RUN:'||VN_ITERATION_RUN);
<<MAIN_IF_BLOCK>>
IF
VN_EXACT_PAT_ID_CNT = 1 AND
VN_ITERATION_RUN >= 1 THEN
--Collecting avaliable questions in emr_adtaoe_dtl
SELECT STRAGG(SUB.QUESTION_CODE), COUNT(DISTINCT SUB.QUESTION_CODE)
INTO VC_AVL_PAT_QUES, VN_AVL_PAT_QUES_CNT
FROM (SELECT DISTINCT QUESTION_CODE FROM EMR_ADTAOE_DTL
WHERE TEST_ID = AOE_REC.TEST_ID
AND PATIENT_ID = IN_PATIENT_ID
AND FACILITY_ID = IN_FACILITY_ID
AND (DRAW_DATE = IN_DRAW_DT
OR DRAW_DATE = TO_DATE('2999/12/31','YYYY/MM/DD'))
AND SOURCE_SYSTEM = IN_CORP_ACRONYM
AND ANSWER IS NOT NULL
ORDER BY QUESTION_CODE) SUB;
SPL_SPN_ERROR_LOGGING_SPK.INFO_PROC
(IC_PACKAGE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IC_PROCEDURE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IN_BATCH_ID => '100'
,IC_MESSAGE_TEXT => 'vc_avl_pat_ques:'||VC_AVL_PAT_QUES||
' vn_avl_pat_ques_cnt:'||VN_AVL_PAT_QUES_CNT);
<<CASE_1_AND_2>>
IF
VC_AVL_PAT_QUES = VC_ACTUAL_QUES THEN
VC_EXACT_BOOLEAN_VAL := 'TRUE';
VC_COMMENTS := 'AOE AVAILABLE';
ELSIF--<<case_1_and_2>>
(VC_AVL_PAT_QUES != VC_ACTUAL_QUES OR VC_AVL_PAT_QUES IS NULL) AND
VN_AVL_PAT_QUES_CNT >= 0 THEN
VC_EXACT_PAR_BOOLEAN_VAL := 'TRUE';
VC_PAR_COMMENTS := 'PARTIAL AOE AVAILABLE';
END IF;--<<case_1_and_2>>
ELSIF
VN_EXACT_PAT_ID_CNT = 0 AND
VN_ITERATION_RUN > 1 THEN
VC_EXACT_PAR_BOOLEAN_VAL := 'TRUE';
VC_PAR_COMMENTS := 'PARTIAL AOE AVAILABLE';
ELSIF--<<Main_if_block>>
VN_EXACT_PAT_ID_CNT = 0 THEN
<<DUPL_PAT_LOOP>>
FOR PAT_ID_REC IN(SELECT DISTINCT PATIENT_ID
FROM PATIENT P
WHERE P.ABCDEF_MRN = IN_ABCDEF_MRN
AND EXISTS(SELECT 1 FROM EMR_ADTAOE_DTL EAD
WHERE EAD.PATIENT_ID = P.PATIENT_ID
AND EAD.TEST_ID = AOE_REC.TEST_ID
AND EAD.FACILITY_ID = IN_FACILITY_ID
AND (EAD.DRAW_DATE = IN_DRAW_DT
OR EAD.DRAW_DATE = TO_DATE('2999/12/31','YYYY/MM/DD'))
AND EAD.SOURCE_SYSTEM = IN_CORP_ACRONYM)
AND P.PATIENT_ID != IN_PATIENT_ID)
LOOP
--Collecting avaliable questions in emr_adtaoe_dtl
SELECT STRAGG(SUB.QUESTION_CODE), COUNT(QUESTION_CODE)
INTO VC_DUP_PAT_QUES, VN_DUP_PAT_QUES_CNT
FROM (SELECT QUESTION_CODE FROM EMR_ADTAOE_DTL
WHERE TEST_ID = AOE_REC.TEST_ID
AND PATIENT_ID = PAT_ID_REC.PATIENT_ID
AND FACILITY_ID = IN_FACILITY_ID
AND (DRAW_DATE = IN_DRAW_DT
OR DRAW_DATE = TO_DATE('2999/12/31','YYYY/MM/DD'))
AND SOURCE_SYSTEM = IN_CORP_ACRONYM
AND ANSWER IS NOT NULL
ORDER BY QUESTION_CODE) SUB;
<<CASE_3_AND_4>>
IF
VC_DUP_PAT_QUES = VC_ACTUAL_QUES THEN
VC_DUPL_BOOLEAN_VAL := 'TRUE';
VC_COMMENTS := 'AOE AVAILABLE FOR DUPLICATE PATIENT';
ELSIF
VC_DUP_PAT_QUES != VC_ACTUAL_QUES AND
VN_DUP_PAT_QUES_CNT >= 0 THEN
VC_DUPL_PAR_BOOLEAN_VAL := 'TRUE';
VC_PAR_COMMENTS := 'PARTIAL AOE AVAILABLE FOR DUPLICATE PATIENT';
END IF;--<<case_3_and_4>>
VN_DUPL_PAT_ID := PAT_ID_REC.PATIENT_ID;
SPL_SPN_ERROR_LOGGING_SPK.INFO_PROC
(IC_PACKAGE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IC_PROCEDURE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IN_BATCH_ID => '100'
,IC_MESSAGE_TEXT => 'vc_dup_pat_ques:'||VC_DUP_PAT_QUES||
' vn_dup_pat_ques_cnt:'||VN_DUP_PAT_QUES_CNT||
' VC_COMMENTS:'||VC_COMMENTS||
' VC_PAR_COMMENTS:'||VC_PAR_COMMENTS);
END LOOP DUPL_PAT_LOOP;
VC_CHK_FOR_EXT_ID := 'Y';
IF
VC_CHK_FOR_EXT_ID = 'Y' THEN
<<EXTERNAL_ID_LOOP>>
FOR P_PAT_EXT_ID_REC IN (SELECT DISTINCT P.EXTERNAL_ID
FROM PATIENT P
WHERE P.ABCDEF_MRN = IN_ABCDEF_MRN
AND P.EXTERNAL_ID IS NOT NULL)
LOOP
INSERT INTO TT_A04_OBX_QUES_ANS_DTL
(SELECT IAOBX.MSG_ID, IAOBX.OBSERVATION_IDENTIFIER, IAOBX.OBSERVATION_VALUE, IAM.UOM
FROM INTERFACE_A04_OBX_SEGMENT IAOBX, INTERFACE_ADT_AOE_MASTER IAM
WHERE IAOBX.OBSERVATION_IDENTIFIER = IAM.QUESTION_CODE
AND (IAOBX.OBSERVATION_DTM = TO_CHAR(IN_DRAW_DT,'YYYYMMDD')
OR IAOBX.OBSERVATION_DTM = TO_CHAR(TO_DATE('2999/12/31','YYYY/MM/DD'),'YYYYMMDD'))
AND IAOBX.MSG_ID IN (SELECT IPID.MSG_ID
FROM INTERFACE_A04_PID_SEGMENT IPID
WHERE IPID.PATIENT_ID_EXTERNAL = P_PAT_EXT_ID_REC.EXTERNAL_ID
AND IPID.MSG_ID IN (SELECT IMSH.MSG_ID
FROM INTERFACE_A04_MSH_SEGMENT IMSH
WHERE (TRIM('W' FROM SUBSTR(IMSH.SENDING_FACILITY,5,LENGTH(IMSH.SENDING_FACILITY))) = IN_ACCOUNT_NUMBER
OR SUBSTR(IMSH.SENDING_FACILITY,2,LENGTH(IMSH.SENDING_FACILITY)) = IN_HLAB_NUM))));
BEGIN
SELECT STRAGG(SUB3.OBSERVATION_IDENTIFIER), COUNT(OBSERVATION_IDENTIFIER)
INTO VC_OBX_QUES, VC_OBX_QUES_CNT
FROM (SELECT DISTINCT OBSERVATION_IDENTIFIER
FROM TT_A04_OBX_QUES_ANS_DTL
ORDER BY OBSERVATION_IDENTIFIER)SUB3;
IF
VC_OBX_QUES = VC_ACTUAL_QUES THEN
VC_COMMENTS := 'AOE RECEIVED IN A REJECTED ADT';
VC_REJECTED_BOOLEAN_VAL := 'TRUE';
ELSIF
VC_OBX_QUES != VC_ACTUAL_QUES AND
VC_OBX_QUES_CNT > 0 THEN
VC_PAR_COMMENTS := 'PARTIAL AOE RECEIVED IN A REJECTED ADT';
VC_REJECTED_PAR_BOOLEAN_VAL := 'TRUE';
END IF;
VN_EXTERNAL_ID := P_PAT_EXT_ID_REC.EXTERNAL_ID;
EXCEPTION
WHEN NO_DATA_FOUND THEN
VC_REJECTED_BOOLEAN_VAL := 'FALSE';
VC_REJECTED_PAR_BOOLEAN_VAL := 'FALSE';
END;
SPL_SPN_ERROR_LOGGING_SPK.INFO_PROC
(IC_PACKAGE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IC_PROCEDURE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IN_BATCH_ID => '100'
,IC_MESSAGE_TEXT => 'vc_obx_ques:'||VC_OBX_QUES||
' vc_obx_ques_cnt:'||VC_OBX_QUES_CNT);
END LOOP EXTERNAL_ID_LOOP;
END IF;
END IF;--<<Main_if_block>>
END LOOP AOE_TEST_LOOP;
--Returning output as per the execution result.
IF
VC_EXACT_BOOLEAN_VAL = 'TRUE' AND
VC_EXACT_PAR_BOOLEAN_VAL = 'FALSE' THEN
OV_COMMENTS := VC_COMMENTS;
VC_DUPL_BOOLEAN_VAL := NULL;
VC_DUPL_PAR_BOOLEAN_VAL := NULL;
VC_REJECTED_BOOLEAN_VAL := NULL;
VC_REJECTED_PAR_BOOLEAN_VAL := NULL;
VC_RETURN_EXACT_PAT := 'Y';
ELSIF
--VC_EXACT_BOOLEAN_VAL = 'TRUE' AND
VC_EXACT_PAR_BOOLEAN_VAL = 'TRUE' THEN
OV_COMMENTS := VC_PAR_COMMENTS;
VC_DUPL_BOOLEAN_VAL := NULL;
VC_DUPL_PAR_BOOLEAN_VAL := NULL;
VC_REJECTED_BOOLEAN_VAL := NULL;
VC_REJECTED_PAR_BOOLEAN_VAL := NULL;
VC_RETURN_EXACT_PAT := 'Y';
END IF;
IF
VC_RETURN_EXACT_PAT = 'Y' THEN
--Returning result set (OV_COMMENTS,Question and Answer) for the exact patient.(Case 1 (AOE) and 2 (PARTIAL AOE))
SELECT MAX (SUB.COUNT_QUES_ANS)
INTO VN_MAX_COUNT FROM (SELECT COUNT(*) OVER (PARTITION BY EAD.QUESTION_CODE, EAD.ANSWER) AS COUNT_QUES_ANS
FROM EMR_ADTAOE_DTL EAD , INTERFACE_ADT_AOE_MASTER IAM, TEST T
WHERE T.TEST_ID = EAD.TEST_ID
AND IAM.TEST_CODE = T.TEST_CODE
AND EAD.SOURCE_SYSTEM = IAM.SOURCE_SYSTEM
AND EAD.QUESTION_CODE = IAM.QUESTION_CODE
AND EAD.PATIENT_ID = IN_PATIENT_ID
AND EAD.FACILITY_ID = IN_FACILITY_ID
AND (TRUNC(EAD.DRAW_DATE) = IN_DRAW_DT
OR TRUNC(EAD.DRAW_DATE) = TRUNC(TO_DATE('12-31-2999','mm-dd-yyyy')))
AND EAD.SOURCE_SYSTEM = IN_REQUISITION_NUMBER) SUB;
IF
VN_MAX_COUNT > 1 THEN
SPL_SPN_ERROR_LOGGING_SPK.INFO_PROC
(IC_PACKAGE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IC_PROCEDURE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IN_BATCH_ID => '100'
,IC_MESSAGE_TEXT => 'exact patient duplicate scenario'||' vn_max_count:'||VN_MAX_COUNT);
OPEN VR_QUES_AND_ANS FOR
SELECT DISTINCT IAM.QUESTION_CODE,
(SELECT DISTINCT CASE
WHEN EAD.ANSWER IS NULL THEN NULL
WHEN LENGTH(TRIM(TRANSLATE(EAD.ANSWER, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', ' '))) IS NULL THEN EAD.ANSWER
ELSE TO_CHAR(TRUNC(EAD.ANSWER * DECODE(UPPER(IAM.UOM), 'KGS', 2.20462,1),2))
END
FROM EMR_ADTAOE_DTL EAD , TEST T
WHERE T.TEST_ID = EAD.TEST_ID
AND IAM.TEST_CODE = T.TEST_CODE
AND EAD.SOURCE_SYSTEM = IAM.SOURCE_SYSTEM
AND EAD.QUESTION_CODE = IAM.QUESTION_CODE
AND EAD.PATIENT_ID = IN_PATIENT_ID
AND EAD.FACILITY_ID = IN_FACILITY_ID
AND (TRUNC(EAD.DRAW_DATE) = IN_DRAW_DT
OR TRUNC(EAD.DRAW_DATE) = TRUNC(TO_DATE('12-31-2999','mm-dd-yyyy')))
AND EAD.SOURCE_SYSTEM = IN_CORP_ACRONYM
AND EAD.ANSWER IS NOT NULL
AND EAD.STATUS = DECODE(IAM.MATCH_TYPE, 'AT', EAD.STATUS, 'N')
) AS ANSWER
FROM INTERFACE_ADT_AOE_MASTER IAM
WHERE IAM.SOURCE_SYSTEM = IN_CORP_ACRONYM
AND IAM.TEST_CODE IN (SELECT ORD.TEST_CODE
FROM ORDER_REQUISITION_DETAIL ORD
WHERE ORD.REQUISITION_HDR_ID = (SELECT ORH.REQUISITION_HDR_ID
FROM ORDER_REQUISITION_HEADER ORH
WHERE ORH.REQUISITION_NUMBER = IN_REQUISITION_NUMBER)
AND EXISTS (SELECT 1 FROM EMR_ADTAOE_DTL EAD1, INTERFACE_ADT_AOE_MASTER IAM1, TEST T1
WHERE ORD.TEST_ID = EAD1.TEST_ID
AND IAM1.TEST_CODE = T1.TEST_CODE
AND EAD1.SOURCE_SYSTEM = IAM1.SOURCE_SYSTEM
AND EAD1.QUESTION_CODE = IAM1.QUESTION_CODE
AND EAD1.PATIENT_ID = IN_PATIENT_ID
AND EAD1.FACILITY_ID = IN_FACILITY_ID
AND (TRUNC(EAD1.DRAW_DATE) = IN_DRAW_DT
OR TRUNC(EAD1.DRAW_DATE) = TRUNC(TO_DATE('12-31-2999','mm-dd-yyyy')))
AND EAD1.SOURCE_SYSTEM = IN_CORP_ACRONYM
AND EAD1.ANSWER IS NOT NULL
AND EAD1.STATUS = DECODE(IAM1.MATCH_TYPE, 'AT', EAD1.STATUS, 'N')));
ELSIF
VN_MAX_COUNT = 1 THEN
SPL_SPN_ERROR_LOGGING_SPK.INFO_PROC
(IC_PACKAGE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IC_PROCEDURE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IN_BATCH_ID => '100'
,IC_MESSAGE_TEXT => 'exact patient unique scenario'||' vn_max_count:'||VN_MAX_COUNT);
OPEN VR_QUES_AND_ANS FOR
SELECT DISTINCT IAM.QUESTION_CODE,
(SELECT DISTINCT CASE
WHEN EAD.ANSWER IS NULL THEN NULL
WHEN LENGTH(TRIM(TRANSLATE(EAD.ANSWER, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', ' '))) IS NULL THEN EAD.ANSWER
ELSE TO_CHAR(TRUNC(EAD.ANSWER * DECODE(UPPER(IAM.UOM), 'KGS', 2.20462,1),2))
END
FROM EMR_ADTAOE_DTL EAD , TEST T
WHERE T.TEST_ID = EAD.TEST_ID
AND IAM.TEST_CODE = T.TEST_CODE
AND EAD.SOURCE_SYSTEM = IAM.SOURCE_SYSTEM
AND EAD.QUESTION_CODE = IAM.QUESTION_CODE
AND EAD.PATIENT_ID = IN_PATIENT_ID
AND EAD.FACILITY_ID = IN_FACILITY_ID
AND (TRUNC(EAD.DRAW_DATE) = IN_DRAW_DT
OR TRUNC(EAD.DRAW_DATE) = TRUNC(TO_DATE('12-31-2999','mm-dd-yyyy')))
AND EAD.SOURCE_SYSTEM = IN_CORP_ACRONYM
AND EAD.ANSWER IS NOT NULL
AND EAD.STATUS = DECODE(IAM.MATCH_TYPE, 'AT', EAD.STATUS, 'N')
) AS ANSWER
FROM INTERFACE_ADT_AOE_MASTER IAM
WHERE IAM.SOURCE_SYSTEM = IN_CORP_ACRONYM
AND IAM.TEST_CODE IN (SELECT ORD.TEST_CODE
FROM ORDER_REQUISITION_DETAIL ORD
WHERE ORD.REQUISITION_HDR_ID = (SELECT ORH.REQUISITION_HDR_ID
FROM ORDER_REQUISITION_HEADER ORH
WHERE ORH.REQUISITION_NUMBER = IN_REQUISITION_NUMBER));
END IF;
OR_QUES_AND_ANS := VR_QUES_AND_ANS;
SPL_SPN_ERROR_LOGGING_SPK.INFO_PROC
(IC_PACKAGE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IC_PROCEDURE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IN_BATCH_ID => '100'
,IC_MESSAGE_TEXT => 'vc_exact_boolean_val:'||VC_EXACT_BOOLEAN_VAL||
' vc_exact_par_boolean_val:'||VC_EXACT_PAR_BOOLEAN_VAL||
' OV_COMMENTS:'||OV_COMMENTS);
END IF;
IF
VC_DUPL_BOOLEAN_VAL = 'TRUE' AND
VC_DUPL_PAR_BOOLEAN_VAL = 'FALSE' THEN
OV_COMMENTS := VC_COMMENTS;
VC_EXACT_BOOLEAN_VAL := NULL;
VC_EXACT_PAR_BOOLEAN_VAL := NULL;
VC_REJECTED_BOOLEAN_VAL := NULL;
VC_REJECTED_PAR_BOOLEAN_VAL := NULL;
VC_RETURN_DUPL_PAT := 'Y';
ELSIF
--VC_DUPL_BOOLEAN_VAL = 'TRUE' AND
VC_DUPL_PAR_BOOLEAN_VAL = 'TRUE' THEN
OV_COMMENTS := VC_PAR_COMMENTS;
VC_EXACT_BOOLEAN_VAL := NULL;
VC_EXACT_PAR_BOOLEAN_VAL := NULL;
VC_REJECTED_BOOLEAN_VAL := NULL;
VC_REJECTED_PAR_BOOLEAN_VAL := NULL;
VC_RETURN_DUPL_PAT := 'Y';
END IF;
IF
VC_RETURN_DUPL_PAT = 'Y' THEN
--Returning result set (OV_COMMENTS,Question and Answer) for the duplicate patient.(Case 3 (AOE) and 4 (PARTIAL AOE))
SELECT MAX (SUB.COUNT_QUES_ANS)
INTO VN_MAX_COUNT FROM (SELECT COUNT(*) OVER (PARTITION BY EAD.QUESTION_CODE, EAD.ANSWER) AS COUNT_QUES_ANS
FROM EMR_ADTAOE_DTL EAD , INTERFACE_ADT_AOE_MASTER IAM, TEST T
WHERE T.TEST_ID = EAD.TEST_ID
AND IAM.TEST_CODE = T.TEST_CODE
AND EAD.SOURCE_SYSTEM = IAM.SOURCE_SYSTEM
AND EAD.QUESTION_CODE = IAM.QUESTION_CODE
AND EAD.PATIENT_ID = VN_DUPL_PAT_ID
AND EAD.FACILITY_ID = IN_FACILITY_ID
AND (TRUNC(EAD.DRAW_DATE) = IN_DRAW_DT
OR TRUNC(EAD.DRAW_DATE) = TRUNC(TO_DATE('12-31-2999','mm-dd-yyyy')))
AND EAD.SOURCE_SYSTEM = IN_REQUISITION_NUMBER) SUB;
IF
VN_MAX_COUNT > 1 THEN
SPL_SPN_ERROR_LOGGING_SPK.INFO_PROC
(IC_PACKAGE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IC_PROCEDURE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IN_BATCH_ID => '100'
,IC_MESSAGE_TEXT => 'duplicate patient duplicate scenario'||' vn_max_count:'||VN_MAX_COUNT);
OPEN VR_QUES_AND_ANS FOR
SELECT DISTINCT IAM.QUESTION_CODE,
(SELECT DISTINCT CASE
WHEN EAD.ANSWER IS NULL THEN NULL
WHEN LENGTH(TRIM(TRANSLATE(EAD.ANSWER, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', ' '))) IS NULL THEN EAD.ANSWER
ELSE TO_CHAR(TRUNC(EAD.ANSWER * DECODE(UPPER(IAM.UOM), 'KGS', 2.20462,1),2))
END
FROM EMR_ADTAOE_DTL EAD , TEST T
WHERE T.TEST_ID = EAD.TEST_ID
AND IAM.TEST_CODE = T.TEST_CODE
AND EAD.SOURCE_SYSTEM = IAM.SOURCE_SYSTEM
AND EAD.QUESTION_CODE = IAM.QUESTION_CODE
AND EAD.PATIENT_ID = VN_DUPL_PAT_ID
AND EAD.FACILITY_ID = IN_FACILITY_ID
AND (TRUNC(EAD.DRAW_DATE) = IN_DRAW_DT
OR TRUNC(EAD.DRAW_DATE) = TRUNC(TO_DATE('12-31-2999','mm-dd-yyyy')))
AND EAD.SOURCE_SYSTEM = IN_CORP_ACRONYM
AND EAD.ANSWER IS NOT NULL
AND EAD.STATUS = DECODE(IAM.MATCH_TYPE, 'AT', EAD.STATUS, 'N')
) AS ANSWER
FROM INTERFACE_ADT_AOE_MASTER IAM
WHERE IAM.SOURCE_SYSTEM = IN_CORP_ACRONYM
AND IAM.TEST_CODE IN (SELECT ORD.TEST_CODE
FROM ORDER_REQUISITION_DETAIL ORD
WHERE ORD.REQUISITION_HDR_ID = (SELECT ORH.REQUISITION_HDR_ID
FROM ORDER_REQUISITION_HEADER ORH
WHERE ORH.REQUISITION_NUMBER = IN_REQUISITION_NUMBER)
AND EXISTS (SELECT 1 FROM EMR_ADTAOE_DTL EAD1, INTERFACE_ADT_AOE_MASTER IAM1, TEST T1
WHERE ORD.TEST_ID = EAD1.TEST_ID
AND IAM1.TEST_CODE = T1.TEST_CODE
AND EAD1.SOURCE_SYSTEM = IAM1.SOURCE_SYSTEM
AND EAD1.QUESTION_CODE = IAM1.QUESTION_CODE
AND EAD1.PATIENT_ID = VN_DUPL_PAT_ID
AND EAD1.FACILITY_ID = IN_FACILITY_ID
AND (TRUNC(EAD1.DRAW_DATE) = IN_DRAW_DT
OR TRUNC(EAD1.DRAW_DATE) = TRUNC(TO_DATE('12-31-2999','mm-dd-yyyy')))
AND EAD1.SOURCE_SYSTEM = IN_CORP_ACRONYM
AND EAD1.ANSWER IS NOT NULL
AND EAD1.STATUS = DECODE(IAM1.MATCH_TYPE, 'AT', EAD1.STATUS, 'N')));
ELSIF
VN_MAX_COUNT = 1 THEN
SPL_SPN_ERROR_LOGGING_SPK.INFO_PROC
(IC_PACKAGE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IC_PROCEDURE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IN_BATCH_ID => '100'
,IC_MESSAGE_TEXT => 'duplicate patient unique scenario'||' vn_max_count:'||VN_MAX_COUNT);
OPEN VR_QUES_AND_ANS FOR
SELECT DISTINCT IAM.QUESTION_CODE,
(SELECT DISTINCT CASE
WHEN EAD.ANSWER IS NULL THEN NULL
WHEN LENGTH(TRIM(TRANSLATE(EAD.ANSWER, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', ' '))) IS NULL THEN EAD.ANSWER
ELSE TO_CHAR(TRUNC(EAD.ANSWER * DECODE(UPPER(IAM.UOM), 'KGS', 2.20462,1),2))
END
FROM EMR_ADTAOE_DTL EAD , TEST T
WHERE T.TEST_ID = EAD.TEST_ID
AND IAM.TEST_CODE = T.TEST_CODE
AND EAD.SOURCE_SYSTEM = IAM.SOURCE_SYSTEM
AND EAD.QUESTION_CODE = IAM.QUESTION_CODE
AND EAD.PATIENT_ID = VN_DUPL_PAT_ID
AND EAD.FACILITY_ID = IN_FACILITY_ID
AND (TRUNC(EAD.DRAW_DATE) = IN_DRAW_DT
OR TRUNC(EAD.DRAW_DATE) = TRUNC(TO_DATE('12-31-2999','mm-dd-yyyy')))
AND EAD.SOURCE_SYSTEM = IN_CORP_ACRONYM
AND EAD.ANSWER IS NOT NULL
AND EAD.STATUS = DECODE(IAM.MATCH_TYPE, 'AT', EAD.STATUS, 'N')
) AS ANSWER
FROM INTERFACE_ADT_AOE_MASTER IAM
WHERE IAM.SOURCE_SYSTEM = IN_CORP_ACRONYM
AND IAM.TEST_CODE IN (SELECT ORD.TEST_CODE
FROM ORDER_REQUISITION_DETAIL ORD
WHERE ORD.REQUISITION_HDR_ID = (SELECT ORH.REQUISITION_HDR_ID
FROM ORDER_REQUISITION_HEADER ORH
WHERE ORH.REQUISITION_NUMBER = IN_REQUISITION_NUMBER));
END IF;
OR_QUES_AND_ANS := VR_QUES_AND_ANS;
SPL_SPN_ERROR_LOGGING_SPK.INFO_PROC
(IC_PACKAGE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IC_PROCEDURE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IN_BATCH_ID => '100'
,IC_MESSAGE_TEXT => 'vc_dup_pat_ques:'||VC_DUP_PAT_QUES||
' vc_dupl_boolean_val:'||VC_DUPL_BOOLEAN_VAL||
' vc_dupl_par_boolean_val:'||VC_DUPL_PAR_BOOLEAN_VAL||
' OV_COMMENTS:'||OV_COMMENTS);
END IF;
IF
VC_REJECTED_BOOLEAN_VAL = 'TRUE' AND
VC_REJECTED_PAR_BOOLEAN_VAL = 'FALSE' THEN
OV_COMMENTS := VC_COMMENTS;
VC_EXACT_BOOLEAN_VAL := NULL;
VC_EXACT_PAR_BOOLEAN_VAL := NULL;
VC_DUPL_BOOLEAN_VAL := NULL;
VC_DUPL_PAR_BOOLEAN_VAL := NULL;
VC_RETURN_REJECT_PAT := 'Y';
ELSIF
--VC_REJECTED_BOOLEAN_VAL = 'FALSE' AND
VC_REJECTED_PAR_BOOLEAN_VAL = 'TRUE' THEN
OV_COMMENTS := VC_PAR_COMMENTS;
VC_EXACT_BOOLEAN_VAL := NULL;
VC_EXACT_PAR_BOOLEAN_VAL := NULL;
VC_DUPL_BOOLEAN_VAL := NULL;
VC_DUPL_PAR_BOOLEAN_VAL := NULL;
VC_RETURN_REJECT_PAT := 'Y';
ELSIF
VC_REJECTED_BOOLEAN_VAL = 'FALSE' AND
VC_REJECTED_PAR_BOOLEAN_VAL = 'FALSE' THEN
--Returning result set (OV_COMMENTS) for the rejected ADT.(Case 7)
OV_COMMENTS := 'AOE NOT RECEIVED IN ADT';
OR_QUES_AND_ANS := NULL;
SPL_SPN_ERROR_LOGGING_SPK.INFO_PROC
(IC_PACKAGE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IC_PROCEDURE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IN_BATCH_ID => '100'
,IC_MESSAGE_TEXT => 'vc_obx_ques:'||VC_OBX_QUES||
' vc_rejected_boolean_val:'||VC_REJECTED_BOOLEAN_VAL||
' vc_rejected_par_boolean_val:'||VC_REJECTED_PAR_BOOLEAN_VAL||
' OV_COMMENTS:'||OV_COMMENTS);
VC_EXACT_BOOLEAN_VAL := NULL;
VC_EXACT_PAR_BOOLEAN_VAL := NULL;
VC_DUPL_BOOLEAN_VAL := NULL;
VC_DUPL_PAR_BOOLEAN_VAL := NULL;
END IF;
IF
VC_RETURN_REJECT_PAT = 'Y' THEN
--Returning result set (OV_COMMENTS,Question and Answer) for the rejected ADT.(Case 5 (AOE) and 6 (PARTIAL AOE))
--In case of multiple external id with same patient, facility and draw date; the lastest record should be picked.
SELECT MAX(MSG_ID) INTO VN_MAX_MSG_ID FROM TT_A04_OBX_QUES_ANS_DTL;
OPEN VR_QUES_AND_ANS FOR
SELECT DISTINCT IAM.QUESTION_CODE,
(SELECT DISTINCT
CASE
WHEN TOBX.OBSERVATION_VALUE IS NULL THEN NULL
WHEN LENGTH(TRIM(TRANSLATE(TOBX.OBSERVATION_VALUE, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', ' '))) IS NULL THEN TOBX.OBSERVATION_VALUE
ELSE TO_CHAR(TRUNC(TOBX.OBSERVATION_VALUE * DECODE(UPPER(TOBX.UOM), 'KGS', 2.20462,1),2))
END
FROM TT_A04_OBX_QUES_ANS_DTL TOBX
WHERE TOBX.OBSERVATION_IDENTIFIER = IAM.QUESTION_CODE
AND TOBX.MSG_ID = VN_MAX_MSG_ID) AS ANSWER
FROM INTERFACE_ADT_AOE_MASTER IAM
WHERE SOURCE_SYSTEM = IN_CORP_ACRONYM;
OR_QUES_AND_ANS := VR_QUES_AND_ANS;
SPL_SPN_ERROR_LOGGING_SPK.INFO_PROC
(IC_PACKAGE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IC_PROCEDURE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IN_BATCH_ID => '100'
,IC_MESSAGE_TEXT => 'vc_rejected_boolean_val:'||VC_REJECTED_BOOLEAN_VAL||
' vc_rejected_par_boolean_val:'||VC_REJECTED_PAR_BOOLEAN_VAL||
' OV_COMMENTS:'||OV_COMMENTS);
END IF;
SPL_SPN_ERROR_LOGGING_SPK.INFO_PROC
(IC_PACKAGE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IC_PROCEDURE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IN_BATCH_ID => '100'
,IC_MESSAGE_TEXT => 'End of the procedure with Patient_Id:'||IN_PATIENT_ID||' Facility_Id:'||IN_FACILITY_ID||
' Draw_Dt:'||IN_DRAW_DT||' Requisition_Number:'||IN_REQUISITION_NUMBER||' Corp_Acronym:'||IN_CORP_ACRONYM||
' ABCDEF_Mrn:'||IN_ABCDEF_MRN||' Account_Number:'||IN_ACCOUNT_NUMBER||' Hlab_Num:'||IN_HLAB_NUM);
EXCEPTION
WHEN NO_DATA_FOUND THEN
SPL_SPN_ERROR_LOGGING_SPK.ERROR_PROC
(IC_PACKAGE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IC_PROCEDURE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IN_BATCH_ID => '100'
,IC_MESSAGE_TEXT => SQLERRM);
WHEN OTHERS THEN
SPL_SPN_ERROR_LOGGING_SPK.ERROR_PROC
(IC_PACKAGE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IC_PROCEDURE_NAME => 'SPL_SPN_MISSING_EMR_AOE_DTL'
,IN_BATCH_ID => '100'
,IC_MESSAGE_TEXT => SQLERRM);
END SPL_SPN_MISSING_EMR_AOE_DTL;
Regards,
BS2012.Hey Guys,
I'm sorry, that I troubled you all. But I found the issue and solved it.
The actual problem is residing at that max of that partition by query. I had a misconception that this query will always return a value which is positive number like 1,2 etc.
But sometimes it's returning null as well. So the ref cursor is fetching nothing. Now I've modified my code and everything is working fine. Thanks for your help and support.
Regards,
BS2012.
Maybe you are looking for
-
TPM password not found in MBAM database
There are other threads I have read through and did some troubleshooting, but still I´m stuck with this, how to get TPM password in MBAM database. Another question is, do I really need it? Isn´t recovery key enough? My situation is this: 1. Computers
-
P35 platinum ms7345, system won't load OS, stops at msi splash screen
motherboard in question is a p35 platinum ms7345 system won't load the OS, stops at msi splash screen, can't get into bios. LED code stops at G-R-G-R "Testing Base and Extended Memory" this is a system that I built over 8 months ago. the only thing
-
my list of 'devices' on 'FINDER' has 'turned off. gone to not (bright ) does not display backup disks or I- pad etc. I can't see my list to eject a disk or copy a file to I-Pad etc??? Also how would I un-zip a file I have downloaded to "download" a
-
Apple should be fixing this problem for free. It is a hardware issue. Check the Web. A lot of your customers are having the same problem. If I have to spend money to fix this I will be choosing a different cell phone provider
-
Best Practice guide for purchasing - payment card processing
Hello All, \Is there any Best Practice guide for Payments by credit card/ Payment card Processing. The biz process is: The purchasing department users purchase goods/services using their corporate credit cards. They obtain a credit card voucher/r