Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 3 Next »

Overview

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

Quantity Mapping

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

Add 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 are reqired.

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

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

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

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

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

Delete 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 to delete it from the database please run the query with the following template:

Delete Quantity Mapping
declare @codeToDelete nvarchar(100) = '1111-1111-111';

DELETE FROM MappingQuantities WHERE Code = @codeToDelete

Code Mapping

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

Add 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 required. You can insert NULL value for these fields as in the following example:

Add 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 Code Mapping please run the query with the following template:

Update 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 update as many fields as you want, but please update UpdateDate field in each query. So, if you want to update only Quantity field run the query with the following template:

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

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

Delete 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 to delete it from the database please run the query with the following template:

Delete Code Mapping
declare @customerCodeToDelete nvarchar(100) = '9999-9999-999';

DELETE FROM MappingCodes CustomerCode = @customerCodeToDelete

HCPCS Code Mapping

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

Add 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 required. You can insert NULL value for these fields as in the following example:

Add 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 HCPCS Code Mapping please run the query with the following template:

Update 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 update as many fields as you want, but please update UpdateDate field in each query. So, if you want to update only Quantity field run the query with the following template:

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

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

Delete 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 to delete it from the database please run the query with the following template:

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

DELETE FROM MappingCustomHcpcsCodes WHERE CustomerCode = @customerCodeToDelete
  • No labels