Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Overview

This section contains instructions on how to update mapping for activity codes and quantity.

Quantity

...

mapping

To insert a new Quantity Mapping please , run the query with the following template:

Code Block
languagesql
titleAdd New Quantity Mapping
declare @code nvarchar(100) = '1111-1111-111';
declare @cutomerQuantity float = 10;
declare @quantity float = 1;

declare @date datetime = GetDate();

INSERT INTO MappingQuantities (Code, CustomerQuantity, Quantity, UpdateDate, CreationDate) VALUES (@code, @cutomerQuantity, @quantity, @date, @date)

Note: All field fields are reqiredrequired.


To update the existed existing Quantity Mapping please , run the query with the following template:

Code Block
languagesql
titleUpdate Existing Quantity Mapping
UPDATE MappingQuantities SET Code = '1111-1111-222', CustomerQuantity = 10, Quantity = 2, UpdateDate = GetDate() WHERE Code = '1111-1111-111'

Note: You may can update as many fields as you want, but please update need but you must edit UpdateDate field in each query too. So, if If you want to update only Quantity field, run the query with the following template:

Code Block
languagesql
titleUpdate Existing Quantity Mapping
UPDATE MappingQuantities SET Quantity = 2, UpdateDate = GetDate() WHERE Code = '1111-1111-111'


To delete the existed an existing Quantity Mapping please , run the query with the following template:

Code Block
languagesql
titleDelete Quantity Mapping
declare @codeToDelete nvarchar(100) = '1111-1111-111';

declare @date datetime = GetDate();

UPDATE MappingQuantities SET UpdateDate = @date, DeleteDate = @date, IsDeleted = 1 WHERE Code = @codeToDelete

Note: This query marks the record as deleted , but doesn't delete it from the database. If you want need to delete it from the database please , run the query with the following template:

Code Block
languagesql
titleDelete Quantity Mapping
declare @codeToDelete nvarchar(100) = '1111-1111-111';

DELETE FROM MappingQuantities WHERE Code = @codeToDelete

Code

...

mapping

To insert a new Code Mapping please , run the query with the following template:

Code Block
languagesql
titleAdd New Code Mapping
declare @customerCode nvarchar(100) = '9999-9999-999';
declare @code nvarchar(100) = '1111-1111-111';
declare @cutomerQuantity float = 10;
declare @quantity float = 1;

declare @date datetime = GetDate();

INSERT INTO MappingCodes (CustomerCode, Code, CustomerQuantity, Quantity, UpdateDate, CreationDate) VALUES (@customerCode, @code, @cutomerQuantity, @quantity, @date, @date)

Note: CustomerQuantity and Quantity field are not requiredoptional. You can insert NULL value for these fields as in the following example below:

Code Block
languagesql
titleAdd New Code Mapping
declare @customerCode nvarchar(100) = '9999-9999-999';
declare @code nvarchar(100) = '1111-1111-111';
declare @cutomerQuantity float = NULL;
declare @quantity float = NULL;

declare @date datetime = GetDate();

INSERT INTO MappingCodes (CustomerCode, Code, CustomerQuantity, Quantity, UpdateDate, CreationDate) VALUES (@customerCode, @code, @cutomerQuantity, @quantity, @date, @date)


To update the existed an existing Code Mapping please , run the query with the following template:

Code Block
languagesql
titleUpdate Existing Code Mapping
UPDATE MappingCodes SET CustomerCode = '9999-9999-111', Code = '1111-1111-222', CustomerQuantity = 8, Quantity = 2, UpdateDate = GetDate() WHERE CustomerCode = '9999-9999-999'

Note: You may can update as many fields as you want, but please update need but you must edit UpdateDate field in each query too. So, if  If you want to update only Quantity field, run the query with the following template:

Code Block
languagesql
titleUpdate Existing Code Mapping
UPDATE MappingCodes SET Quantity = 2, UpdateDate = GetDate() WHERE CustomerCode = '9999-9999-999'


To delete the existed an existing Quantity Mapping please , run the query with the following template:

Code Block
languagesql
titleDelete Code Mapping
declare @customerCodeToDelete nvarchar(100) = '9999-9999-999';

declare @date datetime = GetDate();

UPDATE MappingCodes SET UpdateDate = @date, DeleteDate = @date, IsDeleted = 1 WHERE CustomerCode = @customerCodeToDelete

Note: This query marks the record as deleted , but doesn't delete it from the database. If you want need to delete it from the database please , run the query with the following template:

Code Block
languagesql
titleDelete Code Mapping
declare @customerCodeToDelete nvarchar(100) = '9999-9999-999';

DELETE FROM MappingCodes WHERE CustomerCode = @customerCodeToDelete

HCPCS

...

code mapping

To insert a new HCPCS Code Mapping please , run the query with the following template:

Code Block
languagesql
titleAdd New HCPCS Code Mapping
declare @customerCode nvarchar(100) = '9999-9999-999';
declare @hcpcsCode nvarchar(100) = 'A1111';
declare @lawsonNo int = 11111;
declare @cutomerQuantity float = 10;
declare @quantity float = 1;
declare @packagePrice float = 25.73;

declare @date datetime = GetDate();

INSERT INTO MappingCustomHcpcsCodes (CustomerCode, HcpcsCode, LawsonNo, CustomerQuantity, Quantity, PackagePrice, UpdateDate, CreationDate) 
VALUES (@customerCode, @hcpcsCode, @lawsonNo, @cutomerQuantity, @quantity, @packagePrice, @date, @date)

Note: LawsonNo field is not requiredoptional. You can insert NULL value for these fields it as in the following example below:

Code Block
languagesql
titleAdd New HCPCS Code Mapping
declare @customerCode nvarchar(100) = '9999-9999-999';
declare @hcpcsCode nvarchar(100) = 'A1111';
declare @lawsonNo int = NULL;
declare @cutomerQuantity float = 10;
declare @quantity float = 1;
declare @packagePrice float = 25.73;

declare @date datetime = GetDate();

INSERT INTO MappingCustomHcpcsCodes (CustomerCode, HcpcsCode, LawsonNo, CustomerQuantity, Quantity, PackagePrice, UpdateDate, CreationDate) 
VALUES (@customerCode, @hcpcsCode, @lawsonNo, @cutomerQuantity, @quantity, @packagePrice, @date, @date)


To update the existed an existing HCPCS Code Mapping please , run the query with the following template:

Code Block
languagesql
titleUpdate Existing HCPCS Code Mapping
UPDATE MappingCustomHcpcsCodes SET CustomerCode = '9999-9999-111', HcpcsCode = 'A1112', LawsonNo = 11112, CustomerQuantity = 8, Quantity = 2, 
PackagePrice = 25.52, UpdateDate = GetDate() 
WHERE CustomerCode = '9999-9999-999'

Note: You may can update as many fields as you want, but please update need but you must edit UpdateDate field in each query too. So, if  If you want to update only Quantity field, run the query with the following template:

Code Block
languagesql
titleUpdate Existing HCPCS Code Mapping
UPDATE MappingCustomHcpcsCodes SET Quantity = 2, UpdateDate = GetDate() WHERE CustomerCode = '9999-9999-999'


To delete the existed HCPCS an existing HCPCS Code Mapping please , run the query with the following template:

Code Block
languagesql
titleDelete HCPCS Code Mapping
declare @customerCodeToDelete nvarchar(100) = '9999-9999-999';

declare @date datetime = GetDate();

UPDATE MappingCustomHcpcsCodes SET UpdateDate = @date, DeleteDate = @date, IsDeleted = 1 WHERE CustomerCode = @customerCodeToDelete

Note: This query marks the record as deleted , but doesn't delete it from the database. If you want need to delete it from the database please , run the query with the following template:

...