<?xml version="1.0" encoding="utf-8"?><Database Name="EMR_SS_SSB" Class="LINQ_BillingDataContext" xmlns="http://schemas.microsoft.com/linqtosql/dbml/2007">
  <Table Name="dbo.EMR_PaymentView" Member="EMR_PaymentViews">
    <Type Name="EMR_PaymentView">
      <Column Name="PaymentID" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
      <Column Name="PaymentDate" Type="System.DateTime" DbType="DateTime NOT NULL" CanBeNull="false" />
      <Column Name="PaymentAmount" Type="System.Decimal" DbType="Decimal(18,0) NOT NULL" CanBeNull="false" />
      <Column Name="VisitID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="PatientID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="Remark" Type="System.String" DbType="NVarChar(500)" CanBeNull="true" />
      <Column Name="Active" Type="System.Boolean" DbType="Bit NOT NULL" CanBeNull="false" />
      <Column Name="CreatedBy" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
      <Column Name="CreatedOn" Type="System.DateTime" DbType="DateTime NOT NULL" CanBeNull="false" />
      <Column Name="ModifiedBy" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
      <Column Name="ModifiedOn" Type="System.DateTime" DbType="DateTime NOT NULL" CanBeNull="false" />
      <Column Name="LastAction" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
      <Column Name="CreatedByCode" Type="System.String" DbType="NVarChar(20)" CanBeNull="true" />
      <Column Name="ModifiedByCode" Type="System.String" DbType="NVarChar(20)" CanBeNull="true" />
      <Column Name="InvoiceID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="InvoiceNo" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="CurrencyExchangeCode" Type="System.String" DbType="VarChar(50)" CanBeNull="true" />
      <Column Name="CurrencyExchangeName" Type="System.String" DbType="VarChar(50)" CanBeNull="true" />
      <Column Name="CurrencyExchangeID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
    </Type>
  </Table>
  <Table Name="dbo.EMR_Payment" Member="EMR_Payments">
    <Type Name="EMR_Payment">
      <Column Name="PaymentID" Type="System.String" DbType="NVarChar(50) NOT NULL" IsPrimaryKey="true" CanBeNull="false" />
      <Column Name="InvoiceID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="PaymentDate" Type="System.DateTime" DbType="DateTime NOT NULL" CanBeNull="false" />
      <Column Name="PaymentAmount" Type="System.Decimal" DbType="Decimal(18,0) NOT NULL" CanBeNull="false" />
      <Column Name="VisitID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="PatientID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="Remark" Type="System.String" DbType="NVarChar(500)" CanBeNull="true" />
      <Column Name="CurrencyExchangeID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="Active" Type="System.Boolean" DbType="Bit NOT NULL" CanBeNull="false" />
      <Column Name="CreatedBy" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
      <Column Name="CreatedOn" Type="System.DateTime" DbType="DateTime NOT NULL" CanBeNull="false" />
      <Column Name="ModifiedBy" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
      <Column Name="ModifiedOn" Type="System.DateTime" DbType="DateTime NOT NULL" CanBeNull="false" />
      <Column Name="LastAction" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
    </Type>
  </Table>
  <Table Name="dbo.EMR_Order" Member="EMR_Orders">
    <Type Name="EMR_Order">
      <Column Name="OrderID" Type="System.String" DbType="NVarChar(50) NOT NULL" IsPrimaryKey="true" CanBeNull="false" />
      <Column Name="PatientID" Type="System.String" DbType="NVarChar(200)" CanBeNull="true" />
      <Column Name="OrderNo" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="StartOn" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
      <Column Name="OrderStatus" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="ReferenceType" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="ReferenceID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="Active" Type="System.Boolean" DbType="Bit NOT NULL" CanBeNull="false" />
      <Column Name="CreatedBy" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
      <Column Name="CreatedOn" Type="System.DateTime" DbType="DateTime NOT NULL" CanBeNull="false" />
      <Column Name="ModifiedBy" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
      <Column Name="ModifiedOn" Type="System.DateTime" DbType="DateTime NOT NULL" CanBeNull="false" />
      <Column Name="LastAction" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
      <Column Name="OrderAmount" Type="System.Decimal" DbType="Decimal(18,0) NOT NULL" CanBeNull="false" />
      <Column Name="PrintLeaveLetter" Type="System.Boolean" DbType="Bit" CanBeNull="true" />
    </Type>
  </Table>
  <Table Name="dbo.EMR_OrderForAllDataView" Member="EMR_OrderForAllDataViews">
    <Type Name="EMR_OrderForAllDataView">
      <Column Name="OrderID" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
      <Column Name="PatientID" Type="System.String" DbType="NVarChar(200)" CanBeNull="true" />
      <Column Name="OrderNo" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="StartOn" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
      <Column Name="OrderStatus" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="ReferenceType" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="ReferenceID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="Active" Type="System.Boolean" DbType="Bit NOT NULL" CanBeNull="false" />
      <Column Name="CreatedBy" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
      <Column Name="CreatedOn" Type="System.DateTime" DbType="DateTime NOT NULL" CanBeNull="false" />
      <Column Name="ModifiedBy" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
      <Column Name="ModifiedOn" Type="System.DateTime" DbType="DateTime NOT NULL" CanBeNull="false" />
      <Column Name="LastAction" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
      <Column Name="VisitNo" Type="System.String" DbType="NVarChar(200)" CanBeNull="true" />
      <Column Name="CreatedByCode" Type="System.String" DbType="NVarChar(20)" CanBeNull="true" />
      <Column Name="ModifiedByCode" Type="System.String" DbType="NVarChar(20)" CanBeNull="true" />
      <Column Name="PatientNo" Type="System.String" DbType="NVarChar(200)" CanBeNull="true" />
      <Column Name="PatientName" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="InvoiceID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="IsRetire" Type="System.Boolean" DbType="Bit" CanBeNull="true" />
    </Type>
  </Table>
  <Table Name="dbo.EMR_OrderItem" Member="EMR_OrderItems">
    <Type Name="EMR_OrderItem">
      <Column Name="OrderItemID" Type="System.String" DbType="NVarChar(50) NOT NULL" IsPrimaryKey="true" CanBeNull="false" />
      <Column Name="OrderID" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
      <Column Name="ItemID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="UnitID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="Price" Type="System.Decimal" DbType="Decimal(18,0)" CanBeNull="true" />
      <Column Name="Qty" Type="System.Int32" DbType="Int" CanBeNull="true" />
      <Column Name="Cost" Type="System.Decimal" DbType="Decimal(18,0)" CanBeNull="true" />
      <Column Name="DiscountPercentage" Type="System.Boolean" DbType="Bit" CanBeNull="true" />
      <Column Name="DiscountValue" Type="System.Decimal" DbType="Decimal(18,0)" CanBeNull="true" />
      <Column Name="Remarks" Type="System.String" DbType="NChar(500)" CanBeNull="true" />
      <Column Name="TotalCost" Type="System.Decimal" DbType="Decimal(18,0)" CanBeNull="true" />
      <Column Name="AddedBy" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="AddedOn" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
      <Column Name="Active" Type="System.Boolean" DbType="Bit NOT NULL" CanBeNull="false" />
      <Column Name="CreatedBy" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
      <Column Name="CreatedOn" Type="System.DateTime" DbType="DateTime NOT NULL" CanBeNull="false" />
      <Column Name="ModifiedBy" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
      <Column Name="ModifiedOn" Type="System.DateTime" DbType="DateTime NOT NULL" CanBeNull="false" />
      <Column Name="LastAction" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
      <Column Name="Discount" Type="System.Decimal" DbType="Decimal(18,0)" CanBeNull="true" />
      <Column Name="AddedType" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="IsFromMR" Type="System.Boolean" DbType="Bit" CanBeNull="true" />
      <Column Name="DosageTime" Type="System.String" DbType="NVarChar(500)" CanBeNull="true" />
      <Column Name="DosageAmount" Type="System.String" DbType="NVarChar(500)" CanBeNull="true" />
      <Column Name="DosageInstruction" Type="System.String" DbType="NVarChar(500)" CanBeNull="true" />
      <Column Name="IsOuterMedicine" Type="System.Boolean" DbType="Bit" CanBeNull="true" />
      <Column Name="DosageID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="DosageDays" Type="System.Decimal" DbType="Decimal(18,0)" CanBeNull="true" />
      <Column Name="isReferOutside" Type="System.Boolean" DbType="Bit" CanBeNull="true" />
      <Column Name="ReFerClinicID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="isCreateInvoiceOnRefer" Type="System.Boolean" DbType="Bit" CanBeNull="true" />
    </Type>
  </Table>
  <Table Name="dbo.EMR_OrderView" Member="EMR_OrderViews">
    <Type Name="EMR_OrderView">
      <Column Name="OrderID" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
      <Column Name="PatientID" Type="System.String" DbType="NVarChar(200)" CanBeNull="true" />
      <Column Name="OrderNo" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="StartOn" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
      <Column Name="OrderStatus" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="ReferenceType" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="ReferenceID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="Active" Type="System.Boolean" DbType="Bit NOT NULL" CanBeNull="false" />
      <Column Name="CreatedBy" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
      <Column Name="CreatedOn" Type="System.DateTime" DbType="DateTime NOT NULL" CanBeNull="false" />
      <Column Name="ModifiedBy" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
      <Column Name="ModifiedOn" Type="System.DateTime" DbType="DateTime NOT NULL" CanBeNull="false" />
      <Column Name="LastAction" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
      <Column Name="CreatedByCode" Type="System.String" DbType="NVarChar(20)" CanBeNull="true" />
      <Column Name="ModifiedByCode" Type="System.String" DbType="NVarChar(20)" CanBeNull="true" />
      <Column Name="PatientNo" Type="System.String" DbType="NVarChar(200)" CanBeNull="true" />
      <Column Name="PatientName" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="VisitNo" Type="System.String" DbType="NVarChar(200)" CanBeNull="true" />
      <Column Name="PrintLeaveLetter" Type="System.Boolean" DbType="Bit" CanBeNull="true" />
      <Column Name="PerSSINo" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="IsRetire" Type="System.Boolean" DbType="Bit" CanBeNull="true" />
      <Column Name="LocationID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="DoctorName" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="FirstName" Type="System.String" DbType="NVarChar(500)" CanBeNull="true" />
    </Type>
  </Table>
  <Table Name="dbo.EMR_OrderCapitationItem" Member="EMR_OrderCapitationItems">
    <Type Name="EMR_OrderCapitationItem">
      <Column Name="OrderCapitationItemID" Type="System.String" DbType="NVarChar(50) NOT NULL" IsPrimaryKey="true" CanBeNull="false" />
      <Column Name="CapitationItemID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="DosageID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="OrderID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="Qty" Type="System.Int32" DbType="Int" CanBeNull="true" />
      <Column Name="DosageDays" Type="System.Decimal" DbType="Decimal(18,0)" CanBeNull="true" />
      <Column Name="TotalCost" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="DosageTime" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="DosageAmount" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="DosageInstruction" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="AddedType" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="Active" Type="System.Boolean" DbType="Bit" CanBeNull="true" />
      <Column Name="AddedBy" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="AddedOn" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
      <Column Name="CreatedBy" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="CreatedOn" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
      <Column Name="ModifiedBy" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="ModifedOn" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
      <Column Name="LastAction" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
    </Type>
  </Table>
  <Table Name="dbo.EMR_OrderCapitationItemView" Member="EMR_OrderCapitationItemViews">
    <Type Name="EMR_OrderCapitationItemView">
      <Column Name="CapitationItemID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="CapitationItemNo" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="CapitationItemName" Type="System.String" DbType="NVarChar(100)" CanBeNull="true" />
      <Column Name="CapitationItemUnit" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="CapitationItemPrice" Type="System.Decimal" DbType="Decimal(18,0)" CanBeNull="true" />
      <Column Name="DosageID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="DosageCode" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="DosageName" Type="System.String" DbType="NVarChar(500)" CanBeNull="true" />
      <Column Name="OrderID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="PatientID" Type="System.String" DbType="NVarChar(200)" CanBeNull="true" />
      <Column Name="OrderNo" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="StartOn" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
      <Column Name="ReferenceType" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="ReferenceID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="Qty" Type="System.Int32" DbType="Int" CanBeNull="true" />
      <Column Name="DosageDays" Type="System.Decimal" DbType="Decimal(18,0)" CanBeNull="true" />
      <Column Name="DosageTime" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="TotalCost" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="DosageAmount" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="DosageInstruction" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="AddedType" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="Active" Type="System.Boolean" DbType="Bit" CanBeNull="true" />
      <Column Name="AddedBy" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="AddedOn" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
      <Column Name="CreatedOn" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
      <Column Name="ModifedOn" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
      <Column Name="LastAction" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="MoidfiedByCode" Type="System.String" DbType="NVarChar(20)" CanBeNull="true" />
      <Column Name="ModifiedBy" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="CreatedBy" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="CreatedByCode" Type="System.String" DbType="NVarChar(20)" CanBeNull="true" />
      <Column Name="OrderCapitationItemID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
    </Type>
  </Table>
  <Table Name="dbo.EMR_Invoice" Member="EMR_Invoices">
    <Type Name="EMR_Invoice">
      <Column Name="InvoiceID" Type="System.String" DbType="NVarChar(50) NOT NULL" IsPrimaryKey="true" CanBeNull="false" />
      <Column Name="InvoiceNo" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="InvoiceType" Type="System.String" DbType="NVarChar(10)" CanBeNull="true" />
      <Column Name="VisitID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="PatientID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="InvoiceDate" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
      <Column Name="Status" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="InvoicePayment" Type="System.Decimal" DbType="Decimal(18,0)" CanBeNull="true" />
      <Column Name="TotalCost" Type="System.Decimal" DbType="Decimal(18,0)" CanBeNull="true" />
      <Column Name="DiscountPercent" Type="System.Decimal" DbType="Decimal(18,0)" CanBeNull="true" />
      <Column Name="TotalDiscount" Type="System.Decimal" DbType="Decimal(18,0)" CanBeNull="true" />
      <Column Name="Balance" Type="System.Decimal" DbType="Decimal(18,0)" CanBeNull="true" />
      <Column Name="Other1Remark" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="Other1Amount" Type="System.Decimal" DbType="Decimal(18,0)" CanBeNull="true" />
      <Column Name="Other2Remark" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="Other2Amount" Type="System.Decimal" DbType="Decimal(18,0)" CanBeNull="true" />
      <Column Name="Remark" Type="System.String" DbType="NVarChar(500)" CanBeNull="true" />
      <Column Name="Active" Type="System.Boolean" DbType="Bit NOT NULL" CanBeNull="false" />
      <Column Name="CreatedBy" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
      <Column Name="CreatedOn" Type="System.DateTime" DbType="DateTime NOT NULL" CanBeNull="false" />
      <Column Name="ModifiedBy" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
      <Column Name="ModifiedOn" Type="System.DateTime" DbType="DateTime NOT NULL" CanBeNull="false" />
      <Column Name="LastAction" Type="System.String" DbType="NVarChar(MAX) NOT NULL" CanBeNull="false" />
      <Column Name="CurrencyExchangeID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="LocationID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
    </Type>
  </Table>
  <Table Name="dbo.EMR_InvoiceView" Member="EMR_InvoiceViews">
    <Type Name="EMR_InvoiceView">
      <Column Name="InvoiceID" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
      <Column Name="InvoiceNo" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="InvoiceType" Type="System.String" DbType="NVarChar(10)" CanBeNull="true" />
      <Column Name="VisitID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="PatientID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="InvoiceDate" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
      <Column Name="Status" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="TotalCost" Type="System.Decimal" DbType="Decimal(18,0)" CanBeNull="true" />
      <Column Name="DiscountPercent" Type="System.Decimal" DbType="Decimal(18,0)" CanBeNull="true" />
      <Column Name="TotalDiscount" Type="System.Decimal" DbType="Decimal(18,0)" CanBeNull="true" />
      <Column Name="Balance" Type="System.Decimal" DbType="Decimal(18,0)" CanBeNull="true" />
      <Column Name="Other1Remark" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="Other1Amount" Type="System.Decimal" DbType="Decimal(18,0)" CanBeNull="true" />
      <Column Name="Other2Remark" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="Other2Amount" Type="System.Decimal" DbType="Decimal(18,0)" CanBeNull="true" />
      <Column Name="Remark" Type="System.String" DbType="NVarChar(500)" CanBeNull="true" />
      <Column Name="Active" Type="System.Boolean" DbType="Bit NOT NULL" CanBeNull="false" />
      <Column Name="CreatedBy" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
      <Column Name="CreatedOn" Type="System.DateTime" DbType="DateTime NOT NULL" CanBeNull="false" />
      <Column Name="ModifiedBy" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
      <Column Name="ModifiedOn" Type="System.DateTime" DbType="DateTime NOT NULL" CanBeNull="false" />
      <Column Name="LastAction" Type="System.String" DbType="NVarChar(MAX) NOT NULL" CanBeNull="false" />
      <Column Name="VisitNo" Type="System.String" DbType="NVarChar(200)" CanBeNull="true" />
      <Column Name="VisitType" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="PatientNo" Type="System.String" DbType="NVarChar(200)" CanBeNull="true" />
      <Column Name="PatientName" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="CreatedByCode" Type="System.String" DbType="NVarChar(20)" CanBeNull="true" />
      <Column Name="ModifiedByCode" Type="System.String" DbType="NVarChar(20)" CanBeNull="true" />
      <Column Name="AddressNo" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="Lane" Type="System.String" DbType="NVarChar(200)" CanBeNull="true" />
      <Column Name="InvoicePayment" Type="System.Decimal" DbType="Decimal(18,0)" CanBeNull="true" />
      <Column Name="Building" Type="System.String" DbType="NVarChar(100)" CanBeNull="true" />
      <Column Name="Road" Type="System.String" DbType="NVarChar(200)" CanBeNull="true" />
      <Column Name="Area" Type="System.String" DbType="NVarChar(200)" CanBeNull="true" />
      <Column Name="City" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="District" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="State" Type="System.String" DbType="NVarChar(100)" CanBeNull="true" />
      <Column Name="Country" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="CurrencyExchangeCode" Type="System.String" DbType="VarChar(50)" CanBeNull="true" />
      <Column Name="CurrencyExchangeName" Type="System.String" DbType="VarChar(50)" CanBeNull="true" />
      <Column Name="CurrencyExchangeID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="CurrencyExchangeRate" Type="System.Decimal" DbType="Decimal(18,2)" CanBeNull="true" />
      <Column Name="LocationID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="LocationName" Type="System.String" DbType="NVarChar(500)" CanBeNull="true" />
      <Column Name="LocationCode" Type="System.String" DbType="NVarChar(100)" CanBeNull="true" />
      <Column Name="PerSSINo" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="IsRetire" Type="System.Boolean" DbType="Bit" CanBeNull="true" />
      <Column Name="EMRLocationID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="StationID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="StationName" Type="System.String" DbType="NVarChar(500)" CanBeNull="true" />
      <Column Name="ClinicTypeID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="ClinicTypeName" Type="System.String" DbType="NVarChar(500)" CanBeNull="true" />
      <Column Name="IsEnroll" Type="System.String" DbType="NVarChar(20)" CanBeNull="true" />
      <Column Name="ConsultationFee" Type="System.Decimal" DbType="Decimal(18,0)" CanBeNull="true" />
      <Column Name="SpecialityCodeNo" Type="System.String" DbType="NVarChar(500)" CanBeNull="true" />
      <Column Name="Establishment" Type="System.String" DbType="NVarChar(200)" CanBeNull="true" />
      <Column Name="ServiceType" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="ProcedureType" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="FirstName" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
    </Type>
  </Table>
  <Table Name="dbo.EMR_OrderItemView" Member="EMR_OrderItemViews">
    <Type Name="EMR_OrderItemView">
      <Column Name="OrderItemID" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
      <Column Name="OrderID" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
      <Column Name="ItemID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="UnitID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="Price" Type="System.Decimal" DbType="Decimal(18,0)" CanBeNull="true" />
      <Column Name="Qty" Type="System.Int32" DbType="Int" CanBeNull="true" />
      <Column Name="Cost" Type="System.Decimal" DbType="Decimal(18,0)" CanBeNull="true" />
      <Column Name="DiscountPercentage" Type="System.Boolean" DbType="Bit" CanBeNull="true" />
      <Column Name="DiscountValue" Type="System.Decimal" DbType="Decimal(18,0)" CanBeNull="true" />
      <Column Name="Remarks" Type="System.String" DbType="NChar(500)" CanBeNull="true" />
      <Column Name="TotalCost" Type="System.Decimal" DbType="Decimal(18,0)" CanBeNull="true" />
      <Column Name="AddedBy" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="AddedOn" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
      <Column Name="Active" Type="System.Boolean" DbType="Bit NOT NULL" CanBeNull="false" />
      <Column Name="CreatedBy" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
      <Column Name="CreatedOn" Type="System.DateTime" DbType="DateTime NOT NULL" CanBeNull="false" />
      <Column Name="ModifiedBy" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
      <Column Name="ModifiedOn" Type="System.DateTime" DbType="DateTime NOT NULL" CanBeNull="false" />
      <Column Name="LastAction" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
      <Column Name="CreatedByCode" Type="System.String" DbType="NVarChar(20)" CanBeNull="true" />
      <Column Name="ModifiedByCode" Type="System.String" DbType="NVarChar(20)" CanBeNull="true" />
      <Column Name="OrderNo" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="ItemNo" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="ItemName" Type="System.String" DbType="NVarChar(500)" CanBeNull="true" />
      <Column Name="UomLabel" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="Discount" Type="System.Decimal" DbType="Decimal(18,0)" CanBeNull="true" />
      <Column Name="ItemUOMID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="AddedType" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="AddedByCode" Type="System.String" DbType="NVarChar(20)" CanBeNull="true" />
      <Column Name="ReferenceID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="itemGroupType" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="PatientID" Type="System.String" DbType="NVarChar(200)" CanBeNull="true" />
      <Column Name="IsFromMR" Type="System.Boolean" DbType="Bit" CanBeNull="true" />
      <Column Name="DosageTime" Type="System.String" DbType="NVarChar(500)" CanBeNull="true" />
      <Column Name="DosageAmount" Type="System.String" DbType="NVarChar(500)" CanBeNull="true" />
      <Column Name="DosageInstruction" Type="System.String" DbType="NVarChar(500)" CanBeNull="true" />
      <Column Name="IsOuterMedicine" Type="System.Boolean" DbType="Bit" CanBeNull="true" />
      <Column Name="DosageName" Type="System.String" DbType="NVarChar(500)" CanBeNull="true" />
      <Column Name="DosageID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="DosageDays" Type="System.Decimal" DbType="Decimal(18,0)" CanBeNull="true" />
      <Column Name="Count" Type="System.Decimal" DbType="Decimal(3,1)" CanBeNull="true" />
      <Column Name="ReferenceType" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="ItemType" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="isReferOutside" Type="System.Boolean" DbType="Bit" CanBeNull="true" />
      <Column Name="ReFerClinicID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="isCreateInvoiceOnRefer" Type="System.Boolean" DbType="Bit" CanBeNull="true" />
      <Column Name="StationName" Type="System.String" DbType="NVarChar(500)" CanBeNull="true" />
      <Column Name="StartOn" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
      <Column Name="PerSSINo" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="PatientName" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="VisitNo" Type="System.String" DbType="NVarChar(200)" CanBeNull="true" />
      <Column Name="PatientNo" Type="System.String" DbType="NVarChar(200)" CanBeNull="true" />
      <Column Name="IsNotUsedDosage" Type="System.Boolean" DbType="Bit" CanBeNull="true" />
      <Column Name="FirstName" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="ItemGroupID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="ItemGroupName" Type="System.String" DbType="NVarChar(500)" CanBeNull="true" />
      <Column Name="ClinicTypeName" Type="System.String" DbType="NVarChar(MAX)" CanBeNull="true" />
    </Type>
  </Table>
  <Table Name="dbo.EMR_InvoiceItem" Member="EMR_InvoiceItems">
    <Type Name="EMR_InvoiceItem">
      <Column Name="InvoiceItemID" Type="System.String" DbType="NVarChar(50) NOT NULL" IsPrimaryKey="true" CanBeNull="false" />
      <Column Name="InvoiceID" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
      <Column Name="ItemID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="UnitID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="Price" Type="System.Decimal" DbType="Decimal(18,0)" CanBeNull="true" />
      <Column Name="Qty" Type="System.Int32" DbType="Int" CanBeNull="true" />
      <Column Name="Cost" Type="System.Decimal" DbType="Decimal(18,0)" CanBeNull="true" />
      <Column Name="DiscountPercentage" Type="System.Boolean" DbType="Bit" CanBeNull="true" />
      <Column Name="DiscountValue" Type="System.Decimal" DbType="Decimal(18,0)" CanBeNull="true" />
      <Column Name="Remarks" Type="System.String" DbType="NChar(500)" CanBeNull="true" />
      <Column Name="TotalCost" Type="System.Decimal" DbType="Decimal(18,0)" CanBeNull="true" />
      <Column Name="AddedBy" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="AddedOn" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
      <Column Name="Active" Type="System.Boolean" DbType="Bit NOT NULL" CanBeNull="false" />
      <Column Name="CreatedBy" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
      <Column Name="CreatedOn" Type="System.DateTime" DbType="DateTime NOT NULL" CanBeNull="false" />
      <Column Name="ModifiedBy" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
      <Column Name="ModifiedOn" Type="System.DateTime" DbType="DateTime NOT NULL" CanBeNull="false" />
      <Column Name="LastAction" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
      <Column Name="Discount" Type="System.Decimal" DbType="Decimal(18,0)" CanBeNull="true" />
      <Column Name="AddedType" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="IsOuterMedicine" Type="System.Boolean" DbType="Bit" CanBeNull="true" />
      <Column Name="IsOuterService" Type="System.Boolean" DbType="Bit" CanBeNull="true" />
      <Column Name="OuterServiceClinic" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
    </Type>
  </Table>
  <Table Name="dbo.EMR_InvoiceItemView" Member="EMR_InvoiceItemViews">
    <Type Name="EMR_InvoiceItemView">
      <Column Name="InvoiceItemID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="InvoiceID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="ItemID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="UnitID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="Price" Type="System.Decimal" DbType="Decimal(18,0)" CanBeNull="true" />
      <Column Name="Qty" Type="System.Int32" DbType="Int" CanBeNull="true" />
      <Column Name="Cost" Type="System.Decimal" DbType="Decimal(18,0)" CanBeNull="true" />
      <Column Name="DiscountPercentage" Type="System.Boolean" DbType="Bit" CanBeNull="true" />
      <Column Name="DiscountValue" Type="System.Decimal" DbType="Decimal(18,0)" CanBeNull="true" />
      <Column Name="Remarks" Type="System.String" DbType="NChar(500)" CanBeNull="true" />
      <Column Name="TotalCost" Type="System.Decimal" DbType="Decimal(18,0)" CanBeNull="true" />
      <Column Name="AddedBy" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="AddedOn" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
      <Column Name="Active" Type="System.Boolean" DbType="Bit" CanBeNull="true" />
      <Column Name="CreatedBy" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="CreatedOn" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
      <Column Name="ModifiedBy" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="ModifiedOn" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
      <Column Name="LastAction" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="Discount" Type="System.Decimal" DbType="Decimal(18,0)" CanBeNull="true" />
      <Column Name="AddedType" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="InvoiceNo" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="ItemName" Type="System.String" DbType="NVarChar(500) NOT NULL" CanBeNull="false" />
      <Column Name="ItemNo" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="VisitID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="CreatedByCode" Type="System.String" DbType="NVarChar(20)" CanBeNull="true" />
      <Column Name="ModifiedByCode" Type="System.String" DbType="NVarChar(20)" CanBeNull="true" />
      <Column Name="AddedByCode" Type="System.String" DbType="NVarChar(20)" CanBeNull="true" />
      <Column Name="itemGroupType" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="IsOuterMedicine" Type="System.Boolean" DbType="Bit" CanBeNull="true" />
      <Column Name="IsStockCheck" Type="System.Boolean" DbType="Bit" CanBeNull="true" />
      <Column Name="ItemType" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="StationID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="StationName" Type="System.String" DbType="NVarChar(500)" CanBeNull="true" />
      <Column Name="ClinicTypeID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="ClinicTypeName" Type="System.String" DbType="NVarChar(500)" CanBeNull="true" />
      <Column Name="InvoiceDate" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
      <Column Name="ItemGroupName" Type="System.String" DbType="NVarChar(500)" CanBeNull="true" />
      <Column Name="IsEnroll" Type="System.String" DbType="NVarChar(20)" CanBeNull="true" />
      <Column Name="UomLabel" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="ItemUOMID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="IsOuterService" Type="System.Boolean" DbType="Bit" CanBeNull="true" />
    </Type>
  </Table>
  <Function Name="dbo.Report_Invoice_Item_Detail" Method="Report_Invoice_Item_Detail">
    <Parameter Name="fromDate" Type="System.DateTime" DbType="Date" />
    <Parameter Name="toDate" Type="System.DateTime" DbType="Date" />
    <Parameter Name="search_period" Type="System.String" DbType="NVarChar(50)" />
    <Parameter Name="station_id" Type="System.String" DbType="NVarChar(50)" />
    <Parameter Name="userId" Type="System.String" DbType="NVarChar(50)" />
    <ElementType Name="Report_Invoice_Item_DetailResult">
      <Column Name="ItemName" Type="System.String" DbType="NVarChar(500)" CanBeNull="true" />
      <Column Name="UomLabel" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="Qty" Type="System.Int32" DbType="Int" CanBeNull="true" />
      <Column Name="InvoiceNo" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="InvoiceDate" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
      <Column Name="PatientName" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="PatientNo" Type="System.String" DbType="NVarChar(200)" CanBeNull="true" />
      <Column Name="PerSSINo" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="LocationName" Type="System.String" DbType="NVarChar(500)" CanBeNull="true" />
      <Column Name="StationName" Type="System.String" DbType="NVarChar(500)" CanBeNull="true" />
      <Column Name="VisitNo" Type="System.String" DbType="NVarChar(200)" CanBeNull="true" />
      <Column Name="VisitOn" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
      <Column Name="InvoiceItemID" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
      <Column Name="InvoiceID" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="TotalCost" Type="System.Decimal" DbType="Decimal(18,0)" CanBeNull="true" />
    </ElementType>
  </Function>
</Database>