<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.24.1.u1</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>208</ContextCount>
  <ElementCount>212</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>true</FootnotesReported>
  <SegmentCount>84</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>15</UnitCount>
  <MyReports>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>0000001 - Document - Cover</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/Cover</Role>
      <ShortName>Cover</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>0000002 - Statement - CONDENSED CONSOLIDATED BALANCE SHEETS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/CONDENSEDCONSOLIDATEDBALANCESHEETS</Role>
      <ShortName>CONDENSED CONSOLIDATED BALANCE SHEETS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>0000003 - Statement - CONDENSED CONSOLIDATED BALANCE SHEETS (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/CONDENSEDCONSOLIDATEDBALANCESHEETSParenthetical</Role>
      <ShortName>CONDENSED CONSOLIDATED BALANCE SHEETS (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>0000004 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF COMPREHENSIVE INCOME (LOSS)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFCOMPREHENSIVEINCOMELOSS</Role>
      <ShortName>CONDENSED CONSOLIDATED STATEMENTS OF COMPREHENSIVE INCOME (LOSS)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>0000005 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF COMPREHENSIVE INCOME (LOSS) (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFCOMPREHENSIVEINCOMELOSSParenthetical</Role>
      <ShortName>CONDENSED CONSOLIDATED STATEMENTS OF COMPREHENSIVE INCOME (LOSS) (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>0000006 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF SHAREHOLDERS' EQUITY</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFSHAREHOLDERSEQUITY</Role>
      <ShortName>CONDENSED CONSOLIDATED STATEMENTS OF SHAREHOLDERS' EQUITY</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>0000007 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF CASH FLOWS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWS</Role>
      <ShortName>CONDENSED CONSOLIDATED STATEMENTS OF CASH FLOWS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>0000008 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF CASH FLOWS - Supplemental (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSSupplementalParenthetical</Role>
      <ShortName>CONDENSED CONSOLIDATED STATEMENTS OF CASH FLOWS - Supplemental (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>0000009 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF CASH FLOWS - Cash and Restricted Cash (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSCashandRestrictedCashParenthetical</Role>
      <ShortName>CONDENSED CONSOLIDATED STATEMENTS OF CASH FLOWS - Cash and Restricted Cash (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>0000010 - Disclosure - Basis of Presentation</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/BasisofPresentation</Role>
      <ShortName>Basis of Presentation</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>0000011 - Disclosure - Recent Accounting Pronouncements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/RecentAccountingPronouncements</Role>
      <ShortName>Recent Accounting Pronouncements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>0000012 - Disclosure - Real Estate and Other Investments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/RealEstateandOtherInvestments</Role>
      <ShortName>Real Estate and Other Investments</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>0000013 - Disclosure - Leases</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/Leases</Role>
      <ShortName>Leases</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>0000014 - Disclosure - Indebtedness</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/Indebtedness</Role>
      <ShortName>Indebtedness</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>0000015 - Disclosure - Fair Value of Assets and Liabilities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/FairValueofAssetsandLiabilities</Role>
      <ShortName>Fair Value of Assets and Liabilities</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>0000016 - Disclosure - Shareholders' Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/ShareholdersEquity</Role>
      <ShortName>Shareholders' Equity</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>0000017 - Disclosure - Segment Reporting</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/SegmentReporting</Role>
      <ShortName>Segment Reporting</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>0000018 - Disclosure - Senior Living Community Management Agreements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/SeniorLivingCommunityManagementAgreements</Role>
      <ShortName>Senior Living Community Management Agreements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>0000019 - Disclosure - Business and Property Management Agreements with RMR</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/BusinessandPropertyManagementAgreementswithRMR</Role>
      <ShortName>Business and Property Management Agreements with RMR</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>0000020 - Disclosure - Related Person Transactions</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/RelatedPersonTransactions</Role>
      <ShortName>Related Person Transactions</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>0000021 - Disclosure - Income Taxes</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/IncomeTaxes</Role>
      <ShortName>Income Taxes</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>0000022 - Disclosure - Weighted Average Common Shares</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/WeightedAverageCommonShares</Role>
      <ShortName>Weighted Average Common Shares</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>22</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>9954471 - Disclosure - Recent Accounting Pronouncements (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/RecentAccountingPronouncementsPolicies</Role>
      <ShortName>Recent Accounting Pronouncements (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://dhcreit.com/role/RecentAccountingPronouncements</ParentRole>
      <Position>23</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>9954472 - Disclosure - Real Estate and Other Investments (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/RealEstateandOtherInvestmentsTables</Role>
      <ShortName>Real Estate and Other Investments (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://dhcreit.com/role/RealEstateandOtherInvestments</ParentRole>
      <Position>24</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>9954473 - Disclosure - Fair Value of Assets and Liabilities (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/FairValueofAssetsandLiabilitiesTables</Role>
      <ShortName>Fair Value of Assets and Liabilities (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://dhcreit.com/role/FairValueofAssetsandLiabilities</ParentRole>
      <Position>25</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>9954474 - Disclosure - Shareholders' Equity (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/ShareholdersEquityTables</Role>
      <ShortName>Shareholders' Equity (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://dhcreit.com/role/ShareholdersEquity</ParentRole>
      <Position>26</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>9954475 - Disclosure - Segment Reporting (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/SegmentReportingTables</Role>
      <ShortName>Segment Reporting (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://dhcreit.com/role/SegmentReporting</ParentRole>
      <Position>27</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>9954476 - Disclosure - Senior Living Community Management Agreements (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/SeniorLivingCommunityManagementAgreementsTables</Role>
      <ShortName>Senior Living Community Management Agreements (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://dhcreit.com/role/SeniorLivingCommunityManagementAgreements</ParentRole>
      <Position>28</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>9954477 - Disclosure - Real Estate and Other Investments - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/RealEstateandOtherInvestmentsAdditionalInformationDetails</Role>
      <ShortName>Real Estate and Other Investments - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>29</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>9954478 - Disclosure - Real Estate and Other Investments - Acquisitions and Dispositions Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/RealEstateandOtherInvestmentsAcquisitionsandDispositionsNarrativeDetails</Role>
      <ShortName>Real Estate and Other Investments - Acquisitions and Dispositions Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>30</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>9954479 - Disclosure - Real Estate and Other Investments - Schedule of Disposal Groups (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/RealEstateandOtherInvestmentsScheduleofDisposalGroupsDetails</Role>
      <ShortName>Real Estate and Other Investments - Schedule of Disposal Groups (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>31</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>9954480 - Disclosure - Real Estate and Other Investments - Impairment Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/RealEstateandOtherInvestmentsImpairmentNarrativeDetails</Role>
      <ShortName>Real Estate and Other Investments - Impairment Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>32</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>9954481 - Disclosure - Real Estate and Other Investments - Equity Method Investments in Unconsolidated Joint Ventures (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/RealEstateandOtherInvestmentsEquityMethodInvestmentsinUnconsolidatedJointVenturesDetails</Role>
      <ShortName>Real Estate and Other Investments - Equity Method Investments in Unconsolidated Joint Ventures (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>33</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>9954482 - Disclosure - Real Estate and Other Investments - Mortgage Debt Joint Venture (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/RealEstateandOtherInvestmentsMortgageDebtJointVentureDetails</Role>
      <ShortName>Real Estate and Other Investments - Mortgage Debt Joint Venture (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>34</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>9954483 - Disclosure - Real Estate and Other Investments - Unconsolidated Joint Venture Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/RealEstateandOtherInvestmentsUnconsolidatedJointVentureNarrativeDetails</Role>
      <ShortName>Real Estate and Other Investments - Unconsolidated Joint Venture Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>35</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>9954484 - Disclosure - Real Estate and Other Investments - Equity Method Investment in AlerisLife (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/RealEstateandOtherInvestmentsEquityMethodInvestmentinAlerisLifeDetails</Role>
      <ShortName>Real Estate and Other Investments - Equity Method Investment in AlerisLife (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>36</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>9954485 - Disclosure - Leases (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/LeasesDetails</Role>
      <ShortName>Leases (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://dhcreit.com/role/Leases</ParentRole>
      <Position>37</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>9954486 - Disclosure - Indebtedness (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/IndebtednessDetails</Role>
      <ShortName>Indebtedness (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://dhcreit.com/role/Indebtedness</ParentRole>
      <Position>38</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>9954487 - Disclosure - Fair Value of Assets and Liabilities - Assets and Liabilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/FairValueofAssetsandLiabilitiesAssetsandLiabilitiesDetails</Role>
      <ShortName>Fair Value of Assets and Liabilities - Assets and Liabilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>39</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>9954488 - Disclosure - Fair Value of Assets and Liabilities - Liabilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/FairValueofAssetsandLiabilitiesLiabilitiesDetails</Role>
      <ShortName>Fair Value of Assets and Liabilities - Liabilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>40</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>9954489 - Disclosure - Fair Value of Assets and Liabilities - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/FairValueofAssetsandLiabilitiesNarrativeDetails</Role>
      <ShortName>Fair Value of Assets and Liabilities - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>41</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>9954490 - Disclosure - Shareholders' Equity - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/ShareholdersEquityNarrativeDetails</Role>
      <ShortName>Shareholders' Equity - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>42</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>9954491 - Disclosure - Shareholders' Equity (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/ShareholdersEquityDetails</Role>
      <ShortName>Shareholders' Equity (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://dhcreit.com/role/ShareholdersEquityTables</ParentRole>
      <Position>43</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>9954492 - Disclosure - Segment Reporting - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/SegmentReportingNarrativeDetails</Role>
      <ShortName>Segment Reporting - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>44</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>9954493 - Disclosure - Segment Reporting - Income Statements (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/SegmentReportingIncomeStatementsDetails</Role>
      <ShortName>Segment Reporting - Income Statements (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>45</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>9954494 - Disclosure - Segment Reporting - Assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/SegmentReportingAssetsDetails</Role>
      <ShortName>Segment Reporting - Assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>46</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>9954495 - Disclosure - Senior Living Community Management Agreements - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/SeniorLivingCommunityManagementAgreementsNarrativeDetails</Role>
      <ShortName>Senior Living Community Management Agreements - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>47</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>9954496 - Disclosure - Senior Living Community Management Agreements - Schedule of Disaggregation of Revenue (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/SeniorLivingCommunityManagementAgreementsScheduleofDisaggregationofRevenueDetails</Role>
      <ShortName>Senior Living Community Management Agreements - Schedule of Disaggregation of Revenue (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>48</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>9954497 - Disclosure - Business and Property Management Agreements with RMR (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/BusinessandPropertyManagementAgreementswithRMRDetails</Role>
      <ShortName>Business and Property Management Agreements with RMR (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://dhcreit.com/role/BusinessandPropertyManagementAgreementswithRMR</ParentRole>
      <Position>49</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>9954498 - Disclosure - Related Person Transactions (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/RelatedPersonTransactionsDetails</Role>
      <ShortName>Related Person Transactions (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://dhcreit.com/role/RelatedPersonTransactions</ParentRole>
      <Position>50</Position>
    </Report>
    <Report instance="dhc-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>9954499 - Disclosure - Income Taxes (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://dhcreit.com/role/IncomeTaxesDetails</Role>
      <ShortName>Income Taxes (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://dhcreit.com/role/IncomeTaxes</ParentRole>
      <Position>51</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <InputFiles>
    <File doctype="10-Q" isDefinitelyFs="true" isUsgaap="true" original="dhc-20240331.htm">dhc-20240331.htm</File>
    <File>dhc-20240331.xsd</File>
    <File>dhc-20240331_cal.xml</File>
    <File>dhc-20240331_def.xml</File>
    <File>dhc-20240331_lab.xml</File>
    <File>dhc-20240331_pre.xml</File>
  </InputFiles>
  <SupplementalFiles/>
  <BaseTaxonomies>
    <BaseTaxonomy items="569">http://fasb.org/us-gaap/2023</BaseTaxonomy>
    <BaseTaxonomy items="36">http://xbrl.sec.gov/dei/2023</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
