• Jeannine2017
  • NEWBIE
  • 25 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 5
    Replies
I want to  get the id for a record in an object called patient__C and render the patient detail page in a VF page without having to specify each detail field.  I have created the standard controller Patient to get the record id and get the error This gives error: Illegal Assignment List to List:

public with sharing class Patient {
    
        public String patientId{get;set;}
         

         public Patient(){
             String pat = apexpages.currentPage().getParameters().get('Id');
            List<patient> patID  = [Select id from Patient__c where id = :pat Limit 10];
 }
}

Here is the visualforce page code:
<apex:page standardController="Patient">
    
    <apex:detail />
    
</apex:page>

Can anyone tell me what I am doing wrong?
 
I am trying to pull the AccountID from Healthcloud, and display it on a visualforce page and receiving visualforce error :  List index out of bounds: 0 
An unexpected error has occurred. Your development organization has been notified.

Here is my class:

public with sharing class PatientAccountController {
    
    public String accountId{get;set;}
    public String accountrelatedlist{get;set;}
    
    public PatientAccountController(){
        String cId = apexpages.currentPage().getParameters().get('recId');
        accountrelatedlist = apexpages.currentPage().getParameters().get('relatedlist');
        List<Contact> accID = [Select id, AccountId From Contact where Id = :cid Limit 10];
        accountId = accId[0].AccountId;
    }
}

Here is my visualforce page:

<apex:page controller="PatientAccountController" > docType="html-5.0" showHeader="false sidebar="false" applyHtmlTag="false" applyBodyTag="false" standardStylesheets="true"
    <html>
        <head>
            <meta charset="utf-8"/>
            <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
          <style>
            html,
            body{
              height:100%;
              width:100%;
              background:#FFFFFF;
              font-family:ProximaNovaRegular, Arial, sans-serif;
              </style>    
                  
        </head>
        <body>
            <iframe id="Ifrmaccountlistview" src="/apex/DE_All_EMR_Data?id={!accountId}" width="100%" height="640px" scrolling="true" frameborder="false"></iframe>
        </body>
             
    </html>
</apex:page>


I have verified that there are active accounts in the org, Healthcloud is enabled, can someone explain why I am getting the error?
I want to  get the id for a record in an object called patient__C and render the patient detail page in a VF page without having to specify each detail field.  I have created the standard controller Patient to get the record id and get the error This gives error: Illegal Assignment List to List:

public with sharing class Patient {
    
        public String patientId{get;set;}
         

         public Patient(){
             String pat = apexpages.currentPage().getParameters().get('Id');
            List<patient> patID  = [Select id from Patient__c where id = :pat Limit 10];
 }
}

Here is the visualforce page code:
<apex:page standardController="Patient">
    
    <apex:detail />
    
</apex:page>

Can anyone tell me what I am doing wrong?
 
I am trying to pull the AccountID from Healthcloud, and display it on a visualforce page and receiving visualforce error :  List index out of bounds: 0 
An unexpected error has occurred. Your development organization has been notified.

Here is my class:

public with sharing class PatientAccountController {
    
    public String accountId{get;set;}
    public String accountrelatedlist{get;set;}
    
    public PatientAccountController(){
        String cId = apexpages.currentPage().getParameters().get('recId');
        accountrelatedlist = apexpages.currentPage().getParameters().get('relatedlist');
        List<Contact> accID = [Select id, AccountId From Contact where Id = :cid Limit 10];
        accountId = accId[0].AccountId;
    }
}

Here is my visualforce page:

<apex:page controller="PatientAccountController" > docType="html-5.0" showHeader="false sidebar="false" applyHtmlTag="false" applyBodyTag="false" standardStylesheets="true"
    <html>
        <head>
            <meta charset="utf-8"/>
            <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
          <style>
            html,
            body{
              height:100%;
              width:100%;
              background:#FFFFFF;
              font-family:ProximaNovaRegular, Arial, sans-serif;
              </style>    
                  
        </head>
        <body>
            <iframe id="Ifrmaccountlistview" src="/apex/DE_All_EMR_Data?id={!accountId}" width="100%" height="640px" scrolling="true" frameborder="false"></iframe>
        </body>
             
    </html>
</apex:page>


I have verified that there are active accounts in the org, Healthcloud is enabled, can someone explain why I am getting the error?