<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.20.4</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>145</ContextCount>
  <ElementCount>439</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>true</FootnotesReported>
  <SegmentCount>53</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>4</UnitCount>
  <MyReports>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>000 - Document - Document And Entity Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/DocumentAndEntityInformation</Role>
      <ShortName>Document And Entity Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>001 - Statement - Consolidated Balance Sheets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/ConsolidatedBalanceSheet</Role>
      <ShortName>Consolidated Balance Sheets</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>002 - Statement - Consolidated Balance Sheets (Parentheticals)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/ConsolidatedBalanceSheet_Parentheticals</Role>
      <ShortName>Consolidated Balance Sheets (Parentheticals)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>003 - Statement - Consolidated Statements of Operations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/ConsolidatedIncomeStatement</Role>
      <ShortName>Consolidated Statements of Operations</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>004 - Statement - Consolidated Statement of Stockholders??? Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/ShareholdersEquityType2or3</Role>
      <ShortName>Consolidated Statement of Stockholders??? Equity</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>005 - Statement - Consolidated Statements of Cash Flows</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/ConsolidatedCashFlow</Role>
      <ShortName>Consolidated Statements of Cash Flows</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>006 - Disclosure - Organization and Nature of Business</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/OrganizationandNatureofBusiness</Role>
      <ShortName>Organization and Nature of Business</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>007 - Disclosure - Summary Of Significant Accounting Policies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/SummaryOfSignificantAccountingPolicies</Role>
      <ShortName>Summary Of Significant Accounting Policies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>008 - Disclosure - Acquisition</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/Acquisition</Role>
      <ShortName>Acquisition</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>009 - Disclosure - Prepaid Expenses</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/PrepaidExpenses</Role>
      <ShortName>Prepaid Expenses</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>010 - Disclosure - Property and Equipment</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/PropertyandEquipment</Role>
      <ShortName>Property and Equipment</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>011 - Disclosure - Intangible Assets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/IntangibleAssets</Role>
      <ShortName>Intangible Assets</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>012 - Disclosure - Deferred Revenue</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/DeferredRevenue</Role>
      <ShortName>Deferred Revenue</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>013 - Disclosure - Related Party Transactions</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/RelatedPartyTransactions</Role>
      <ShortName>Related Party Transactions</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>014 - Disclosure - Contingent Purchase Price</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/ContingentPurchasePrice</Role>
      <ShortName>Contingent Purchase Price</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>015 - Disclosure - Stockholders' Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/StockholdersEquity</Role>
      <ShortName>Stockholders' Equity</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>016 - Disclosure - Stock Compensation</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/StockCompensation</Role>
      <ShortName>Stock Compensation</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>017 - Disclosure - Leases</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/Leases</Role>
      <ShortName>Leases</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>018 - Disclosure - Major Customers and Vendors</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/MajorCustomersandVendors</Role>
      <ShortName>Major Customers and Vendors</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>019 - Disclosure - Income Taxes</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/IncomeTaxes</Role>
      <ShortName>Income Taxes</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>020 - Disclosure - Commitments and Contingent Liabilities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/CommitmentsandContingentLiabilities</Role>
      <ShortName>Commitments and Contingent Liabilities</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>021 - Disclosure - Retirement Plan</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/RetirementPlan</Role>
      <ShortName>Retirement Plan</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>22</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>022 - Disclosure - Subsequent Events</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/SubsequentEvents</Role>
      <ShortName>Subsequent Events</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>23</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>023 - Disclosure - Accounting Policies, by Policy (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/AccountingPoliciesByPolicy</Role>
      <ShortName>Accounting Policies, by Policy (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://OPRX/role/SummaryOfSignificantAccountingPolicies</ParentRole>
      <Position>24</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>024 - Disclosure - Summary Of Significant Accounting Policies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/SummaryOfSignificantAccountingPoliciesTables</Role>
      <ShortName>Summary Of Significant Accounting Policies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://OPRX/role/SummaryOfSignificantAccountingPolicies</ParentRole>
      <Position>25</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>025 - Disclosure - Acquisition (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/AcquisitionTables</Role>
      <ShortName>Acquisition (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://OPRX/role/Acquisition</ParentRole>
      <Position>26</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>026 - Disclosure - Prepaid Expenses (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/PrepaidExpensesTables</Role>
      <ShortName>Prepaid Expenses (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://OPRX/role/PrepaidExpenses</ParentRole>
      <Position>27</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>027 - Disclosure - Property and Equipment (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/PropertyandEquipmentTables</Role>
      <ShortName>Property and Equipment (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://OPRX/role/PropertyandEquipment</ParentRole>
      <Position>28</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>028 - Disclosure - Intangible Assets (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/IntangibleAssetsTables</Role>
      <ShortName>Intangible Assets (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://OPRX/role/IntangibleAssets</ParentRole>
      <Position>29</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>029 - Disclosure - Deferred Revenue (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/DeferredRevenueTables</Role>
      <ShortName>Deferred Revenue (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://OPRX/role/DeferredRevenue</ParentRole>
      <Position>30</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>030 - Disclosure - Contingent Purchase Price (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/ContingentPurchasePriceTables</Role>
      <ShortName>Contingent Purchase Price (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://OPRX/role/ContingentPurchasePrice</ParentRole>
      <Position>31</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>031 - Disclosure - Stock Compensation (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/StockCompensationTables</Role>
      <ShortName>Stock Compensation (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://OPRX/role/StockCompensation</ParentRole>
      <Position>32</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>032 - Disclosure - Leases (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/LeasesTables</Role>
      <ShortName>Leases (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://OPRX/role/Leases</ParentRole>
      <Position>33</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>033 - Disclosure - Major Customers and Vendors (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/MajorCustomersandVendorsTables</Role>
      <ShortName>Major Customers and Vendors (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://OPRX/role/MajorCustomersandVendors</ParentRole>
      <Position>34</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>034 - Disclosure - Income Taxes (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/IncomeTaxesTables</Role>
      <ShortName>Income Taxes (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://OPRX/role/IncomeTaxes</ParentRole>
      <Position>35</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>035 - Disclosure - Summary Of Significant Accounting Policies (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/SummaryOfSignificantAccountingPoliciesDetails</Role>
      <ShortName>Summary Of Significant Accounting Policies (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://OPRX/role/SummaryOfSignificantAccountingPoliciesTables</ParentRole>
      <Position>36</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>036 - Disclosure - Summary Of Significant Accounting Policies (Details) - Schedule of financial assets and liabilities measured on a recurring basis</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/ScheduleoffinancialassetsandliabilitiesmeasuredonarecurringbasisTable</Role>
      <ShortName>Summary Of Significant Accounting Policies (Details) - Schedule of financial assets and liabilities measured on a recurring basis</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://OPRX/role/SummaryOfSignificantAccountingPoliciesTables</ParentRole>
      <Position>37</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>037 - Disclosure - Summary Of Significant Accounting Policies (Details) - Schedule of changes in fair value of the Company???s Level 3 financial instruments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/ScheduleofchangesinfairvalueoftheCompanysLevel3financialinstrumentsTable</Role>
      <ShortName>Summary Of Significant Accounting Policies (Details) - Schedule of changes in fair value of the Company???s Level 3 financial instruments</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://OPRX/role/SummaryOfSignificantAccountingPoliciesTables</ParentRole>
      <Position>38</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>038 - Disclosure - Summary Of Significant Accounting Policies (Details) - Schedule of expected dividends</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/ScheduleofexpecteddividendsTable</Role>
      <ShortName>Summary Of Significant Accounting Policies (Details) - Schedule of expected dividends</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://OPRX/role/SummaryOfSignificantAccountingPoliciesTables</ParentRole>
      <Position>39</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>039 - Disclosure - Summary Of Significant Accounting Policies (Details) - Schedule of weighted average shares outstanding and the basic and diluted earnings per common share</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/ScheduleofweightedaveragesharesoutstandingandthebasicanddilutedearningspercommonshareTable</Role>
      <ShortName>Summary Of Significant Accounting Policies (Details) - Schedule of weighted average shares outstanding and the basic and diluted earnings per common share</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://OPRX/role/SummaryOfSignificantAccountingPoliciesTables</ParentRole>
      <Position>40</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>040 - Disclosure - Acquisition (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/AcquisitionDetails</Role>
      <ShortName>Acquisition (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://OPRX/role/AcquisitionTables</ParentRole>
      <Position>41</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>041 - Disclosure - Acquisition (Details) - Schedule of purchase price of the acquisition</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/ScheduleofpurchasepriceoftheacquisitionTable</Role>
      <ShortName>Acquisition (Details) - Schedule of purchase price of the acquisition</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://OPRX/role/AcquisitionTables</ParentRole>
      <Position>42</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>042 - Disclosure - Acquisition (Details) - Schedule of pro forma results of operations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/ScheduleofproformaresultsofoperationsTable</Role>
      <ShortName>Acquisition (Details) - Schedule of pro forma results of operations</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://OPRX/role/AcquisitionTables</ParentRole>
      <Position>43</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>043 - Disclosure - Prepaid Expenses (Details) - Schedule of prepaid expenses</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/ScheduleofprepaidexpensesTable</Role>
      <ShortName>Prepaid Expenses (Details) - Schedule of prepaid expenses</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://OPRX/role/PrepaidExpensesTables</ParentRole>
      <Position>44</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>044 - Disclosure - Property and Equipment (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/PropertyandEquipmentDetails</Role>
      <ShortName>Property and Equipment (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://OPRX/role/PropertyandEquipmentTables</ParentRole>
      <Position>45</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>045 - Disclosure - Property and Equipment (Details) - Schedule of property and equipment</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/ScheduleofpropertyandequipmentTable</Role>
      <ShortName>Property and Equipment (Details) - Schedule of property and equipment</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://OPRX/role/PropertyandEquipmentTables</ParentRole>
      <Position>46</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>046 - Disclosure - Intangible Assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/IntangibleAssetsDetails</Role>
      <ShortName>Intangible Assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://OPRX/role/IntangibleAssetsTables</ParentRole>
      <Position>47</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>047 - Disclosure - Intangible Assets (Details) - Schedule of intangible assets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/ScheduleofintangibleassetsTable</Role>
      <ShortName>Intangible Assets (Details) - Schedule of intangible assets</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://OPRX/role/IntangibleAssetsTables</ParentRole>
      <Position>48</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>048 - Disclosure - Intangible Assets (Details) - Schedule of intangibles estimated useful lives</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/ScheduleofintangiblesestimatedusefullivesTable</Role>
      <ShortName>Intangible Assets (Details) - Schedule of intangibles estimated useful lives</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://OPRX/role/IntangibleAssetsTables</ParentRole>
      <Position>49</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>049 - Disclosure - Intangible Assets (Details) - Schedule of future amortization expenses of intangibles assets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/ScheduleoffutureamortizationexpensesofintangiblesassetsTable</Role>
      <ShortName>Intangible Assets (Details) - Schedule of future amortization expenses of intangibles assets</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://OPRX/role/IntangibleAssetsTables</ParentRole>
      <Position>50</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>050 - Disclosure - Deferred Revenue (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/DeferredRevenueDetails</Role>
      <ShortName>Deferred Revenue (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://OPRX/role/DeferredRevenueTables</ParentRole>
      <Position>51</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>051 - Disclosure - Deferred Revenue (Details) - Schedule of deferred revenue</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/ScheduleofdeferredrevenueTable</Role>
      <ShortName>Deferred Revenue (Details) - Schedule of deferred revenue</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://OPRX/role/DeferredRevenueTables</ParentRole>
      <Position>52</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>052 - Disclosure - Related Party Transactions (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/RelatedPartyTransactionsDetails</Role>
      <ShortName>Related Party Transactions (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://OPRX/role/RelatedPartyTransactions</ParentRole>
      <Position>53</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>053 - Disclosure - Contingent Purchase Price (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/ContingentPurchasePriceDetails</Role>
      <ShortName>Contingent Purchase Price (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://OPRX/role/ContingentPurchasePriceTables</ParentRole>
      <Position>54</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>054 - Disclosure - Contingent Purchase Price (Details) - Schedule of fair value of contingent purchase price payable</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/ScheduleoffairvalueofcontingentpurchasepricepayableTable</Role>
      <ShortName>Contingent Purchase Price (Details) - Schedule of fair value of contingent purchase price payable</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://OPRX/role/ContingentPurchasePriceTables</ParentRole>
      <Position>55</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>055 - Disclosure - Stockholders' Equity (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/StockholdersEquityDetails</Role>
      <ShortName>Stockholders' Equity (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://OPRX/role/StockholdersEquity</ParentRole>
      <Position>56</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>056 - Disclosure - Stock Compensation (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/StockCompensationDetails</Role>
      <ShortName>Stock Compensation (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://OPRX/role/StockCompensationTables</ParentRole>
      <Position>57</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>057 - Disclosure - Stock Compensation (Details) - Schedule of option activity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/ScheduleofoptionactivityTable</Role>
      <ShortName>Stock Compensation (Details) - Schedule of option activity</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://OPRX/role/StockCompensationTables</ParentRole>
      <Position>58</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>058 - Disclosure - Stock Compensation (Details) - Schedule of nonvested shares</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/ScheduleofnonvestedsharesTable</Role>
      <ShortName>Stock Compensation (Details) - Schedule of nonvested shares</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://OPRX/role/StockCompensationTables</ParentRole>
      <Position>59</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>059 - Disclosure - Stock Compensation (Details) - Schedule of restricted stock awards</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/ScheduleofrestrictedstockawardsTable</Role>
      <ShortName>Stock Compensation (Details) - Schedule of restricted stock awards</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://OPRX/role/StockCompensationTables</ParentRole>
      <Position>60</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>060 - Disclosure - Leases (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/LeasesDetails</Role>
      <ShortName>Leases (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://OPRX/role/LeasesTables</ParentRole>
      <Position>61</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>061 - Disclosure - Leases (Details) - Schedule of lease cost</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/ScheduleofleasecostTable</Role>
      <ShortName>Leases (Details) - Schedule of lease cost</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://OPRX/role/LeasesTables</ParentRole>
      <Position>62</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>062 - Disclosure - Leases (Details) - Schedule of future minimum lease payments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/ScheduleoffutureminimumleasepaymentsTable</Role>
      <ShortName>Leases (Details) - Schedule of future minimum lease payments</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://OPRX/role/LeasesTables</ParentRole>
      <Position>63</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R64.htm</HtmlFileName>
      <LongName>063 - Disclosure - Major Customers and Vendors (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/MajorCustomersandVendorsDetails</Role>
      <ShortName>Major Customers and Vendors (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://OPRX/role/MajorCustomersandVendorsTables</ParentRole>
      <Position>64</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R65.htm</HtmlFileName>
      <LongName>064 - Disclosure - Major Customers and Vendors (Details) - Schedule of accounted percentage of revenue</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/ScheduleofaccountedpercentageofrevenueTable</Role>
      <ShortName>Major Customers and Vendors (Details) - Schedule of accounted percentage of revenue</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://OPRX/role/MajorCustomersandVendorsTables</ParentRole>
      <Position>65</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R66.htm</HtmlFileName>
      <LongName>065 - Disclosure - Income Taxes (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/IncomeTaxesDetails</Role>
      <ShortName>Income Taxes (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://OPRX/role/IncomeTaxesTables</ParentRole>
      <Position>66</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R67.htm</HtmlFileName>
      <LongName>066 - Disclosure - Income Taxes (Details) - Schedule of federal income tax benefit</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/ScheduleoffederalincometaxbenefitTable</Role>
      <ShortName>Income Taxes (Details) - Schedule of federal income tax benefit</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://OPRX/role/IncomeTaxesTables</ParentRole>
      <Position>67</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R68.htm</HtmlFileName>
      <LongName>067 - Disclosure - Income Taxes (Details) - Schedule of deferred tax assets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/ScheduleofdeferredtaxassetsTable</Role>
      <ShortName>Income Taxes (Details) - Schedule of deferred tax assets</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://OPRX/role/IncomeTaxesTables</ParentRole>
      <Position>68</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R69.htm</HtmlFileName>
      <LongName>068 - Disclosure - Commitments and Contingent Liabilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/CommitmentsandContingentLiabilitiesDetails</Role>
      <ShortName>Commitments and Contingent Liabilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://OPRX/role/CommitmentsandContingentLiabilities</ParentRole>
      <Position>69</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R70.htm</HtmlFileName>
      <LongName>069 - Disclosure - Retirement Plan (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/RetirementPlanDetails</Role>
      <ShortName>Retirement Plan (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://OPRX/role/RetirementPlan</ParentRole>
      <Position>70</Position>
    </Report>
    <Report instance="oprx-20201231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R71.htm</HtmlFileName>
      <LongName>070 - Disclosure - Subsequent Events (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://OPRX/role/SubsequentEventsDetails</Role>
      <ShortName>Subsequent Events (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://OPRX/role/SubsequentEvents</ParentRole>
      <Position>71</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <InputFiles>
    <File>oprx-20201231.xml</File>
    <File>oprx-20201231.xsd</File>
    <File>oprx-20201231_cal.xml</File>
    <File>oprx-20201231_def.xml</File>
    <File>oprx-20201231_lab.xml</File>
    <File>oprx-20201231_pre.xml</File>
  </InputFiles>
  <SupplementalFiles/>
  <BaseTaxonomies>
    <BaseTaxonomy>http://fasb.org/us-gaap/2020-01-31</BaseTaxonomy>
    <BaseTaxonomy>http://fasb.org/srt/2020-01-31</BaseTaxonomy>
    <BaseTaxonomy>http://xbrl.sec.gov/dei/2019-01-31</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
