/**
 * 
 */
package org.javarosa.chsreferral.view;

import javax.microedition.lcdui.Form;

import org.javarosa.chsreferral.model.PatientReferral;
import org.javarosa.core.api.IView;

/**
 * @author Clayton Sims
 * @date Jan 23, 2009 
 *
 */
public class ReferralsDetailView extends Form implements IView {
	PatientReferral ref;

	public ReferralsDetailView(String title) {
		super(title);
	}
	
	public void setReferral(PatientReferral ref) {
		this.ref = ref;
		//TODO: Get patient info here somehow.
		this.append("Name: " + ref.getPatientId());
		this.append("Date of Referral: " + ref.getDateReferred());
		this.append("Referral Type: " + ref.getType());
	}
	
	public PatientReferral getReferral() {
		return ref;
	}

	/* (non-Javadoc)
	 * @see org.javarosa.core.api.IView#getScreenObject()
	 */
	public Object getScreenObject() {
		return this;
	}

}

@@ -519,16 +519,286 @@
 mehow.%0D%0A
+%09%09// Putting it in swahili.%0D%0A%09%09//#if commcare.lang.sw%0D%0A%09%09this.append(%22Jina: %22 + ref.getPatientId()); // Name%0D%0A%09%09this.append(%22Tarehe ya rufaa: %22 + ref.getDateReferred()); // Date of referral%0D%0A%09%09this.append(%22Aina ya rufaa: %22 + ref.getType()); // Referral type%0D%0A%09%09//#else%0D%0A
 %09%09this.a
@@ -830,24 +830,32 @@
 atientId());
+ // Name
 %0D%0A%09%09this.app
@@ -867,17 +867,17 @@
 Date of 
-R
+r
 eferral:
@@ -904,16 +904,36 @@
 rred());
+ // Date of referral
 %0D%0A%09%09this
@@ -950,17 +950,17 @@
 eferral 
-T
+t
 ype: %22 +
@@ -975,16 +975,45 @@
 Type());
+ // Referral type%0D%0A%09%09//#endif
 %0D%0A%09%7D%0D%0A%09%0D

put in swahili translations. still need clayton to do a bit of work here. used the same commcare.lang.sw build flag. is annoying and temporary.