If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
XML
I am using the following code to generate XML and it is working just how I
want it to except that I would like to include a customized header and footer. My preference was to write the text in order using a write file command in an access database. I am unsure how to include the XML content from the stored procedure. Can anyone point me in the right direction? TIA, Mary ALTER PROCEDURE [dbo].[mc_selEncounterReporting] -- Add the parameters for the stored procedure here @BatchID as int AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; -- write out the XML for encounter reporting for the batch id that was passed SELECT 1 AS Tag, NULL AS Parent, record_id AS [detail_record!1!record_id], billing_provider_last_name AS [detail_record!1!billing_provider_last_name!element], billing_provider_first_name AS [detail_record!1!billing_provider_first_name!elemen t], adjustment_type AS [detail_record!1!adjustment_type!element], billing_provider_id AS [detail_record!1!billing_provider_id!element], billing_provider_id_qualifier AS [detail_record!1!billing_provider_id_qualifier!elem ent], charges AS [detail_record!1!charges!element], claim_status AS [detail_record!1!claim_status!element], data_source AS [detail_record!1!data_source!element], member_share AS [detail_record!1!member_share!element], medicare_paid_amount AS [detail_record!1!medicare_paid_amount!element], original_id AS [detail_record!1!original_id!element], other_payer_paid_amount_primary AS [detail_record!1!other_payer_paid_amount_primary!el ement], other_payer_paid_amount_secondary AS [detail_record!1!other_payer_paid_amount_secondary! element], paid_amount AS [detail_record!1!paid_amount!element], parent_record_id AS [detail_record!1!parent_record_id!element], place_of_service AS [detail_record!1!place_of_service!element], procedure_code AS [detail_record!1!procedure_code!element], quantity AS [detail_record!1!quantity!element], posting_date AS [detail_record!1!posting_date!element], reciept_date AS [detail_record!1!reciept_date!element], recipient_death_date AS [detail_record!1!recipient_death_date!element], recipient_first_name AS [detail_record!1!recipient_first_name!element], recipient_last_name AS [detail_record!1!recipient_last_name!element], recipient_id AS [detail_record!1!recipient_id!element], record_type AS [detail_record!1!record_type!element] , service_date_from AS [detail_record!1!service_date_from!element], service_date_to AS [detail_record!1!service_date_to!element], spc AS [detail_record!1!spc!element], submitter_organization_id AS [detail_record!1!submitter_organization_id!element], support_indicator AS [detail_record!1!support_indicator!element], unit_or_basis_for_measurement_code AS [detail_record!1!unit_or_basis_for_measurement_code !element] FROM vw_EncounterPayroll AS detail_record WHERE BatchID = @BatchID FOR XML Explicit END |
Thread Tools | |
Display Modes | |
|
|