Oracle - SQL Query - Getting below error : I am getting **" column ambiguously defined"** error when i try running the below query.suggestion please        

    SELECT ROWNUM, sub.* FROM
              (SELECT orm.msg_id,
        --Facility
              msh.sending_corp as source_system,
              msh.sending_corp,
              msh.sending_facility,
              fsub.east_west_flag,
              fsub.account_number,
              fsub.HLAB_NUM,
              fsub.cid,
              fsub.facility_id,
        --Patient
              pid.EXT_PAT_ID,
              pid.patient_name,
              pid.ssn,
              pid.sex,
              pid.date_of_birth,
              pat.spectra_mrn,
              pat.patient_id,
              pv1.attending_doctor,
        --Order
              orc.order_control,
              orc.EXT_ORDER_ID,
              orc.draw_date,
              lab.LAB_ORDER_OCC_ID,
              pv1.modality,
              lab.MSG_SENT_TO_LAB_YN as order_transmit_status,
              xref.REQUISITION_NO,
              lab_test.DRAW_DT as src_draw_date,
              xref.REQUISITION_NO as src_req_number,
        --Test
              lab_test.LAB_ORDER_OCC_ID as order_id_of_ordertest_tbl,
              lab_test.LAB_ORDER_OCC_TEST_ID,
              emr.emr_order_number as emr_test_order_id_ordtst_tbl,
              lab_test.TEST_SENT_TO_LAB_YN as test_transmit_status,
              SUBSTR(obr.EXT_TEST_ORDER_ID, 1, DECODE(INSTR(obr.EXT_TEST_ORDER_ID,'-',1,1),0,LENGTH(obr.EXT_TEST_ORDER_ID),INSTR(obr.EXT_TEST_ORDER_ID,'-',1,1)-1)) EXT_TEST_ORDER_ID,
              obr.test_details,
              --obr.priority,
              SUBSTR(obr.collection_time,1,4) as collection_time,
              NVL(src.internal_code, obr.specimen_source) as specimen_source,
              NVL2(lab_test.LAB_ORDER_OCC_TEST_ID,tst.SPECIMEN_TYPE,SUBSTR(tst.container, 1, INSTR(tst.container,'|',1,1)-1) || '^' || SUBSTR(tst.container, INSTR(tst.container, '|',-1,1)+1)) AS collector_identifier,
              obr.EXT_TEST_DETAILS,
              obr.frequency,
              NVL2(lab_test.LAB_ORDER_OCC_TEST_ID,tst.test_code,tst.test_code) AS test_code,
              NVL2(lab_test.LAB_ORDER_OCC_TEST_ID,tst.test_name,tst.test_name) AS test_name,
              NVL2(lab_test.LAB_ORDER_OCC_TEST_ID,tst.test_id,tst.test_id) AS test_id,
              obr.sl_no,
              xref.ACCESSION_NO,
              tst.order_flag,
              obr.ORDERING_DOCTOR,
              DECODE(INSTR(obr.EXT_TEST_ORDER_ID,'-',1,1),0,NULL,SUBSTR(obr.EXT_TEST_ORDER_ID, INSTR(obr.EXT_TEST_ORDER_ID,'-',1,1)+ 1)) as reschedule_count,
        --Diag
              lab_test_dg.LAB_ORDER_OCC_TEST_ID,
              dg1.diagnosis_code,
              icd.ICD9_CODE,
              icd.ICD9_CODE_ID,
              icd.description,
              dg1.diagnosis_coding_method,
              dg1.obr_sl_no
        
            FROM INT_RCV_ORM orm
        --Facility
            INNER JOIN INT_RCV_ORM_MSH msh ON orm.MSG_ID = msh.msg_id
            LEFT OUTER JOIN
            (SELECT * FROM (
            (SELECT rank() OVER (PARTITION BY fac.facility_id ORDER BY DECODE(fad.ACCOUNT_TYPE,'NA','ZZZ',fad.ACCOUNT_TYPE)) RNK,
            fad.* FROM facility fac ,Facility_Account_Detail fad WHERE
                 fac.facility_id = fad.facility_id and 
                UPPER(fac.facility_status) IN ('A')
            AND UPPER(fad.ACCOUNT_TYPE) NOT IN ('STAFF','WATER')))
            WHERE RNK  = 1
            )fsub
            ON fsub.facility_id   = msh.sending_facility
        --Patient
            INNER JOIN INT_RCV_ORM_PID pid  ON orm.msg_id = pid.msg_id
            LEFT OUTER JOIN patient pat ON pid.EXT_PAT_ID = pat.EXTERNAL_ID
            INNER JOIN INT_RCV_ORM_PV1 pv1  ON orm.msg_id = pv1.msg_id
        --Orders
            INNER JOIN INT_RCV_ORM_ORC orc  ON orm.msg_id = orc.msg_id
            LEFT OUTER JOIN EMR_LAB_ORDER_DTL emr ON emr.emr_order_number = orc.EXT_ORDER_ID
        	left outer join LAB_ORDER_OCC lab on  lab.LAB_ORDER_OCC_ID= emr.LAB_ORDER_OCC_ID
        	left outer join ORDER_OCC_REQUISITION_X_REF xref on xref.LAB_ORDER_OCC_ID=lab.LAB_ORDER_OCC_ID 
        		
        --Order Test
            INNER JOIN INT_RCV_ORM_OBR obr  ON orm.msg_id = obr.msg_id
        	left outer join LAB_ORDER_OCC_TEST lab_test on lab_test.LAB_ORDER_OCC_ID = xref.LAB_ORDER_OCC_ID
            AND emr.emr_order_number = SUBSTR(obr.EXT_TEST_ORDER_ID, 1, DECODE(INSTR(obr.EXT_TEST_ORDER_ID,'-',1,1),0,LENGTH(obr.EXT_TEST_ORDER_ID),INSTR(obr.EXT_TEST_ORDER_ID,'-',1,1)-1)) AND lab_test.draw_dt = TO_DATE(orc.draw_date,'YYYYMMDD')
            LEFT OUTER JOIN test tst ON tst.test_code = SUBSTR(obr.test_details,1,INSTR(obr.test_details,'^',1,1)-1) AND NVL(tst.inactive_date,TRUNC(SYSDATE)) >= TRUNC(SYSDATE) AND tst.orderable_yn = 'Y' AND (tst.test_flag LIKE '%P%' OR tst.test_flag LIKE '%T%')
            LEFT OUTER JOIN source src ON src.source_name = obr.specimen_source AND src.test_id = tst.test_id
        --Order Test Diag
            LEFT OUTER JOIN INT_RCV_ORM_DG1 dg1  ON orm.msg_id = dg1.msg_id AND dg1.obr_sl_no = obr.sl_no
        	left outer join LAB_ORDER_OCC_TEST_DIAG lab_test_dg on lab_test_dg.LAB_ORDER_OCC_TEST_ID = lab_test.LAB_ORDER_OCC_TEST_ID
            LEFT OUTER JOIN ICD9_CODE icd ON icd.ICD9_CODE = dg1.diagnosis_code
        
        WHERE orm.msg_id BETWEEN in_start_batch_id AND in_end_batch_id
          AND orm.msg_id  NOT IN (SELECT msg_id FROM GTT_ERROR_RCV_LOG)
          AND orm.PROCESSING_STATUS != 'E'
        ORDER BY msg_id) sub
        LOG ERRORS INTO ERR$_GTT_RCV_ORDER ('RCV_INSERT_GTT_ERROR') REJECT LIMIT UNLIMITED;
        
Query is within the procedure to populate temporary tables.Suggestions please.
I am getting **" column ambiguously defined"** error when i try running the below query.suggestion please 
Query is within the procedure to populate temporary tables.Suggestions please