You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(141) |
Sep
(184) |
Oct
(159) |
Nov
(77) |
Dec
(114) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(212) |
Feb
(302) |
Mar
(323) |
Apr
(360) |
May
(302) |
Jun
(392) |
Jul
(299) |
Aug
(858) |
Sep
(499) |
Oct
(489) |
Nov
(324) |
Dec
(438) |
2008 |
Jan
(449) |
Feb
(388) |
Mar
(811) |
Apr
(583) |
May
(949) |
Jun
(1431) |
Jul
(943) |
Aug
(527) |
Sep
(576) |
Oct
(440) |
Nov
(1046) |
Dec
(658) |
2009 |
Jan
(259) |
Feb
(192) |
Mar
(495) |
Apr
(2322) |
May
(2023) |
Jun
(1387) |
Jul
(722) |
Aug
(771) |
Sep
(167) |
Oct
(142) |
Nov
(384) |
Dec
(884) |
2010 |
Jan
(344) |
Feb
(82) |
Mar
(248) |
Apr
(341) |
May
(389) |
Jun
(289) |
Jul
(19) |
Aug
(478) |
Sep
(274) |
Oct
(431) |
Nov
(322) |
Dec
(207) |
2011 |
Jan
(125) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Joseph I. <jos...@us...> - 2006-11-27 04:57:54
|
Update of /cvsroot/tolven/tolvenEJB/src/org/tolven/security/bean In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv13231/src/org/tolven/security/bean Modified Files: TolvenEncryptedPrivateKey.java TolvenPBEPrivateKey.java Log Message: Moved the System property accessors for private key up the hierarchy to TolvenEncryptedPrivateKey. Index: TolvenPBEPrivateKey.java =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/src/org/tolven/security/bean/TolvenPBEPrivateKey.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TolvenPBEPrivateKey.java 27 Nov 2006 04:05:31 -0000 1.2 --- TolvenPBEPrivateKey.java 27 Nov 2006 04:57:52 -0000 1.3 *************** *** 42,54 **** public class TolvenPBEPrivateKey extends TolvenEncryptedPrivateKey { ! private static final String PRIVATE_KEY_ALGORITHM_PROP = "tolven.security.user.privateKeyAlgorithm"; ! ! private static final String PBE_KEY_ALGORITHM_PROP = "tolven.security.user.pbeKeyAlgorithm"; ! ! private static final String PASSWORD_SALT_LENGTH_PROP = "tolven.security.user.passwordSaltLength"; ! private static final String PASSWORD_ITERATION_COUNT_PROP = "tolven.security.user.passwordIterationCount"; ! private static final String PRIVATE_KEY_LENGTH_PROP = "tolven.security.user.privateKeyLength"; private String pbeKeyAlgorithm; --- 42,50 ---- public class TolvenPBEPrivateKey extends TolvenEncryptedPrivateKey { ! protected static final String PBE_KEY_ALGORITHM_PROP = "tolven.security.user.pbeKeyAlgorithm"; ! protected static final String PASSWORD_SALT_LENGTH_PROP = "tolven.security.user.passwordSaltLength"; ! protected static final String PASSWORD_ITERATION_COUNT_PROP = "tolven.security.user.passwordIterationCount"; private String pbeKeyAlgorithm; *************** *** 58,62 **** private int iterationCount; - protected TolvenPBEPrivateKey() { } --- 54,57 ---- Index: TolvenEncryptedPrivateKey.java =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/src/org/tolven/security/bean/TolvenEncryptedPrivateKey.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TolvenEncryptedPrivateKey.java 27 Nov 2006 02:11:16 -0000 1.2 --- TolvenEncryptedPrivateKey.java 27 Nov 2006 04:57:52 -0000 1.3 *************** *** 24,29 **** public abstract class TolvenEncryptedPrivateKey { private EncryptedPrivateKeyInfo encryptedPrivateKeyInfo; ! private int keySize; --- 24,33 ---- public abstract class TolvenEncryptedPrivateKey { + protected static final String PRIVATE_KEY_ALGORITHM_PROP = "tolven.security.user.privateKeyAlgorithm"; + + protected static final String PRIVATE_KEY_LENGTH_PROP = "tolven.security.user.privateKeyLength"; + private EncryptedPrivateKeyInfo encryptedPrivateKeyInfo; ! private int keySize; *************** *** 55,61 **** return encryptedPrivateKeyInfo.getAlgName(); } ! /** * return the PrivateKey size * @return */ --- 59,66 ---- return encryptedPrivateKeyInfo.getAlgName(); } ! /** * return the PrivateKey size + * * @return */ *************** *** 63,69 **** return keySize; } ! /** ! * Keep the PrivateKey size since it does not appear to be readily available from an EncryptedPrivateKeyInfo * @param anInt */ --- 68,76 ---- return keySize; } ! /** ! * Keep the PrivateKey size since it does not appear to be readily available ! * from an EncryptedPrivateKeyInfo ! * * @param anInt */ |
From: Joseph I. <jos...@us...> - 2006-11-27 04:05:33
|
Update of /cvsroot/tolven/tolvenEJB/src/org/tolven/security/bean In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv24619/src/org/tolven/security/bean Modified Files: TolvenPBEPrivateKey.java Log Message: Added an init method which only takes the password and uses system-specific defaults for privateKeyAlgorithm, privateKeyLength, pbeKeyAlgorithm, random salt and iterationCount Index: TolvenPBEPrivateKey.java =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/src/org/tolven/security/bean/TolvenPBEPrivateKey.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TolvenPBEPrivateKey.java 26 Nov 2006 09:07:35 -0000 1.1 --- TolvenPBEPrivateKey.java 27 Nov 2006 04:05:31 -0000 1.2 *************** *** 20,24 **** --- 20,26 ---- import java.security.PrivateKey; import java.security.PublicKey; + import java.security.SecureRandom; import java.security.spec.PKCS8EncodedKeySpec; + import javax.crypto.Cipher; import javax.crypto.EncryptedPrivateKeyInfo; *************** *** 40,43 **** --- 42,55 ---- public class TolvenPBEPrivateKey extends TolvenEncryptedPrivateKey { + private static final String PRIVATE_KEY_ALGORITHM_PROP = "tolven.security.user.privateKeyAlgorithm"; + + private static final String PBE_KEY_ALGORITHM_PROP = "tolven.security.user.pbeKeyAlgorithm"; + + private static final String PASSWORD_SALT_LENGTH_PROP = "tolven.security.user.passwordSaltLength"; + + private static final String PASSWORD_ITERATION_COUNT_PROP = "tolven.security.user.passwordIterationCount"; + + private static final String PRIVATE_KEY_LENGTH_PROP = "tolven.security.user.privateKeyLength"; + private String pbeKeyAlgorithm; *************** *** 46,49 **** --- 58,62 ---- private int iterationCount; + protected TolvenPBEPrivateKey() { } *************** *** 58,61 **** --- 71,98 ---- } + // TODO: This could be in the wrong place. Maybe shouldn't be static either. + public static SecureRandom rng = new SecureRandom(); + + /** + * Create and protect a PrivateKey using password based encryption. Use the + * system-specific privateKeyAlgorithm, pbeKeyAlgorithm, random salt and + * iterationCount + * + * @param aPassword + * @return + * @throws GeneralSecurityException + */ + public PublicKey init(char[] aPassword) throws GeneralSecurityException { + String privateKeyAlgorithm = System + .getProperty(PRIVATE_KEY_ALGORITHM_PROP); + String pbeKeyAlgorithm = System.getProperty(PBE_KEY_ALGORITHM_PROP); + byte[] salt = rng.generateSeed(Integer.parseInt(System + .getProperty(PASSWORD_SALT_LENGTH_PROP))); + int iterationCount = Integer.parseInt(System + .getProperty(PASSWORD_ITERATION_COUNT_PROP)); + return init(privateKeyAlgorithm, pbeKeyAlgorithm, aPassword, salt, + iterationCount); + } + /** * Create and protect a PrivateKey using password based encryption *************** *** 72,77 **** --- 109,117 ---- char[] aPassword, byte[] salt, int iterationCount) throws GeneralSecurityException { + setKeySize(Integer + .parseInt(System.getProperty(PRIVATE_KEY_LENGTH_PROP))); KeyPairGenerator keyPairGenerator = KeyPairGenerator .getInstance(aPrivateKeyAlgorithm); + keyPairGenerator.initialize(getKeySize()); KeyPair keyPair = keyPairGenerator.genKeyPair(); PBEKeySpec pbeKeySpec = new PBEKeySpec(aPassword); |
From: Joseph I. <jos...@us...> - 2006-11-27 02:11:18
|
Update of /cvsroot/tolven/tolvenEJB/src/org/tolven/security/bean In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv10793/src/org/tolven/security/bean Modified Files: TolvenEncryptedPrivateKey.java Log Message: Keep the PrivateKey size since it does not appear to be readily available from an EncryptedPrivateKeyInfo Index: TolvenEncryptedPrivateKey.java =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/src/org/tolven/security/bean/TolvenEncryptedPrivateKey.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TolvenEncryptedPrivateKey.java 26 Nov 2006 09:07:35 -0000 1.1 --- TolvenEncryptedPrivateKey.java 27 Nov 2006 02:11:16 -0000 1.2 *************** *** 25,28 **** --- 25,30 ---- private EncryptedPrivateKeyInfo encryptedPrivateKeyInfo; + + private int keySize; /** *************** *** 53,56 **** --- 55,74 ---- return encryptedPrivateKeyInfo.getAlgName(); } + + /** + * return the PrivateKey size + * @return + */ + protected int getKeySize() { + return keySize; + } + + /** + * Keep the PrivateKey size since it does not appear to be readily available from an EncryptedPrivateKeyInfo + * @param anInt + */ + protected void setKeySize(int anInt) { + keySize = anInt; + } } |
From: Joseph I. <jos...@us...> - 2006-11-26 09:07:39
|
Update of /cvsroot/tolven/tolven/template In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv20238/template Modified Files: tolven.template Log Message: First commit of classes that will be used for encrypting and decrypting documents. The general encryption parameters are located in teh tolven.template files. Index: tolven.template =================================================================== RCS file: /cvsroot/tolven/tolven/template/tolven.template,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** tolven.template 14 Oct 2006 20:54:01 -0000 1.6 --- tolven.template 26 Nov 2006 09:07:38 -0000 1.7 *************** *** 21,22 **** --- 21,41 ---- tolven.ldap.rootDN=cn=Manager,dc=tolven,dc=com + # The user's public key + tolven.security.user.privateKeyLength=1024 # bits + tolven.security.user.privateKeyAlgorithm=RSA + # protect the user's private key + tolven.security.user.passwordIterationCount=20 + tolven.security.user.passwordSaltLength=12 # Randomly generated value of this length in bytes + tolven.security.user.pbeKeyAlgorithm=PBEWithMD5AndDES + # Account public key + tolven.security.account.privateKeyAlgorithm=RSA + tolven.security.account.keyLength=1024 # bits + # Protect Account private key (encrypted with user private key) + tolven.security.accountUser.kbeKeyAlgorithm=DESede # or AES + tolven.security.accountUser.secureRandomSeedLength=16 # bytes + # Encrypt document with KBE key (which is encrypted/wrapped with AccountPrivateKey) + tolven.security.doc.kbeKeyAlgorithm=DESede # or AES + tolven.security.doc.secureRandomSeedLength=16 # bytes + # Sign document with this algorithm (sign with user private key, verify with user public key) + tolven.security.doc.signatureAlgorithm=SHA1withRSA + |
From: Joseph I. <jos...@us...> - 2006-11-26 09:07:39
|
Update of /cvsroot/tolven/tolven/installer/template In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv20238/installer/template Modified Files: tolven.template Log Message: First commit of classes that will be used for encrypting and decrypting documents. The general encryption parameters are located in teh tolven.template files. Index: tolven.template =================================================================== RCS file: /cvsroot/tolven/tolven/installer/template/tolven.template,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tolven.template 16 Oct 2006 08:56:11 -0000 1.3 --- tolven.template 26 Nov 2006 09:07:38 -0000 1.4 *************** *** 20,21 **** --- 20,39 ---- tolven.ldap.genGroupDN=$LDAP_GENGROUPDN tolven.ldap.rootDN=$LDAP_ROOTDN + + tolven.security.user.privateKeyLength=1024 # bits + tolven.security.user.privateKeyAlgorithm=RSA + # protect the user's private key + tolven.security.user.passwordIterationCount=20 + tolven.security.user.passwordSaltLength=12 # Randomly generated value of this length in bytes + tolven.security.user.pbeKeyAlgorithm=PBEWithMD5AndDES + # Account public key + tolven.security.account.privateKeyAlgorithm=RSA + tolven.security.account.keyLength=1024 # bits + # Protect Account private key (encrypted with user private key) + tolven.security.accountUser.kbeKeyAlgorithm=DESede # or AES + tolven.security.accountUser.secureRandomSeedLength=16 # bytes + # Encrypt document with KBE key (which is encrypted/wrapped with AccountPrivateKey) + tolven.security.doc.kbeKeyAlgorithm=DESede # or AES + tolven.security.doc.secureRandomSeedLength=16 # bytes + # Sign document with this algorithm (sign with user private key, verify with user public key) + tolven.security.doc.signatureAlgorithm=SHA1withRSA \ No newline at end of file |
Update of /cvsroot/tolven/tolvenEJB/src/org/tolven/security/bean In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv20231/src/org/tolven/security/bean Added Files: TolvenKBEPrivateKey.java TolvenEncryptedSecretKey.java TolvenEncryptedPrivateKey.java TolvenPBEPrivateKey.java Log Message: First commit of classes that will be used for encrypting and decrypting documents. The general encryption parameters are located in teh tolven.template files. --- NEW FILE: TolvenEncryptedSecretKey.java --- /* * Copyright (C) 2006 Tolven Inc * * This library is free software; you can redistribute it and/or modify it under the terms of * the GNU Lesser General Public License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU Lesser General Public License for more details. * * Contact: in...@to... */ package org.tolven.security.bean; import java.security.GeneralSecurityException; import java.security.PrivateKey; import java.security.PublicKey; import javax.crypto.Cipher; import javax.crypto.SecretKey; /** * This class encapsulates a SecretKey which has been encrypted using a * PublicKey during initialization. To obtain the unencrypted SecretKey, the * PrivateKey companion of the encrypting PublicKey must be supplied. * * @author Joseph Isaac * */ public class TolvenEncryptedSecretKey { private final String NOT_INITIALIZED = "TolvenEncryptedSecretKey not initialized"; private byte[] encryptedKey; private String algorithm; protected TolvenEncryptedSecretKey() { } /** * Return an instance of TolvenEncryptedSecretKey * * @return */ public static TolvenEncryptedSecretKey getInstance() { return new TolvenEncryptedSecretKey(); } /** * Encrypt a SecretKey using a PublicKey * * @param aSecretKey * @param aPublicKey * @throws GeneralSecurityException */ public void init(SecretKey aSecretKey, PublicKey aPublicKey) throws GeneralSecurityException { Cipher cipher = Cipher.getInstance(aPublicKey.getAlgorithm()); cipher.init(Cipher.WRAP_MODE, aPublicKey); encryptedKey = cipher.wrap(aSecretKey); algorithm = aSecretKey.getAlgorithm(); } /** * Return the encrypted SecretKey * * @return */ public byte[] getEncryptedKey() { return encryptedKey; } /** * Return the algorithm of the encrypted SecretKey * * @return */ public String getAlgorithm() { return algorithm; } /** * Decrypt the SecretKey using a PrivateKey and return it * * @param aDecryptionKey * @return * @throws GeneralSecurityException */ public SecretKey getSecretKey(PrivateKey aDecryptionPrivateKey) throws GeneralSecurityException { if (encryptedKey == null || algorithm == null) throw new IllegalStateException(NOT_INITIALIZED); Cipher cipher = Cipher .getInstance(aDecryptionPrivateKey.getAlgorithm()); cipher.init(Cipher.UNWRAP_MODE, aDecryptionPrivateKey); return (SecretKey) cipher.unwrap(encryptedKey, algorithm, Cipher.SECRET_KEY); } } --- NEW FILE: TolvenKBEPrivateKey.java --- /* * Copyright (C) 2006 Tolven Inc * * This library is free software; you can redistribute it and/or modify it under the terms of * the GNU Lesser General Public License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU Lesser General Public License for more details. * * Contact: in...@to... */ package org.tolven.security.bean; import java.security.GeneralSecurityException; import java.security.KeyFactory; import java.security.KeyPair; import java.security.KeyPairGenerator; import java.security.PrivateKey; import java.security.PublicKey; import java.security.spec.PKCS8EncodedKeySpec; import javax.crypto.Cipher; import javax.crypto.EncryptedPrivateKeyInfo; import javax.crypto.KeyGenerator; import javax.crypto.SecretKey; /** * This class encapsulates a key-based encrypted PrivateKey, which has been * encrypted with a randomly generated SecretKey, which is itself then encrypted * with a PublicKey. The encrypted PrivateKey is encapsulated as an * EncryptedPrivateKeyInfo and the SecretKey is stored in a * TolvenEncryptedSecretKey. * * @author Joseph Isaac * */ public class TolvenKBEPrivateKey extends TolvenEncryptedPrivateKey { private TolvenEncryptedSecretKey encryptedSecretKey; protected TolvenKBEPrivateKey() { } /** * Return an instance of TolvenKBEPrivateKey * * @return */ public static TolvenKBEPrivateKey getInstance() { return new TolvenKBEPrivateKey(); } /** * Create a PrivateKey, encrypt it with a randomly generated SecretKey and * encrypt the SecretKey with a PublicKey * * @param aPrivateKeyAlgorithm * @param secretKeyAlgorithm * @param anEncryptionKey * @return * @throws GeneralSecurityException */ public PublicKey init(String aPrivateKeyAlgorithm, String secretKeyAlgorithm, PublicKey anEncryptionKey) throws GeneralSecurityException { KeyPairGenerator keyPairGenerator = KeyPairGenerator .getInstance(aPrivateKeyAlgorithm); KeyPair keyPair = keyPairGenerator.genKeyPair(); SecretKey secretKey = KeyGenerator.getInstance(secretKeyAlgorithm) .generateKey(); Cipher cipher = Cipher.getInstance(secretKey.getAlgorithm()); cipher.init(Cipher.ENCRYPT_MODE, secretKey); byte[] encryptedPrivateKey = cipher.doFinal(keyPair.getPrivate() .getEncoded()); setEncryptedPrivateKeyInfo(new EncryptedPrivateKeyInfo( aPrivateKeyAlgorithm, encryptedPrivateKey)); encryptedSecretKey = TolvenEncryptedSecretKey.getInstance(); encryptedSecretKey.init(secretKey, anEncryptionKey); return keyPair.getPublic(); } /** * Return the encrypted SecretKey * * @return */ public TolvenEncryptedSecretKey getEncryptedSecretKey() { return encryptedSecretKey; } /** * Decrypt and return the PrivateKey using aDecryptionKey * * @param aDecryptionKey * @return * @throws GeneralSecurityException */ public PrivateKey getPrivateKey(PrivateKey aDecryptionKey) throws GeneralSecurityException { SecretKey secretKey = encryptedSecretKey.getSecretKey(aDecryptionKey); Cipher cipher = Cipher.getInstance(secretKey.getAlgorithm()); cipher.init(Cipher.DECRYPT_MODE, secretKey); EncryptedPrivateKeyInfo encryptedPrivateKeyInfo = getEncryptedPrivateKeyInfo(); byte[] decryptedPrivateKey = cipher.doFinal(encryptedPrivateKeyInfo .getEncryptedData()); PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec( decryptedPrivateKey); return KeyFactory.getInstance(encryptedPrivateKeyInfo.getAlgName()) .generatePrivate(keySpec); } } --- NEW FILE: TolvenPBEPrivateKey.java --- /* * Copyright (C) 2006 Tolven Inc * * This library is free software; you can redistribute it and/or modify it under the terms of * the GNU Lesser General Public License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU Lesser General Public License for more details. * * Contact: in...@to... */ package org.tolven.security.bean; import java.security.GeneralSecurityException; import java.security.KeyFactory; import java.security.KeyPair; import java.security.KeyPairGenerator; import java.security.PrivateKey; import java.security.PublicKey; import java.security.spec.PKCS8EncodedKeySpec; import javax.crypto.Cipher; import javax.crypto.EncryptedPrivateKeyInfo; import javax.crypto.SecretKey; import javax.crypto.SecretKeyFactory; import javax.crypto.spec.PBEKeySpec; import javax.crypto.spec.PBEParameterSpec; /** * This class encapsulates a password-based encrypted PrivateKey, which has been * encrypted with a password-based encryption algorithm. The SecretKey used to * encrypt the PrivateKey is not saved, since it can be regenerated given the * pbeKeyAlgorithm, salt, iterationCount (which are stored) and the original * password. * * @author Joseph Isaac * */ public class TolvenPBEPrivateKey extends TolvenEncryptedPrivateKey { private String pbeKeyAlgorithm; private byte[] salt; private int iterationCount; protected TolvenPBEPrivateKey() { } /** * Return an instance of TolvenPBEPrivateKey * * @return */ public static TolvenPBEPrivateKey getInstance() { return new TolvenPBEPrivateKey(); } /** * Create and protect a PrivateKey using password based encryption * * @param aPrivateKeyAlgorithm * @param aSecretKeyAlgorithm * @param aPassword * @param salt * @param iterationCount * @return * @throws GeneralSecurityException */ public PublicKey init(String aPrivateKeyAlgorithm, String aPBEKeyAlgorithm, char[] aPassword, byte[] salt, int iterationCount) throws GeneralSecurityException { KeyPairGenerator keyPairGenerator = KeyPairGenerator .getInstance(aPrivateKeyAlgorithm); KeyPair keyPair = keyPairGenerator.genKeyPair(); PBEKeySpec pbeKeySpec = new PBEKeySpec(aPassword); SecretKey secretKey = SecretKeyFactory.getInstance(aPBEKeyAlgorithm) .generateSecret(pbeKeySpec); PBEParameterSpec pbeParamSpec = new PBEParameterSpec(salt, iterationCount); Cipher cipher = Cipher.getInstance(secretKey.getAlgorithm()); cipher.init(Cipher.ENCRYPT_MODE, secretKey, pbeParamSpec); byte[] encryptedPrivateKey = cipher.doFinal(keyPair.getPrivate() .getEncoded()); setEncryptedPrivateKeyInfo(new EncryptedPrivateKeyInfo( aPrivateKeyAlgorithm, encryptedPrivateKey)); this.pbeKeyAlgorithm = aPBEKeyAlgorithm; this.salt = salt; this.iterationCount = iterationCount; return keyPair.getPublic(); } /** * Decrypt and return the PrivateKey using aPassword * * @param aPassword * @return * @throws GeneralSecurityException */ public PrivateKey getPrivateKey(char[] aPassword) throws GeneralSecurityException { EncryptedPrivateKeyInfo encryptedPrivateKeyInfo = getEncryptedPrivateKeyInfo(); PBEKeySpec pbeKeySpec = new PBEKeySpec(aPassword); SecretKey secretKey = SecretKeyFactory.getInstance(pbeKeyAlgorithm) .generateSecret(pbeKeySpec); PBEParameterSpec pbeParamSpec = new PBEParameterSpec(salt, iterationCount); Cipher cipher = Cipher.getInstance(pbeKeyAlgorithm); cipher.init(Cipher.DECRYPT_MODE, secretKey, pbeParamSpec); PKCS8EncodedKeySpec privateKeySpec = encryptedPrivateKeyInfo .getKeySpec(cipher); return KeyFactory.getInstance(getPrivateKeyAlgorithm()) .generatePrivate(privateKeySpec); } } --- NEW FILE: TolvenEncryptedPrivateKey.java --- /* * Copyright (C) 2006 Tolven Inc * * This library is free software; you can redistribute it and/or modify it under the terms of * the GNU Lesser General Public License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU Lesser General Public License for more details. * * Contact: in...@to... */ package org.tolven.security.bean; import javax.crypto.EncryptedPrivateKeyInfo; /** * An abstract class which encapsulates an EncryptedPrivateKeyInfo. * * @author Joseph Isaac * */ public abstract class TolvenEncryptedPrivateKey { private EncryptedPrivateKeyInfo encryptedPrivateKeyInfo; /** * Return the EncryptedPrivateKeyInfo * * @return */ protected EncryptedPrivateKeyInfo getEncryptedPrivateKeyInfo() { return encryptedPrivateKeyInfo; } /** * Set the EncryptedPrivateKeyInfo * * @param anEncryptedPrivateKeyInfo */ protected void setEncryptedPrivateKeyInfo( EncryptedPrivateKeyInfo anEncryptedPrivateKeyInfo) { encryptedPrivateKeyInfo = anEncryptedPrivateKeyInfo; } /** * Return the PrivateKey algorithm * * @return */ public String getPrivateKeyAlgorithm() { return encryptedPrivateKeyInfo.getAlgName(); } } |
From: Joseph I. <jos...@us...> - 2006-11-22 06:35:44
|
Update of /cvsroot/tolven/tolven/security-config In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv30375/security-config Modified Files: build.xml Log Message: Added two targets to the security build.xml, which allow the LDAP and DB credentials to be tested for validity. The main targets are: validate-jboss-ldap-credentials and validate-jboss-db-credentials. (Removed the test harness plus fixed yet one more bug) Index: build.xml =================================================================== RCS file: /cvsroot/tolven/tolven/security-config/build.xml,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** build.xml 22 Nov 2006 06:16:54 -0000 1.60 --- build.xml 22 Nov 2006 06:35:37 -0000 1.61 *************** *** 818,822 **** <input message="LDAP HASH PASSWORD: Enter the hash password located in tolvenApplicationLDAP in JBoss' /tolven/conf/login-config.xml" addproperty="test.entered.login-config.ldap.hash" /> <mkdir dir="${tolven.security.openssl.ldap.dir}" /> ! <antcall target="validate-jboss-ldap-credentials-ldap.password" /> <antcall target="validate-jboss-ldap-credentials-login-config" /> <delete dir="${tolven.security.openssl.ldap.dir}" /> --- 818,822 ---- <input message="LDAP HASH PASSWORD: Enter the hash password located in tolvenApplicationLDAP in JBoss' /tolven/conf/login-config.xml" addproperty="test.entered.login-config.ldap.hash" /> <mkdir dir="${tolven.security.openssl.ldap.dir}" /> ! <antcall target="validate-jboss-ldap-credentials-ldapserver.password" /> <antcall target="validate-jboss-ldap-credentials-login-config" /> <delete dir="${tolven.security.openssl.ldap.dir}" /> *************** *** 852,856 **** <echo message="${test.entered.ldapserver.password.digest}: Digest calculated from the LDAP keystore password entered" /> <!-- Calculate the digest of the current ldapserver.password file located in tolven/conf directory --> ! <exec dir="${deploy.location}/conf" executable="${tolven.security.openssl.command}" failonerror="true"> <arg line="dgst ldapserver.password" /> </exec> --- 852,856 ---- <echo message="${test.entered.ldapserver.password.digest}: Digest calculated from the LDAP keystore password entered" /> <!-- Calculate the digest of the current ldapserver.password file located in tolven/conf directory --> ! <exec dir="${deploy.location}/conf" executable="${tolven.security.openssl.command}" outputproperty="test.current.ldapserver.password.digest" failonerror="true"> <arg line="dgst ldapserver.password" /> </exec> *************** *** 896,900 **** <echo message="${test.entered.pgserver.password.digest}: Digest calculated from the Postgresql keystore password entered" /> <!-- Calculate the digest of the current pgserver.password file located in tolven/conf directory --> ! <exec dir="${deploy.location}/conf" executable="${tolven.security.openssl.command}" failonerror="true"> <arg line="dgst pgserver.password" /> </exec> --- 896,900 ---- <echo message="${test.entered.pgserver.password.digest}: Digest calculated from the Postgresql keystore password entered" /> <!-- Calculate the digest of the current pgserver.password file located in tolven/conf directory --> ! <exec dir="${deploy.location}/conf" executable="${tolven.security.openssl.command}" outputproperty="test.current.pgserver.password.digest" failonerror="true"> <arg line="dgst pgserver.password" /> </exec> |
From: Joseph I. <jos...@us...> - 2006-11-22 06:16:55
|
Update of /cvsroot/tolven/tolven/security-config In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv22572/security-config Modified Files: build.xml Log Message: Added two targets to the security build.xml, which allow the LDAP and DB credentials to be tested for validity. The main targets are: validate-jboss-ldap-credentials and validate-jboss-db-credentials. (Removed the test harness) Index: build.xml =================================================================== RCS file: /cvsroot/tolven/tolven/security-config/build.xml,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** build.xml 22 Nov 2006 06:01:28 -0000 1.59 --- build.xml 22 Nov 2006 06:16:54 -0000 1.60 *************** *** 852,863 **** <echo message="${test.entered.ldapserver.password.digest}: Digest calculated from the LDAP keystore password entered" /> <!-- Calculate the digest of the current ldapserver.password file located in tolven/conf directory --> - <!-- <exec dir="${deploy.location}/conf" executable="${tolven.security.openssl.command}" failonerror="true"> <arg line="dgst ldapserver.password" /> </exec> - --> - <exec dir="C:\tolvenB20061001-local\tolven-jboss-4.0.4.GA\server\tolven\conf" executable="${tolven.security.openssl.command}" outputproperty="test.current.ldapserver.password.digest" failonerror="true"> - <arg line="dgst ldapserver.password" /> - </exec> <echo message="${test.current.ldapserver.password.digest}: Digest for ${deploy.location}/conf/ldapserver.password" /> <!-- Compare the two digests --> --- 852,858 ---- *************** *** 901,912 **** <echo message="${test.entered.pgserver.password.digest}: Digest calculated from the Postgresql keystore password entered" /> <!-- Calculate the digest of the current pgserver.password file located in tolven/conf directory --> - <!-- <exec dir="${deploy.location}/conf" executable="${tolven.security.openssl.command}" failonerror="true"> <arg line="dgst pgserver.password" /> </exec> - --> - <exec dir="C:\tolvenB20061001-local\tolven-jboss-4.0.4.GA\server\tolven\conf" executable="${tolven.security.openssl.command}" outputproperty="test.current.pgserver.password.digest" failonerror="true"> - <arg line="dgst pgserver.password" /> - </exec> <echo message="${test.current.pgserver.password.digest}: Digest for ${deploy.location}/conf/pgserver.password" /> <!-- Compare the two digests --> --- 896,902 ---- |
From: Joseph I. <jos...@us...> - 2006-11-22 06:01:34
|
Update of /cvsroot/tolven/tolven/security-config In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv16473/security-config Modified Files: build.xml Log Message: Added two targets to the security build.xml, which allow the LDAP and DB credentials to be tested for validity. The main targets are: validate-jboss-ldap-credentials and validate-jboss-db-credentials. Index: build.xml =================================================================== RCS file: /cvsroot/tolven/tolven/security-config/build.xml,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** build.xml 8 Nov 2006 07:27:41 -0000 1.58 --- build.xml 22 Nov 2006 06:01:28 -0000 1.59 *************** *** 2,13 **** <project basedir="." default="all" name="tolven-security"> <property file="../resources/ant-build.properties" /> ! <target name="required-properties"> <fail unless="ldap.location" /> <fail unless="postgres.location" /> <fail unless="deploy.location" /> ! <fail unless="tolven.security.keytool.command" /> ! <fail unless="tolven.security.openssl.command" /> <fail unless="tolven.security.openssl.config" /> --- 2,13 ---- <project basedir="." default="all" name="tolven-security"> <property file="../resources/ant-build.properties" /> ! <target name="required-properties"> <fail unless="ldap.location" /> <fail unless="postgres.location" /> <fail unless="deploy.location" /> ! <fail unless="tolven.security.keytool.command" /> ! <fail unless="tolven.security.openssl.command" /> <fail unless="tolven.security.openssl.config" /> *************** *** 64,75 **** <property name="tolven.ldap.key" value="${tolven.key}"/> <property name="tolven.db.key" value="${tolven.key}"/> ! <property name="tolven.jboss.keystore" value="${tolven.key}"/> <property name="tolven.jboss.keystore.jboss.key" value="${tolven.key}"/> ! <property name="tolven.jboss.truststore" value="${tolven.key}"/> <property name="tolven.jboss.truststore.ldap.key" value="${tolven.key}"/> <property name="tolven.jboss.truststore.db.key" value="${tolven.key}"/> ! <property name="tolven.webserver.key" value="${tolven.key}"/> <property name="tolven.webserver.keystore" value="${tolven.key}"/> --- 64,75 ---- <property name="tolven.ldap.key" value="${tolven.key}"/> <property name="tolven.db.key" value="${tolven.key}"/> ! <property name="tolven.jboss.keystore" value="${tolven.key}"/> <property name="tolven.jboss.keystore.jboss.key" value="${tolven.key}"/> ! <property name="tolven.jboss.truststore" value="${tolven.key}"/> <property name="tolven.jboss.truststore.ldap.key" value="${tolven.key}"/> <property name="tolven.jboss.truststore.db.key" value="${tolven.key}"/> ! <property name="tolven.webserver.key" value="${tolven.key}"/> <property name="tolven.webserver.keystore" value="${tolven.key}"/> *************** *** 77,84 **** <target name="all"> ! <antcall target="stage-init" /> ! <antcall target="stage-init-generate-credentials" /> ! <antcall target="stage-init-merge-credentials" /> ! </target> <target name="stage-init"> --- 77,84 ---- <target name="all"> ! <antcall target="stage-init" /> ! <antcall target="stage-init-generate-credentials" /> ! <antcall target="stage-init-merge-credentials" /> ! </target> <target name="stage-init"> *************** *** 86,96 **** <delete dir="${tolven.stage}" /> <mkdir dir="${tolven.stage}/ldap-deploy-location" /> ! <copy toDir="${tolven.stage}/ldap-deploy-location" overwrite="true" preservelastmodified="true" verbose="${message.show.copy}" > <fileset dir="${tolven.location}/ldap-config/"> <include name="tolveninitial.ldif"/> </fileset> ! </copy> <mkdir dir="${tolven.stage}/jboss-server/deploy/jboss-messaging.sar" /> ! <copy toDir="${tolven.stage}/jboss-server/deploy/jboss-messaging.sar" overwrite="true" preservelastmodified="true" verbose="${message.show.copy}" > <fileset dir="${tolven.location}/jboss-config/"> <include name="postgresql-persistence-service.xml"/> --- 86,96 ---- <delete dir="${tolven.stage}" /> <mkdir dir="${tolven.stage}/ldap-deploy-location" /> ! <copy toDir="${tolven.stage}/ldap-deploy-location" overwrite="true" preservelastmodified="true" verbose="${message.show.copy}" > <fileset dir="${tolven.location}/ldap-config/"> <include name="tolveninitial.ldif"/> </fileset> ! </copy> <mkdir dir="${tolven.stage}/jboss-server/deploy/jboss-messaging.sar" /> ! <copy toDir="${tolven.stage}/jboss-server/deploy/jboss-messaging.sar" overwrite="true" preservelastmodified="true" verbose="${message.show.copy}" > <fileset dir="${tolven.location}/jboss-config/"> <include name="postgresql-persistence-service.xml"/> *************** *** 98,114 **** <include name="rule-queue-service.xml"/> </fileset> ! </copy> <mkdir dir="${tolven.stage}/jboss-server/deploy/jbossweb-tomcat55.sar/jsf-libs" /> ! <copy toDir="${tolven.stage}/jboss-server/deploy/jbossweb-tomcat55.sar/jsf-libs" overwrite="true" preservelastmodified="true" verbose="${message.show.copy}" > <fileset dir="${facelets.location}/lib"> ! <include name="el-api.jar"/> ! <include name="el-ri.jar"/> </fileset> <fileset dir="${jsf.location}/lib"> ! <include name="jsf-api.jar" /> ! <include name="jsf-impl.jar" /> </fileset> ! </copy> ! <copy toDir="${tolven.stage}/jboss-server/lib" verbose="${message.show.copy}" > <fileset dir="${jdbc.location}"> <include name="*.jar"/> --- 98,114 ---- <include name="rule-queue-service.xml"/> </fileset> ! </copy> <mkdir dir="${tolven.stage}/jboss-server/deploy/jbossweb-tomcat55.sar/jsf-libs" /> ! <copy toDir="${tolven.stage}/jboss-server/deploy/jbossweb-tomcat55.sar/jsf-libs" overwrite="true" preservelastmodified="true" verbose="${message.show.copy}" > <fileset dir="${facelets.location}/lib"> ! <include name="el-api.jar"/> ! <include name="el-ri.jar"/> </fileset> <fileset dir="${jsf.location}/lib"> ! <include name="jsf-api.jar" /> ! <include name="jsf-impl.jar" /> </fileset> ! </copy> ! <copy toDir="${tolven.stage}/jboss-server/lib" verbose="${message.show.copy}" > <fileset dir="${jdbc.location}"> <include name="*.jar"/> *************** *** 117,122 **** <include name="properties-plugin.jar"/> </fileset> ! </copy> ! </target> <target name="stage-init-generate-credentials" depends="password-input"> --- 117,122 ---- <include name="properties-plugin.jar"/> </fileset> ! </copy> ! </target> <target name="stage-init-generate-credentials" depends="password-input"> *************** *** 152,156 **** </exec> </target> ! <target name="create-tolvendev-ldap-cert" depends="password-input"> <echo level="info" message="Creating LDAP certificate" /> --- 152,156 ---- </exec> </target> ! <target name="create-tolvendev-ldap-cert" depends="password-input"> <echo level="info" message="Creating LDAP certificate" /> *************** *** 226,230 **** <condition property="postgres-client-cert-dir" value="${env.APPDATA}/postgresql" else="${user.home}/postgresql"> <os family="windows"/> ! </condition> <condition property="db-client-target" value="add-current-client-postgres-to-db-truststore" else="create-tolvendev-client-cert-for-db-truststore"> <and> --- 226,230 ---- <condition property="postgres-client-cert-dir" value="${env.APPDATA}/postgresql" else="${user.home}/postgresql"> <os family="windows"/> ! </condition> <condition property="db-client-target" value="add-current-client-postgres-to-db-truststore" else="create-tolvendev-client-cert-for-db-truststore"> <and> *************** *** 232,236 **** <available file="${postgres-client-cert-dir}/postgresql.crt" /> </and> ! </condition> <antcall target="${db-client-target}" /> </target> --- 232,236 ---- <available file="${postgres-client-cert-dir}/postgresql.crt" /> </and> ! </condition> <antcall target="${db-client-target}" /> </target> *************** *** 241,250 **** <filelist dir="${postgres-client-cert-dir}" files="postgresql.crt" /> </concat> ! <copy toDir="${tolven.stage}/pg-client" overwrite="true" preservelastmodified="true" filtering="true" verbose="${message.show.copy}"> <fileset dir="${postgres-client-cert-dir}"> <include name="postgresql.crt"/> <include name="postgresql.key"/> </fileset> ! </copy> <echo level="info" message="The Client certificate postgresql.crt have been included in the db truststore" /> </target> --- 241,250 ---- <filelist dir="${postgres-client-cert-dir}" files="postgresql.crt" /> </concat> ! <copy toDir="${tolven.stage}/pg-client" overwrite="true" preservelastmodified="true" filtering="true" verbose="${message.show.copy}"> <fileset dir="${postgres-client-cert-dir}"> <include name="postgresql.crt"/> <include name="postgresql.key"/> </fileset> ! </copy> <echo level="info" message="The Client certificate postgresql.crt have been included in the db truststore" /> </target> *************** *** 482,490 **** <!-- Need to migrate to a way to hiding the password required by the JSSE, then this section is no longer required --> <filter token="tolven-jboss-password" value="${tolven.jboss.keystore}"/> ! <copy toDir="${tolven.stage}/misc" overwrite="true" preservelastmodified="true" filtering="true" verbose="${message.show.copy}"> <fileset dir="${tolven.location}/jboss-config"> <include name="tolven-properties-service.xml"/> </fileset> ! </copy> <echo level="info" message="The JBoss ldapserver.password and pgserver.password have been placed in ${tolven.stage}/jboss-server/conf" /> <echo level="info" message="The JBoss keystore and truststore are located in ${tolven.stage}/jboss-server/conf" /> --- 482,490 ---- <!-- Need to migrate to a way to hiding the password required by the JSSE, then this section is no longer required --> <filter token="tolven-jboss-password" value="${tolven.jboss.keystore}"/> ! <copy toDir="${tolven.stage}/misc" overwrite="true" preservelastmodified="true" filtering="true" verbose="${message.show.copy}"> <fileset dir="${tolven.location}/jboss-config"> <include name="tolven-properties-service.xml"/> </fileset> ! </copy> <echo level="info" message="The JBoss ldapserver.password and pgserver.password have been placed in ${tolven.stage}/jboss-server/conf" /> <echo level="info" message="The JBoss keystore and truststore are located in ${tolven.stage}/jboss-server/conf" /> *************** *** 517,525 **** <filter token="webserver-https-port" value="${webserver.https.port}"/> <filter token="webserver-http-redirect-port" value="${webserver.http-redirect.port}"/> ! <copy toDir="${tolven.stage}/jboss-server/deploy/jbossweb-tomcat55.sar" overwrite="true" preservelastmodified="true" filtering="true" verbose="${message.show.copy}"> <fileset dir="${tolven.location}/jboss-config"> ! <include name="server.xml"/> </fileset> ! </copy> </target> --- 517,525 ---- <filter token="webserver-https-port" value="${webserver.https.port}"/> <filter token="webserver-http-redirect-port" value="${webserver.http-redirect.port}"/> ! <copy toDir="${tolven.stage}/jboss-server/deploy/jbossweb-tomcat55.sar" overwrite="true" preservelastmodified="true" filtering="true" verbose="${message.show.copy}"> <fileset dir="${tolven.location}/jboss-config"> ! <include name="server.xml"/> </fileset> ! </copy> </target> *************** *** 542,556 **** <filter token="tolven-ldap-salt" value="${tolven.security.ldap.salt}"/> <filter token="tolven-ldap-iterations" value="${tolven.security.ldap.iterations}"/> ! <copy toDir="${tolven.stage}/ldap-deploy-location" overwrite="true" preservelastmodified="true" filtering="true" verbose="${message.show.copy}"> <fileset dir="${tolven.location}/ldap-config/"> <include name="slapd.conf"/> <include name="slapd_linux.conf"/> </fileset> ! </copy> ! <copy toDir="${tolven.stage}/jboss-server/conf" overwrite="true" preservelastmodified="true" filtering="true" verbose="${message.show.copy}"> <fileset dir="${tolven.location}/jboss-config/"> <include name="login-config.xml"/> </fileset> ! </copy> <!-- Need to find out how tomcat hides passwords, so this is now temporarily handled in the tolven/security-config/build.xml --> <!-- --- 542,556 ---- <filter token="tolven-ldap-salt" value="${tolven.security.ldap.salt}"/> <filter token="tolven-ldap-iterations" value="${tolven.security.ldap.iterations}"/> ! <copy toDir="${tolven.stage}/ldap-deploy-location" overwrite="true" preservelastmodified="true" filtering="true" verbose="${message.show.copy}"> <fileset dir="${tolven.location}/ldap-config/"> <include name="slapd.conf"/> <include name="slapd_linux.conf"/> </fileset> ! </copy> ! <copy toDir="${tolven.stage}/jboss-server/conf" overwrite="true" preservelastmodified="true" filtering="true" verbose="${message.show.copy}"> <fileset dir="${tolven.location}/jboss-config/"> <include name="login-config.xml"/> </fileset> ! </copy> <!-- Need to find out how tomcat hides passwords, so this is now temporarily handled in the tolven/security-config/build.xml --> <!-- *************** *** 561,565 **** </copy> --> ! <copy toDir="${tolven.stage}/jboss-server/deploy" overwrite="true" preservelastmodified="true" filtering="true" verbose="${message.show.copy}"> <fileset dir="${tolven.location}/jboss-config/"> <!-- Need to migrate to hiding the password required by the JSSE in tolven-properties-service.xml. Then thsi can be uncommented --> --- 561,565 ---- </copy> --> ! <copy toDir="${tolven.stage}/jboss-server/deploy" overwrite="true" preservelastmodified="true" filtering="true" verbose="${message.show.copy}"> <fileset dir="${tolven.location}/jboss-config/"> <!-- Need to migrate to hiding the password required by the JSSE in tolven-properties-service.xml. Then thsi can be uncommented --> *************** *** 570,587 **** <include name="tolven-ds.xml"/> </fileset> ! </copy> <!-- Need to migrate to hiding the password required by the JSSE, then the next tolven-properties-service.xml copy is no longer required --> ! <copy toDir="${tolven.stage}/jboss-server/deploy" overwrite="true" preservelastmodified="true" filtering="true" verbose="${message.show.copy}"> <fileset dir="${tolven.stage}/misc"> <include name="tolven-properties-service.xml"/> </fileset> ! </copy> ! </target> <target name="deploy-credentials" description="Initialize LDAP for Tolven"> ! <antcall target="deploy-ldap-credentials" /> ! <antcall target="deploy-db-credentials" /> ! <antcall target="deploy-pg-client-credentials-from-stage" /> ! <antcall target="deploy-jboss-credentials" /> </target> --- 570,587 ---- <include name="tolven-ds.xml"/> </fileset> ! </copy> <!-- Need to migrate to hiding the password required by the JSSE, then the next tolven-properties-service.xml copy is no longer required --> ! <copy toDir="${tolven.stage}/jboss-server/deploy" overwrite="true" preservelastmodified="true" filtering="true" verbose="${message.show.copy}"> <fileset dir="${tolven.stage}/misc"> <include name="tolven-properties-service.xml"/> </fileset> ! </copy> ! </target> <target name="deploy-credentials" description="Initialize LDAP for Tolven"> ! <antcall target="deploy-ldap-credentials" /> ! <antcall target="deploy-db-credentials" /> ! <antcall target="deploy-pg-client-credentials-from-stage" /> ! <antcall target="deploy-jboss-credentials" /> </target> *************** *** 590,594 **** <condition property="deploy-pg-target" value="deploy-certs-to-localhost-pg" else="deploy-certs-to-remote-pg"> <equals arg1="${postgres.location.browsable}" arg2="true" casesensitive="false" /> ! </condition> <antcall target="${deploy-pg-target}" /> </target> --- 590,594 ---- <condition property="deploy-pg-target" value="deploy-certs-to-localhost-pg" else="deploy-certs-to-remote-pg"> <equals arg1="${postgres.location.browsable}" arg2="true" casesensitive="false" /> ! </condition> <antcall target="${deploy-pg-target}" /> </target> *************** *** 598,602 **** <condition property="postgres-client-cert-dir" value="${env.APPDATA}/postgresql" else="${user.home}/postgresql"> <os family="windows"/> ! </condition> <mkdir dir="${postgres-client-cert-dir}" /> <copy toDir="${postgres-client-cert-dir}" overwrite="true" preservelastmodified="true" verbose="${message.show.copy}"> --- 598,602 ---- <condition property="postgres-client-cert-dir" value="${env.APPDATA}/postgresql" else="${user.home}/postgresql"> <os family="windows"/> ! </condition> <mkdir dir="${postgres-client-cert-dir}" /> <copy toDir="${postgres-client-cert-dir}" overwrite="true" preservelastmodified="true" verbose="${message.show.copy}"> *************** *** 605,609 **** <include name="postgresql.key"/> </fileset> ! </copy> </target> --- 605,609 ---- <include name="postgresql.key"/> </fileset> ! </copy> </target> *************** *** 617,621 **** <include name="tolvendev-webserver.jks"/> </fileset> ! </copy> </target> --- 617,621 ---- <include name="tolvendev-webserver.jks"/> </fileset> ! </copy> </target> *************** *** 627,631 **** <include name="root.crt"/> </fileset> ! </copy> <condition property="deploy-certs-to-localhost-pg-target" value="fix-permissions-localhost-pg-windows" else="fix-permissions-localhost-pg-unix"> <os family="windows"/> --- 627,631 ---- <include name="root.crt"/> </fileset> ! </copy> <condition property="deploy-certs-to-localhost-pg-target" value="fix-permissions-localhost-pg-windows" else="fix-permissions-localhost-pg-unix"> <os family="windows"/> *************** *** 673,677 **** <include name="root.crt"/> </fileset> ! </scp> <sshexec host="${jdbc.host}" username="${postgres.host.user}" command="cd ${postgres.location}/data && chmod 600 *.crt *.key" password="${tolven.pg.host.password}" trust="true" failonerror="true" /> <echo level="info" message="server.crt, server.key and root.crt have been copied to ${postgres.host.user}@${jdbc.host}:${postgres.location}/data" /> --- 673,677 ---- <include name="root.crt"/> </fileset> ! </scp> <sshexec host="${jdbc.host}" username="${postgres.host.user}" command="cd ${postgres.location}/data && chmod 600 *.crt *.key" password="${tolven.pg.host.password}" trust="true" failonerror="true" /> <echo level="info" message="server.crt, server.key and root.crt have been copied to ${postgres.host.user}@${jdbc.host}:${postgres.location}/data" /> *************** *** 697,701 **** <include name="tolvendev-ldap-cacerts.pem"/> </fileset> ! </scp> <sshexec host="${ldap.host}" username="${ldap.host.user}" command="chmod 600 ${ldap.location}/*.pem" password="${tolven.ldap.host.password}" trust="true" failonerror="false" /> <echo level="info" message="tolvendev-ldap-cert.pem, tolvendev-ldap-key.pem and tolvendev-ldap-cacerts.pem have been copied to ${ldap.host.user}@${ldap.host}:${ldap.location}" /> --- 697,701 ---- <include name="tolvendev-ldap-cacerts.pem"/> </fileset> ! </scp> <sshexec host="${ldap.host}" username="${ldap.host.user}" command="chmod 600 ${ldap.location}/*.pem" password="${tolven.ldap.host.password}" trust="true" failonerror="false" /> <echo level="info" message="tolvendev-ldap-cert.pem, tolvendev-ldap-key.pem and tolvendev-ldap-cacerts.pem have been copied to ${ldap.host.user}@${ldap.host}:${ldap.location}" /> *************** *** 709,713 **** <include name="tolvendev-ldap-cacerts.pem"/> </fileset> ! </copy> <condition property="fix-ldap-permissions-local-target" value="fix-ldap-permissions-local-windows" else="fix-ldap-permissions-local-unix"> <os family="windows"/> --- 709,713 ---- <include name="tolvendev-ldap-cacerts.pem"/> </fileset> ! </copy> <condition property="fix-ldap-permissions-local-target" value="fix-ldap-permissions-local-windows" else="fix-ldap-permissions-local-unix"> <os family="windows"/> *************** *** 738,747 **** </condition> <antcall target="${deploy-ldap-config-target}" /> ! </target> <target name="deploy-ldap-config-remote"> <scp file="${tolven.stage}/ldap-deploy-location/slapd_linux.conf" remoteTofile="${ldap.host.user}@${ldap.host}:${ldap.location}/slapd.conf" password="${tolven.ldap.host.password}" trust="true" failonerror="true" /> <scp file="${tolven.stage}/ldap-deploy-location/tolveninitial.ldif" todir="${ldap.host.user}@${ldap.host}:${ldap.location}" password="${tolven.ldap.host.password}" trust="true" failonerror="true" /> ! </target> <target name="deploy-ldap-config-local"> --- 738,747 ---- </condition> <antcall target="${deploy-ldap-config-target}" /> ! </target> <target name="deploy-ldap-config-remote"> <scp file="${tolven.stage}/ldap-deploy-location/slapd_linux.conf" remoteTofile="${ldap.host.user}@${ldap.host}:${ldap.location}/slapd.conf" password="${tolven.ldap.host.password}" trust="true" failonerror="true" /> <scp file="${tolven.stage}/ldap-deploy-location/tolveninitial.ldif" todir="${ldap.host.user}@${ldap.host}:${ldap.location}" password="${tolven.ldap.host.password}" trust="true" failonerror="true" /> ! </target> <target name="deploy-ldap-config-local"> *************** *** 750,768 **** </condition> <antcall target="${deploy-ldap-config-local-target}" /> ! </target> <target name="deploy-ldap-config-local-windows"> ! <copy toDir="${ldap.location}" overwrite="true" preservelastmodified="true" filtering="true" verbose="${message.show.copy}"> <fileset dir="${tolven.stage}/ldap-deploy-location"> <include name="tolveninitial.ldif"/> <include name="slapd.conf"/> </fileset> ! </copy> ! </target> <target name="deploy-ldap-config-local-unix"> <copy file="${tolven.stage}/ldap-deploy-location/slapd_linux.conf" tofile="${ldap.location}/slapd.conf" preservelastmodified="true" filtering="true" verbose="${message.show.copy}" /> <copy file="${tolven.stage}/ldap-deploy-location/tolveninitial.ldif" todir="${ldap.location}" preservelastmodified="true" filtering="true" verbose="${message.show.copy}" /> ! </target> <target name="ldapInit" description="Initialize a Tolven-specific LDAP server"> --- 750,768 ---- </condition> <antcall target="${deploy-ldap-config-local-target}" /> ! </target> <target name="deploy-ldap-config-local-windows"> ! <copy toDir="${ldap.location}" overwrite="true" preservelastmodified="true" filtering="true" verbose="${message.show.copy}"> <fileset dir="${tolven.stage}/ldap-deploy-location"> <include name="tolveninitial.ldif"/> <include name="slapd.conf"/> </fileset> ! </copy> ! </target> <target name="deploy-ldap-config-local-unix"> <copy file="${tolven.stage}/ldap-deploy-location/slapd_linux.conf" tofile="${ldap.location}/slapd.conf" preservelastmodified="true" filtering="true" verbose="${message.show.copy}" /> <copy file="${tolven.stage}/ldap-deploy-location/tolveninitial.ldif" todir="${ldap.location}" preservelastmodified="true" filtering="true" verbose="${message.show.copy}" /> ! </target> <target name="ldapInit" description="Initialize a Tolven-specific LDAP server"> *************** *** 809,811 **** --- 809,937 ---- </target> + <target name="validate-jboss-ldap-credentials"> + <!-- Validate the ldap.password file and login-config.xml tolvenApplicationLDAP hash password --> + <fail unless="deploy.location" /> + <input message="LDAP PASSWORD: Enter the LDAP rootDN PASSWORD" addproperty="test.entered.ldap.password" /> + <input message="LDAP KEYSTORE PASSWORD: Please enter the LDAP KEYSTORE PASSWORD (not the LDAP password itself) which was used to protect the LDAP password" addproperty="test.entered.ldap.keystore.password" /> + <input message="SALT: Enter the SALT value located in JBoss' tolven/deploy/tolven-ldap-service.xml" addproperty="test.entered.ldap.salt" /> + <input message="ITERATIONS: Enter the ITERATIONS value located in JBoss' /tolven/deploy/tolven-ldap-service.xml" addproperty="test.entered.ldap.iterations" /> + <input message="LDAP HASH PASSWORD: Enter the hash password located in tolvenApplicationLDAP in JBoss' /tolven/conf/login-config.xml" addproperty="test.entered.login-config.ldap.hash" /> + <mkdir dir="${tolven.security.openssl.ldap.dir}" /> + <antcall target="validate-jboss-ldap-credentials-ldap.password" /> + <antcall target="validate-jboss-ldap-credentials-login-config" /> + <delete dir="${tolven.security.openssl.ldap.dir}" /> + </target> + + <target name="validate-jboss-db-credentials"> + <!-- Validate the pg.password file and login-config.xml tolvenDB hash password --> + <fail unless="deploy.location" /> + <input message="DB PASSWORD: Enter the Postgresql PASSWORD" addproperty="test.entered.db.password" /> + <input message="DB KEYSTORE PASSWORD: Please enter the Postgresql KEYSTORE PASSWORD (not the Postgresql password itself) which was used to protect the Postgresql password" addproperty="test.entered.db.keystore.password" /> + <input message="SALT: Enter the SALT value located in JBoss' tolven/deploy/tolven-ds.xml" addproperty="test.entered.db.salt" /> + <input message="ITERATIONS: Enter the ITERATIONS value located in JBoss' /tolven/deploy/tolven-ds.xml" addproperty="test.entered.db.iterations" /> + <input message="PG HASH PASSWORD: Enter the hash password located in tolvenDB in JBoss' /tolven/conf/login-config.xml" addproperty="test.entered.login-config.db.hash" /> + <mkdir dir="${tolven.security.openssl.db.dir}" /> + <antcall target="validate-jboss-db-credentials-pgserver.password" /> + <antcall target="validate-jboss-db-credentials-login-config" /> + <delete dir="${tolven.security.openssl.db.dir}" /> + </target> + + <!-- private sub-target --> + <target name="validate-jboss-ldap-credentials-ldapserver.password"> + <!-- Create a temporary ldapserver.password file, based on the input parameters, which should match the one in JBoss' tolven/conf directory --> + <java classname="org.jboss.security.plugins.FilePassword" classpath="${tolven.location}/lib/jboss/jbosssx.jar" failonerror="true"> + <arg value="${test.entered.ldap.salt}" /> + <arg value="${test.entered.ldap.iterations}" /> + <arg value="${test.entered.ldap.keystore.password}" /> + <arg value="${tolven.security.openssl.ldap.dir}/ldapserver.password" /> + </java> + <!-- Store the digest of the newly created ldapserver.password in the property test.entered.ldapserver.password.digest --> + <exec dir="${tolven.security.openssl.ldap.dir}" executable="${tolven.security.openssl.command}" outputproperty="test.entered.ldapserver.password.digest" failonerror="true"> + <arg line="dgst ldapserver.password" /> + </exec> + <echo message="${test.entered.ldapserver.password.digest}: Digest calculated from the LDAP keystore password entered" /> + <!-- Calculate the digest of the current ldapserver.password file located in tolven/conf directory --> + <!-- + <exec dir="${deploy.location}/conf" executable="${tolven.security.openssl.command}" failonerror="true"> + <arg line="dgst ldapserver.password" /> + </exec> + --> + <exec dir="C:\tolvenB20061001-local\tolven-jboss-4.0.4.GA\server\tolven\conf" executable="${tolven.security.openssl.command}" outputproperty="test.current.ldapserver.password.digest" failonerror="true"> + <arg line="dgst ldapserver.password" /> + </exec> + <echo message="${test.current.ldapserver.password.digest}: Digest for ${deploy.location}/conf/ldapserver.password" /> + <!-- Compare the two digests --> + <condition property="test.ldapserver.password.result" value="SUCCEEDED" else="FAILED"> + <equals arg1="${test.entered.ldapserver.password.digest}" arg2="${test.current.ldapserver.password.digest}" /> + </condition> + <echo message="ldapserver.password match ${test.ldapserver.password.result}" /> + </target> + + <!-- private sub-target --> + <target name="validate-jboss-ldap-credentials-login-config"> + <!-- Calculate the login-config.xml password hash based on the input parameters --> + <java classname="org.jboss.security.plugins.PBEUtils" classpath="${tolven.location}/lib/jboss/jbosssx.jar" outputproperty="test.current.login-config.hash" failonerror="true"> + <arg value="${test.entered.ldap.salt}" /> + <arg value="${test.entered.ldap.iterations}" /> + <arg value="${test.entered.ldap.keystore.password}" /> + <arg value="${test.entered.ldap.password}" /> + </java> + <echo message="Encoded password: ${test.entered.login-config.ldap.hash}: Entered rootDN LDAP login-config password hash" /> + <echo message="${test.current.login-config.hash}: Current LDAP rootDN login-config password hash" /> + <!-- Compare the calculated login-config.xml password hash with that in tolven/conf/login-config.xml --> + <condition property="test.login-config.result" value="SUCCEEDED" else="FAILED"> + <equals arg1="Encoded password: ${test.entered.login-config.ldap.hash}" arg2="${test.current.login-config.hash}" /> + </condition> + <echo message="login-config password hash match ${test.login-config.result}" /> + </target> + + <!-- private sub-target --> + <target name="validate-jboss-db-credentials-pgserver.password"> + <!-- Create a temporary pgserver.password file, based on the input parameters, which should match the one in JBoss' tolven/conf directory --> + <java classname="org.jboss.security.plugins.FilePassword" classpath="${tolven.location}/lib/jboss/jbosssx.jar" failonerror="true"> + <arg value="${test.entered.db.salt}" /> + <arg value="${test.entered.db.iterations}" /> + <arg value="${test.entered.db.keystore.password}" /> + <arg value="${tolven.security.openssl.db.dir}/pgserver.password" /> + </java> + <!-- Store the digest of the newly created pgserver.password in the property test.entered.pgserver.password.digest --> + <exec dir="${tolven.security.openssl.db.dir}" executable="${tolven.security.openssl.command}" outputproperty="test.entered.pgserver.password.digest" failonerror="true"> + <arg line="dgst pgserver.password" /> + </exec> + <echo message="${test.entered.pgserver.password.digest}: Digest calculated from the Postgresql keystore password entered" /> + <!-- Calculate the digest of the current pgserver.password file located in tolven/conf directory --> + <!-- + <exec dir="${deploy.location}/conf" executable="${tolven.security.openssl.command}" failonerror="true"> + <arg line="dgst pgserver.password" /> + </exec> + --> + <exec dir="C:\tolvenB20061001-local\tolven-jboss-4.0.4.GA\server\tolven\conf" executable="${tolven.security.openssl.command}" outputproperty="test.current.pgserver.password.digest" failonerror="true"> + <arg line="dgst pgserver.password" /> + </exec> + <echo message="${test.current.pgserver.password.digest}: Digest for ${deploy.location}/conf/pgserver.password" /> + <!-- Compare the two digests --> + <condition property="test.pgserver.password.result" value="SUCCEEDED" else="FAILED"> + <equals arg1="${test.entered.pgserver.password.digest}" arg2="${test.current.pgserver.password.digest}" /> + </condition> + <echo message="pgserver.password match ${test.pgserver.password.result}" /> + </target> + + <!-- private sub-target --> + <target name="validate-jboss-db-credentials-login-config"> + <!-- Calculate the login-config.xml password hash based on the input parameters --> + <java classname="org.jboss.security.plugins.PBEUtils" classpath="${tolven.location}/lib/jboss/jbosssx.jar" outputproperty="test.current.login-config.hash" failonerror="true"> + <arg value="${test.entered.db.salt}" /> + <arg value="${test.entered.db.iterations}" /> + <arg value="${test.entered.db.keystore.password}" /> + <arg value="${test.entered.db.password}" /> + </java> + <echo message="Encoded password: ${test.entered.login-config.db.hash}: Entered postgres user login-config password hash" /> + <echo message="${test.current.login-config.hash}: Current postgres user login-config password hash" /> + <!-- Compare the calculated login-config.xml password hash with that in tolven/conf/login-config.xml --> + <condition property="test.login-config.result" value="SUCCEEDED" else="FAILED"> + <equals arg1="Encoded password: ${test.entered.login-config.db.hash}" arg2="${test.current.login-config.hash}" /> + </condition> + <echo message="login-config password hash match ${test.login-config.result}" /> + </target> + </project> |
From: John C. <jc...@us...> - 2006-11-19 20:04:19
|
Update of /cvsroot/tolven/tolvenWEB/web/five In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv2347/web/five Modified Files: bar2.xhtml bar1.xhtml patient.xhtml Log Message: Fix bug where menu bar would ignore visibility advice from MenuStructure metadata Index: bar2.xhtml =================================================================== RCS file: /cvsroot/tolven/tolvenWEB/web/five/bar2.xhtml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** bar2.xhtml 15 Nov 2006 07:03:11 -0000 1.2 --- bar2.xhtml 19 Nov 2006 20:04:02 -0000 1.3 *************** *** 6,10 **** xmlns:c="http://java.sun.com/jstl/core"> <head> ! <title>Menu Level 3</title> </head> <body> --- 6,10 ---- xmlns:c="http://java.sun.com/jstl/core"> <head> ! <title>Menu Level 2</title> </head> <body> Index: patient.xhtml =================================================================== RCS file: /cvsroot/tolven/tolvenWEB/web/five/patient.xhtml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** patient.xhtml 3 Aug 2006 12:38:09 -0000 1.4 --- patient.xhtml 19 Nov 2006 20:04:02 -0000 1.5 *************** *** 12,31 **** <div class="info"> <div class="allergies"><p>Patient Allergies: None <a href="#" title="Display the problems page">see detail</a></p></div> - - <select id="action" name="action" > - <option value="1" selected="selected">Next Action</option> - <option value="2">Wait in Exam for Nurse</option> - <option value="3">Wait in Exam for Me</option> - <option value="4">Discharge</option> - <option value="5">Close Chart</option> - </select> </div> ! <div class="bar1"> ! <ul> ! <c:forEach var="item" items="#{menu.thisMenu.sortedChildren}"> ! <li id="#{param.element}:#{item.node}:sel"><a href="javascript:showPane('#{param.element}:#{item.node}');"> #{item.text} </a></li> ! </c:forEach> ! </ul> ! </div> </ui:composition> </body> --- 12,17 ---- <div class="info"> <div class="allergies"><p>Patient Allergies: None <a href="#" title="Display the problems page">see detail</a></p></div> </div> ! <ui:include src="bar1.xhtml"/> </ui:composition> </body> Index: bar1.xhtml =================================================================== RCS file: /cvsroot/tolven/tolvenWEB/web/five/bar1.xhtml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** bar1.xhtml 1 Aug 2006 15:47:07 -0000 1.2 --- bar1.xhtml 19 Nov 2006 20:04:02 -0000 1.3 *************** *** 6,10 **** xmlns:c="http://java.sun.com/jstl/core"> <head> ! <title>Menu Level 2</title> </head> <body> --- 6,10 ---- xmlns:c="http://java.sun.com/jstl/core"> <head> ! <title>Menu Level 1 (under tab bar)</title> </head> <body> *************** *** 13,17 **** <ul> <c:forEach var="item" items="#{menu.thisMenu.sortedChildren}"> ! <li id="#{param.element}:#{item.node}:sel"><a href="javascript:showPane('#{param.element}:#{item.node}');"> #{item.text} </a></li> </c:forEach> </ul> --- 13,24 ---- <ul> <c:forEach var="item" items="#{menu.thisMenu.sortedChildren}"> ! <c:if test="#{item.role=='tab' and item.visible=='true'}"> ! <li id="#{param.element}:#{item.node}:sel"> ! <a href="javascript:showPane('#{param.element}:#{item.node}');"> #{item.text}</a> ! </li> ! </c:if> ! <c:if test="#{item.role=='placeholder'}"> ! <li id="#{param.element}:#{item.node}:sel" style="display:none"></li> ! </c:if> </c:forEach> </ul> |
From: John C. <jc...@us...> - 2006-11-17 03:17:43
|
Update of /cvsroot/tolven/tolvenWEB/web/five In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv25785/web/five Modified Files: xml.xhtml Added Files: agents.xhtml Log Message: Fix bug in personal and xml tabs (phr and chr) caused by fix to menuDataItem. Added drilldownItem which now navigates to the "repeating" node referenced by menuStructure. This allows a menu item to directly reference, say, the patient object. --- NEW FILE: agents.xhtml --- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:c="http://java.sun.com/jstl/core"> <head> <title>New activity for an account</title> </head> <body> <ui:composition> <c:if test="#{menu.menuDataCount==0}"> <p> No current agents posted for this patient. </p> <br/> </c:if> <c:if test="#{menu.menuDataCount!=0}"> <script language="JavaScript" type="text/javascript"> // <![CDATA[ new Rico.LiveGrid( '#{menu.element}LG', 15, #{menu.menuDataCount}, 'menuData.ajax', {prefetchBuffer: true, tableClass: 'dataGrid', largeBufferSize: 4.0, nearLimitFactor: 0.7, requestParameters: [{name: 'element', value: visiblePage}], loadingClass: 'dataGridLoading', sortAscendImg: '../images/sort_asc.gif', sortDescendImg:'../images/sort_desc.gif'}); // ]]> </script> <div id="#{menu.element}LGDG" style="width:750px"> <table id="#{menu.element}LG_header"> <thead> <tr> <th width="75px">Date</th> <th width="150px">Action</th> <th width="150px">RequestedBy</th> <th width="75px">Priority</th> <th width="95px">Date Due</th> </tr> </thead> </table> <table id="#{menu.element}LG" > <tbody> <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="75px">-</td><td width="95px">-</td></tr> <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="75px">-</td><td width="95px">-</td></tr> <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="75px">-</td><td width="95px">-</td></tr> <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="75px">-</td><td width="95px">-</td></tr> <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="75px">-</td><td width="95px">-</td></tr> <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="75px">-</td><td width="95px">-</td></tr> <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="75px">-</td><td width="95px">-</td></tr> <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="75px">-</td><td width="95px">-</td></tr> <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="75px">-</td><td width="95px">-</td></tr> <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="75px">-</td><td width="95px">-</td></tr> <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="75px">-</td><td width="95px">-</td></tr> <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="75px">-</td><td width="95px">-</td></tr> <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="75px">-</td><td width="95px">-</td></tr> <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="75px">-</td><td width="95px">-</td></tr> <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="75px">-</td><td width="95px">-</td></tr> <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="75px">-</td><td width="95px">-</td></tr> </tbody> </table> </div> </c:if> </ui:composition> </body> </html> Index: xml.xhtml =================================================================== RCS file: /cvsroot/tolven/tolvenWEB/web/five/xml.xhtml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** xml.xhtml 28 Aug 2006 19:37:40 -0000 1.1 --- xml.xhtml 17 Nov 2006 03:17:39 -0000 1.2 *************** *** 10,16 **** <body> <ui:composition> ! Document: #{menu.menuDataItem.document.id} <pre> ! #{menu.menuDataItem.document.contentString} </pre> --- 10,16 ---- <body> <ui:composition> ! Document: #{menu.drilldownItem.document.id} <pre> ! #{menu.drilldownItem.document.contentString} </pre> |
From: John C. <jc...@us...> - 2006-11-17 03:17:43
|
Update of /cvsroot/tolven/tolvenWEB/src/org/tolven/web In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv25785/src/org/tolven/web Modified Files: MenuAction.java Log Message: Fix bug in personal and xml tabs (phr and chr) caused by fix to menuDataItem. Added drilldownItem which now navigates to the "repeating" node referenced by menuStructure. This allows a menu item to directly reference, say, the patient object. Index: MenuAction.java =================================================================== RCS file: /cvsroot/tolven/tolvenWEB/src/org/tolven/web/MenuAction.java,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** MenuAction.java 15 Nov 2006 07:03:11 -0000 1.24 --- MenuAction.java 17 Nov 2006 03:17:39 -0000 1.25 *************** *** 265,272 **** return menuDataItem; } public DocCCR getDocCCR( ) throws Exception { - MenuData md = getMenuDataItem(); // System.out.println( "[getDocCCR] MD.id=" + md.getId()); DocBase doc = md.getDocument(); if (doc==null) { --- 265,293 ---- return menuDataItem; } + /** + * get the repeating item if specified in MenuStructure or + * @return + * @throws Exception + */ + public MenuData getDrilldownItem( ) throws Exception { + if (menuDataItem==null) { + MenuQueryControl ctrl = new MenuQueryControl(); + String drilldownItem = this.getDrilldown(); + if (drilldownItem!=null) { + ctrl.setRequestedPath( new MenuPath(drilldownItem) ); + } else { + ctrl.setRequestedPath( getTargetMenuPath() ); + } + ctrl.setOriginalTargetPath( getTargetMenuPath() ); + ctrl.setMenuStructure( getThisMenu() ); + ctrl.setNow( getNow()); + menuDataItem = menuLocal.findMenuDataItem( ctrl ); + } + return menuDataItem; + } public DocCCR getDocCCR( ) throws Exception { // System.out.println( "[getDocCCR] MD.id=" + md.getId()); + MenuData md = getDrilldownItem(); DocBase doc = md.getDocument(); if (doc==null) { |
From: John C. <jc...@us...> - 2006-11-17 03:17:41
|
Update of /cvsroot/tolven/tolvenEJB/src/org/tolven/app/bean In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv25770/src/org/tolven/app/bean Modified Files: MenuBean.java Log Message: Fix bug in personal and xml tabs (phr and chr) caused by fix to menuDataItem. Added drilldownItem which now navigates to the "repeating" node referenced by menuStructure. This allows a menu item to directly reference, say, the patient object. Index: MenuBean.java =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/src/org/tolven/app/bean/MenuBean.java,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** MenuBean.java 15 Nov 2006 07:00:11 -0000 1.36 --- MenuBean.java 17 Nov 2006 03:17:35 -0000 1.37 *************** *** 635,639 **** MenuStructure personal = new MenuStructure( ! account, patient, "personal.xhtml", null, 8, "personal", "Personal Info", "true", null, "tab" ); em.persist( personal ); --- 635,639 ---- MenuStructure personal = new MenuStructure( ! account, patient, "personal.xhtml", null, 8, "personal", "Personal Info", "true", root.getPath() + ":patient", "tab" ); em.persist( personal ); *************** *** 643,647 **** MenuStructure xml = new MenuStructure( ! account, patient, "xml.xhtml", null, 9, "xml", "XML (demo)", "true", null, "tab" ); em.persist( xml ); --- 643,647 ---- MenuStructure xml = new MenuStructure( ! account, patient, "xml.xhtml", null, 9, "xml", "XML (demo)", "true", root.getPath() + ":patient", "tab" ); em.persist( xml ); |
From: John C. <jc...@us...> - 2006-11-17 03:17:41
|
Update of /cvsroot/tolven/tolvenEJB/src/org/tolven/app/entity In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv25770/src/org/tolven/app/entity Modified Files: MenuStructure.java Log Message: Fix bug in personal and xml tabs (phr and chr) caused by fix to menuDataItem. Added drilldownItem which now navigates to the "repeating" node referenced by menuStructure. This allows a menu item to directly reference, say, the patient object. Index: MenuStructure.java =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/src/org/tolven/app/entity/MenuStructure.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** MenuStructure.java 21 Aug 2006 00:26:29 -0000 1.8 --- MenuStructure.java 17 Nov 2006 03:17:36 -0000 1.9 *************** *** 64,68 **** * rather than running a potentially complex query while the user waits.</p> * <p>While each rule in a MenuStructure controls the MenuData associated with that MenuStructure, the individual rules are ! * rolled up to the the account. When any data associated with an account changes, the data element is asserted into the * working memory of all the rules for that Account. Thus, a rule can potentially see every possible change to an Account. * To organize this process, it may be appropriate to modularize the rule logic. For example, say an account gets lab --- 64,68 ---- * rather than running a potentially complex query while the user waits.</p> * <p>While each rule in a MenuStructure controls the MenuData associated with that MenuStructure, the individual rules are ! * rolled up to the account. When any data associated with an account changes, the data element is asserted into the * working memory of all the rules for that Account. Thus, a rule can potentially see every possible change to an Account. * To organize this process, it may be appropriate to modularize the rule logic. For example, say an account gets lab *************** *** 145,149 **** private String visible; ! // The entity that repeats, if any, otherwise, null. For example, chart-123 would repeat per healthRecord @Column( name="NODE_REPEATING") private String repeating; --- 145,149 ---- private String visible; ! // The entity that repeats, if any, otherwise, null. For example, patient-123 would repeat per "patient" @Column( name="NODE_REPEATING") private String repeating; |
From: John C. <jc...@us...> - 2006-11-15 07:03:13
|
Update of /cvsroot/tolven/tolvenWEB/web/templates In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv22689/web/templates Modified Files: menuTemplate.xhtml Log Message: Update PHR menus and add a family generator when creating a PHR account Also, add Assessment behavior Index: menuTemplate.xhtml =================================================================== RCS file: /cvsroot/tolven/tolvenWEB/web/templates/menuTemplate.xhtml,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** menuTemplate.xhtml 17 Oct 2006 06:24:59 -0000 1.5 --- menuTemplate.xhtml 15 Nov 2006 07:03:11 -0000 1.6 *************** *** 9,13 **** Description goes here. </ui:insert> ! <img class="closetab" src="../images/#{top.accountType}_closetab_inactive.gif" onclick="closeTab('#{param.element}');return false;"/> </a> --- 9,14 ---- Description goes here. </ui:insert> ! <img class="closetab" ! src="../images/#{top.accountType}_closetab_inactive.gif" onclick="closeTab('#{param.element}');return false;"/> </a> |
From: John C. <jc...@us...> - 2006-11-15 07:03:13
|
Update of /cvsroot/tolven/tolvenWEB/web/wizard In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv22689/web/wizard Modified Files: bccIntake.xhtml wizTemplate.xhtml Added Files: gcs.xhtml Log Message: Update PHR menus and add a family generator when creating a PHR account Also, add Assessment behavior --- NEW FILE: gcs.xhtml --- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:c="http://java.sun.com/jstl/core"> <head> <title>New Patient Wizard</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> </head> <body> <ui:composition template="wizTemplate.xhtml"> <ui:param name="skin" value="#{top.accountType}"/> <ui:param name="title" value="Glasgow Coma Scale"/> <ui:param name="author" value="Tolven"/> <ui:param name="subject" value="Cynthia Howard"/> <ui:define name="steps"> <script language="JavaScript" type="text/javascript"> // <![CDATA[ function computeGCS( field ) { $(field.name + 'Val').value = field.value; if ($F('gcsEVal')=='' || $F('gcsVVal')=='' || $F('gcsMVal')=='') { $('gcsInterpret').value = '<incomplete>'; $('gcsScore').value = ''; return; } var score = (1 * $F('gcsMVal')) + (1 * $F('gcsVVal')) + (1 * $F('gcsEVal')); $('gcsScore').value = "GCS " + score + " = E" + $F('gcsEVal') + " V" + $F('gcsVVal') + " M" + $F('gcsMVal') + " at " + $F('gcsTVal'); if (score < 8) $('gcsInterpret').value = "Severe"; else if (score < 13) $('gcsInterpret').value = "Moderate"; else if (score < 15) $('gcsInterpret').value = "Minor"; else $('gcsInterpret').value = "Fully awake"; } // ]]> </script> <div class="step" title="Getting Started" > <div class="pagesm"> <p>The Glasgow Coma Scale comprises three tests: eye, verbal and motor responses. The three values separately as well as their sum are considered. The lowest possible GCS (the sum) is 3 (deep coma or death), while the highest is 15 (fully awake person).</p> <p>Click the next button when you're ready to begin.</p> <p><strong>Note: Preliminary/incomplete</strong></p> </div> </div> <div class="step" title="Glasgow Coma Scale" > <div class="pagesm"> <fieldset id="time"> <div align="right" style="margin-top:5px; padding-top:5px; float:right"><a title="More information" href="javascript:toggleHelp('time');"><img src="../images/img_help_t.jpg" border="0" /></a></div> <legend>Assessment Time (T) </legend> <input id="gcsT" name="gcsT" readonly="true" type="text" value="" size="30"/><br /> <a href="javascript:addHours('gcsT',-1);computeGCS($('gcsT'));">-1h</a> <a href="javascript:addMinutes('gcsT',-5);computeGCS($('gcsT'));">-5m</a> <a href="javascript:setNow('gcsT');computeGCS($('gcsT'));">now</a> <a href="javascript:addMinutes('gcsT', 5);computeGCS($('gcsT'));">+5m</a> <a href="javascript:addHours('gcsT', 1);computeGCS($('gcsT'));">+1h</a> <br/> </fieldset> <fieldset id="eye"> <div align="right" style="margin-top:5px; padding-top:5px; float:right"><a title="More information" href="javascript:toggleHelp('eye');"><img src="../images/img_help_t.jpg" border="0" /></a></div> <legend>Best eye response (E) </legend> <label><input name="gcsE" type="radio" value="4" onchange="computeGCS(this);"/>Eyes opening spontaneously</label><br /> <label><input name="gcsE" type="radio" value="3" onchange="computeGCS(this);"/>Eye opening to speech</label><br /> <label><input name="gcsE" type="radio" value="2" onchange="computeGCS(this);"/>Eye opening to pain</label><br /> <label><input name="gcsE" type="radio" value="1" onchange="computeGCS(this);"/>No eye opening</label><br /> <label><input name="gcsE" type="radio" value="" checked="checked" onchange="computeGCS(this);"/>Not assessed</label><br /> </fieldset> <fieldset id="verbal"> <div align="right" style="margin-top:5px; padding-top:5px; float:right"><a title="More information" href="javascript:toggleHelp('verbal');"><img src="../images/img_help_t.jpg" border="0" /></a></div> <legend>Best verbal response (V) </legend> <label><input name="gcsV" type="radio" value="5" onchange="computeGCS(this);"/>Oriented</label><br /> <label><input name="gcsV" type="radio" value="4" onchange="computeGCS(this);"/>Confused</label><br /> <label><input name="gcsV" type="radio" value="3" onchange="computeGCS(this);"/>Inappropriate words</label><br /> <label><input name="gcsV" type="radio" value="2" onchange="computeGCS(this);"/>Incomprehensible sounds</label><br /> <label><input name="gcsV" type="radio" value="1" onchange="computeGCS(this);"/>None</label><br /> <label><input name="gcsV" type="radio" value="" checked="checked" onchange="computeGCS(this);"/>Not assessed</label><br /> </fieldset> <fieldset id="motor"> <div align="right" style="margin-top:5px; padding-top:5px; float:right"><a title="More information" href="javascript:toggleHelp('motor');"><img src="../images/img_help_t.jpg" border="0" /></a></div> <legend>Best motor response (M) </legend> <label><input name="gcsM" type="radio" value="6" onchange="computeGCS(this);"/>Obeys commands</label><br /> <label><input name="gcsM" type="radio" value="5" onchange="computeGCS(this);" />Localizes to pain</label><br /> <label><input name="gcsM" type="radio" value="4" onchange="computeGCS(this);" />Withdraws from pain</label><br /> <label><input name="gcsM" type="radio" value="3" onchange="computeGCS(this);" />Flexion to pain</label><br /> <label><input name="gcsM" type="radio" value="2" onchange="computeGCS(this);" />Extension to pain</label><br /> <label><input name="gcsM" type="radio" value="1" onchange="computeGCS(this);" />No motor response</label><br /> <label><input name="gcsM" type="radio" value="" checked="checked" onchange="computeGCS(this);"/>Not assessed</label><br /> </fieldset> </div> <div class="help" id="timeHelp" style="display:none"> <h1>Assessment Time</h1> <p>The time when the assessment was done, accurate to 5 minutes.</p> <p>Use the +/- controls to adjust the assessment time. Now resets the time to now.</p> </div> <div class="help" id="eyeHelp" style="display:none"> <h1>Eye Response</h1> <p>Do not confuse "Eye opening to speech" with an awaking of a sleeping person which would score 4, not 3.</p> <p>To induce pain, put pressure on the patient's fingernail bed; if no response then try supraorbital and sternal pressure/rub.</p> </div> <div class="help" id="verbalHelp" style="display:none"> <h1>Verbal Response</h1> <p>Do not confuse "Eye opening to speech" with an awaking of a sleeping person which would score 4, not 3.</p> <p>To induce pain, put pressure on the patient's fingernail bed; if no response then try supraorbital and sternal pressure/rub.</p> </div> <div class="help" id="motorHelp" style="display:none"> <h1>Motor Response</h1> <p>Do not confuse "Eye opening to speech" with an awaking of a sleeping person which would score 4, not 3.</p> <p>To induce pain, put pressure on the patient's fingernail bed; if no response then try supraorbital and sternal pressure/rub.</p> </div> </div> <div class="step" title="Finish"> <div class="pagesm"> <fieldset id="Score"> <legend>Score </legend> <label><input id="gcsTVal" name="gcsTVal" readonly="true" type="text" size="30"/> Time</label><br /> <label><input id="gcsEVal" name="gcsEVal" readonly="true" type="text" style="text-align:right" size="4"/> Eye Score</label><br /> <label><input id="gcsVVal" name="gcsVVal" readonly="true" type="text" style="text-align:right" size="4"/> Verbal Score</label><br /> <label><input id="gcsMVal" name="gcsMVal" readonly="true" type="text" style="text-align:right" size="4"/> Motor Score</label><br /> <label><input id="gcsScore" name="gcsScore" readonly="true" type="text" size="60"/> Total Score </label><br /> </fieldset> <fieldset id="interpretation"> <div align="right" style="margin-top:5px; padding-top:5px; float:right"><a title="More information" href="javascript:toggleHelp('interpretation');"><img src="../images/img_help_t.jpg" border="0" /></a></div> <legend>Interpretation </legend> <label><input id="gcsInterpret" name="gcsInterpret" type="text" readonly="true" /> Computed</label><br /> </fieldset> <fieldset id="submission"> <div align="right" style="margin-top:5px; padding-top:5px; float:right"><a title="More information" href="javascript:toggleHelp('submission');"><img src="../images/img_help_t.jpg" border="0" /></a></div> <legend>Submission </legend> <label><input id="author" name="author" type="text" readonly="true" value="#{top.tp.givenName} #{top.tp.sn}"/> Author</label><br /> <label><input id="time" name="time" type="text" size="30" readonly="true" value="#{top.serverTime}"/> Submission Time</label><br /> <input type="submit" value="Submit" disabled="true" /> <div id="rslt" style="width:100%; height:3em; background-color:#FFFFDD;"/> </fieldset> </div> <div class="help" id="interpretationHelp" style="display:none"> <h1>Interpretation</h1> <p>Generally, comas are classified as:</p> <ul> <li>Severe, with GCS < 9 </li> <li>Moderate, GCS 9 - 12 </li> <li>Minor, GCS > 12 </li> </ul> <p>The GCS has limited applicability to children below the age of 36 months. Consider the Pediatric Glasgow Coma Scale.</p> </div> <div class="help" id="submissionHelp" style="display:none"> <h1>Submission</h1> <p>The Submit button remains disabled until all entered data is validated and has been stored on the server in your private holding area. The time field represents the time when the data was most recently captured on the server (not the time of the observation). Clicking the submit button will mark this document as complete, actionable, and immutable.</p> </div> </div> </ui:define> </ui:composition> </body> </html> Index: wizTemplate.xhtml =================================================================== RCS file: /cvsroot/tolven/tolvenWEB/web/wizard/wizTemplate.xhtml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** wizTemplate.xhtml 30 Oct 2006 19:34:24 -0000 1.1 --- wizTemplate.xhtml 15 Nov 2006 07:03:11 -0000 1.2 *************** *** 29,32 **** --- 29,33 ---- window.onload=function() { setupWizSteps(1); + } // ]]> *************** *** 35,39 **** <div class="wizard"> <form onsubmit="return false;"> ! <div class="titlebar"> <table width="100%"> <tbody> --- 36,40 ---- <div class="wizard"> <form onsubmit="return false;"> ! <div class="titlebar" style="display:none"> <table width="100%"> <tbody> *************** *** 45,49 **** </table> </div> ! <div class="infobar"> <table width="100%"> <tbody> --- 46,50 ---- </table> </div> ! <div class="infobar" style="display:none"> <table width="100%"> <tbody> *************** *** 87,94 **** <div class="navbar"> <table width="100%"> - <caption></caption> <tr> <td align="center"> ! <input id="stopButton" type="submit" value="Stop" /> <input id="prevButton" type="submit" value="Previous" onclick="prevStep( );"/> <input id="nextButton" type="submit" value="Next" onclick="nextStep( );"/> --- 88,94 ---- <div class="navbar"> <table width="100%"> <tr> <td align="center"> ! <input id="stopButton" type="submit" value="Stop" style="display:none"/> <input id="prevButton" type="submit" value="Previous" onclick="prevStep( );"/> <input id="nextButton" type="submit" value="Next" onclick="nextStep( );"/> Index: bccIntake.xhtml =================================================================== RCS file: /cvsroot/tolven/tolvenWEB/web/wizard/bccIntake.xhtml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** bccIntake.xhtml 4 Nov 2006 19:36:14 -0000 1.2 --- bccIntake.xhtml 15 Nov 2006 07:03:11 -0000 1.3 *************** *** 27,32 **** <p>Click the <img src="../images/img_discuss_t.jpg" border="0" /> button on any section to indicate that you would like to discuss that section with BCC staff.</p> <p>You don't have to complete this form ! all in one sitting. You can click "Stop" at any time. Your answers up to that ! point will be saved until you return to the form. The form will not be visible to anyone else until you say so. </p> <p>If you've answered any of these questions previously, your previous answers may be carried forward so that you can simply verify that the information is --- 27,32 ---- <p>Click the <img src="../images/img_discuss_t.jpg" border="0" /> button on any section to indicate that you would like to discuss that section with BCC staff.</p> <p>You don't have to complete this form ! all in one sitting. Your answers are automatically saved until you return to the form. ! The form will not be visible to anyone else until you say so. </p> <p>If you've answered any of these questions previously, your previous answers may be carried forward so that you can simply verify that the information is *************** *** 42,46 **** <legend>Identity </legend> <div class="value" align="right" style="margin-top:5px; padding-top:5px; float:right"><a href="javascript:toggleEditOn('identity');">Edit</a></div> ! <label><span class="title">First Name:</span> <span class="value">Cynthia</span> <span class="edit" style="display:none"><input type="text" name="firstName" value="Howard"/></span></label><br/> <label><span class="title">Middle Name:</span> <span class="value">B</span><span class="edit" style="display:none"><input type="text" name="middleName" value="B"/></span></label><br/> <label><span class="title">Last Name:</span> <span class="value">Grey</span><span class="edit" style="display:none"><input type="text" name="lastName" value="Grey"/></span></label><br/> --- 42,46 ---- <legend>Identity </legend> <div class="value" align="right" style="margin-top:5px; padding-top:5px; float:right"><a href="javascript:toggleEditOn('identity');">Edit</a></div> ! <label><span class="title">First Name:</span> <span class="value">Cynthia</span> <span class="edit" style="display:none"><input type="text" name="firstName" value="Cynthia"/></span></label><br/> <label><span class="title">Middle Name:</span> <span class="value">B</span><span class="edit" style="display:none"><input type="text" name="middleName" value="B"/></span></label><br/> <label><span class="title">Last Name:</span> <span class="value">Grey</span><span class="edit" style="display:none"><input type="text" name="lastName" value="Grey"/></span></label><br/> |
From: John C. <jc...@us...> - 2006-11-15 07:03:13
|
Update of /cvsroot/tolven/tolvenWEB/web/scripts In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv22689/web/scripts Modified Files: tolvenwiz.js tolven6.js Log Message: Update PHR menus and add a family generator when creating a PHR account Also, add Assessment behavior Index: tolvenwiz.js =================================================================== RCS file: /cvsroot/tolven/tolvenWEB/web/scripts/tolvenwiz.js,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tolvenwiz.js 4 Nov 2006 19:36:14 -0000 1.2 --- tolvenwiz.js 15 Nov 2006 07:03:11 -0000 1.3 *************** *** 4505,4511 **** } ! // Toggle help on the current step function toggleHelp(fieldset) { ! if (fieldset!=null) return; if (currentStep!=0 && $('help'+currentStep) !=null) { Element.toggle( 'help'+currentStep ); --- 4505,4514 ---- } ! // Toggle help on the current step or selected fieldset/question function toggleHelp(fieldset) { ! if (fieldset!=null) { ! Element.toggle( fieldset + "Help" ); ! return; ! } if (currentStep!=0 && $('help'+currentStep) !=null) { Element.toggle( 'help'+currentStep ); *************** *** 4632,4635 **** --- 4635,4666 ---- field.value += value; } + } + + function setNow( field ) { + var now = new Date(); + var m = now.getMinutes() - (now.getMinutes() % 5 ); + now.setMinutes( m ); + now.setSeconds( 0 ); + $(field).setAttribute( 'now', now.toString() ); + showTime( field ); + } + function showTime( field ) { + $(field).value = $(field).getAttribute( 'now' ); + } + + function addHours( field, offset ) { + if ($(field).getAttribute( 'now' )==null) setNow( field ); + var now = new Date(Date.parse( $(field).getAttribute( 'now' ))); + now.setHours( now.getHours() + offset ); + $(field).setAttribute( 'now', now.toString() ); + showTime( field ); + } + + function addMinutes( field, offset ) { + if ($(field).getAttribute( 'now' )==null) setNow( field ); + var now = new Date(Date.parse( $(field).getAttribute( 'now' ))); + now.setMinutes( now.getMinutes() + offset ); + $(field).setAttribute( 'now', now.toString() ); + showTime( field ); } Index: tolven6.js =================================================================== RCS file: /cvsroot/tolven/tolvenWEB/web/scripts/tolven6.js,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** tolven6.js 7 Nov 2006 04:06:48 -0000 1.8 --- tolven6.js 15 Nov 2006 07:03:11 -0000 1.9 *************** *** 9,19 **** serialNo = 0; titlePrefix = "Tolven"; - - // When we display a container pane, see if there's a more specific sub-page we should show instead. - // For example: selecting "chart" may actually display "chart123:results:lab" if that's where the user was when they clicked off of - // "chart". This also serves as the initial page(s) to display for each level. Thus, when we first display "chart123:results:lab", we mark - // it as the appropriate page to display when asked to display "chart123:results" and "chart" as well. - // NOTE: THIS IS A LEAK UNTIL WE REMOVE OLD CHART123-style entries although it would only be a problem if the user navigated to hundreds of patients. - //VSP visibleSubPage = new Array(); // Intercept a normal Submit and do it Ajax-style instead --- 9,12 ---- *************** *** 26,30 **** } queryComponents.push( 'element='+visiblePage ); ! Form.disable( f ); // Don't allow edits or button pushes var ajax = new Ajax.Updater( --- 19,23 ---- } queryComponents.push( 'element='+visiblePage ); ! // alert( "submit: " + visiblePage ); Form.disable( f ); // Don't allow edits or button pushes var ajax = new Ajax.Updater( *************** *** 103,106 **** --- 96,100 ---- menuItem.innerHTML = "<a href='javascript:showPane(" + '"' + id + '"' + ");'>" + id + "</a>"; placeholder.parentNode.insertBefore(menuItem,placeholder); + alert( "[fillPlaceholder]Request link for: " + id ); getRemoteMenuItem( id ); } *************** *** 139,142 **** --- 133,137 ---- "</a>"; placeholder.parentNode.insertBefore(menuItem,placeholder); + // alert( "requestMenuItem: " + id ); getRemoteMenuItem( id ); } |
From: John C. <jc...@us...> - 2006-11-15 07:03:13
|
Update of /cvsroot/tolven/tolvenWEB/web/styles In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv22689/web/styles Modified Files: echr.css wizard.css ephr.css Log Message: Update PHR menus and add a family generator when creating a PHR account Also, add Assessment behavior Index: wizard.css =================================================================== RCS file: /cvsroot/tolven/tolvenWEB/web/styles/wizard.css,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wizard.css 4 Nov 2006 19:36:13 -0000 1.3 --- wizard.css 15 Nov 2006 07:03:11 -0000 1.4 *************** *** 1,8 **** .wizard { ! BORDER-RIGHT: #333333 2px solid; PADDING-RIGHT: 0px; BORDER-TOP: #333333 2px solid; DISPLAY: block; PADDING-LEFT: 0px; BACKGROUND: #ffffff; PADDING-BOTTOM: 0px; MARGIN: 20px; BORDER-LEFT: #333333 2px solid; PADDING-TOP: 0px; BORDER-BOTTOM: #333333 2px solid; FONT-FAMILY: 'Lucide Grande', Verdana, Arial, sans-serif } ! FORM { ! PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px } .titlebar { PADDING-RIGHT: 6px; PADDING-LEFT: 10px; BACKGROUND: url(../images/bkgd_wizardtitle.jpg) #333333 repeat-x left center; PADDING-BOTTOM: 4px; MARGIN: 0px; COLOR: #ffffff; PADDING-TOP: 4px; BORDER-BOTTOM: #333333 1px solid --- 1,10 ---- .wizard { ! BORDER: #333333 1px solid; PADDING: 0px; DISPLAY: block; BACKGROUND: #ffffff; MARGIN: 4px; FONT-FAMILY: 'Lucide Grande', Verdana, Arial, sans-serif } ! ! form { ! PADDING: 0px; MARGIN: 0px } + .titlebar { PADDING-RIGHT: 6px; PADDING-LEFT: 10px; BACKGROUND: url(../images/bkgd_wizardtitle.jpg) #333333 repeat-x left center; PADDING-BOTTOM: 4px; MARGIN: 0px; COLOR: #ffffff; PADDING-TOP: 4px; BORDER-BOTTOM: #333333 1px solid Index: echr.css =================================================================== RCS file: /cvsroot/tolven/tolvenWEB/web/styles/echr.css,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** echr.css 30 Oct 2006 19:34:23 -0000 1.3 --- echr.css 15 Nov 2006 07:03:11 -0000 1.4 *************** *** 262,265 **** --- 262,277 ---- TEXT-DECORATION: none; } + + .bar2 li a img { + border: 0px; + PADDING-RIGHT: 0px; + PADDING-LEFT: 0px; + PADDING-BOTTOM: 0px; + MARGIN: 0px; + PADDING-TOP: 0px; + width: 12px; + height: 12px; + } + .bar2 li.active a:hover { BACKGROUND: url(../images/bkgd_nav2_active.gif) no-repeat center bottom; COLOR: #191919 Index: ephr.css =================================================================== RCS file: /cvsroot/tolven/tolvenWEB/web/styles/ephr.css,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ephr.css 4 Nov 2006 19:36:13 -0000 1.3 --- ephr.css 15 Nov 2006 07:03:11 -0000 1.4 *************** *** 290,293 **** --- 290,305 ---- TEXT-DECORATION: none; } + + .bar2 li a img { + border: 0px; + PADDING-RIGHT: 0px; + PADDING-LEFT: 0px; + PADDING-BOTTOM: 0px; + MARGIN: 0px; + PADDING-TOP: 0px; + width: 12px; + height: 12px; + } + .bar2 li.active a:hover { BACKGROUND: url(../images/bkgd_nav2_active.gif) no-repeat center bottom; COLOR: #191919 |
From: John C. <jc...@us...> - 2006-11-15 07:03:13
|
Update of /cvsroot/tolven/tolvenWEB/web/WEB-INF In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv22689/web/WEB-INF Modified Files: faces-config.xml Log Message: Update PHR menus and add a family generator when creating a PHR account Also, add Assessment behavior Index: faces-config.xml =================================================================== RCS file: /cvsroot/tolven/tolvenWEB/web/WEB-INF/faces-config.xml,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** faces-config.xml 6 Nov 2006 23:12:05 -0000 1.26 --- faces-config.xml 15 Nov 2006 07:03:11 -0000 1.27 *************** *** 446,451 **** --- 446,464 ---- <navigation-rule> + <from-view-id>/five/assAll.xhtml</from-view-id> + <navigation-case> + <from-action>#{menu.createAssessment}</from-action> + <from-outcome>success</from-outcome> + <to-view-id>/five/assAll.xhtml</to-view-id> + </navigation-case> + </navigation-rule> + <navigation-rule> <from-view-id>/ajax/paneDispatch.xhtml</from-view-id> <navigation-case> + <from-action>#{menu.createAssessment}</from-action> + <from-outcome>success</from-outcome> + <to-view-id>/five/assAll.xhtml</to-view-id> + </navigation-case> + <navigation-case> <from-action>#{gen.generatePeople}</from-action> <from-outcome>success</from-outcome> |
From: John C. <jc...@us...> - 2006-11-15 07:03:13
|
Update of /cvsroot/tolven/tolvenWEB/web/private In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv22689/web/private Modified Files: createAccount.xhtml Log Message: Update PHR menus and add a family generator when creating a PHR account Also, add Assessment behavior Index: createAccount.xhtml =================================================================== RCS file: /cvsroot/tolven/tolvenWEB/web/private/createAccount.xhtml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** createAccount.xhtml 6 Nov 2006 07:41:30 -0000 1.2 --- createAccount.xhtml 15 Nov 2006 07:03:11 -0000 1.3 *************** *** 28,35 **** </h:selectOneMenu> <h:selectBooleanCheckbox value="#{reg.genDemoData}" /> ! <h:outputText value="Add 100 demo patients to the clinical account you create*"/> </h:panelGrid> ! <p>* If checked, 100 new patients will be added to the clinical account being created. ! <b>This will take a few minutes.</b> You can add more patients later from the Account Administration page. </p> <p>The generated patients will have names and dates of birth corresponding to US population distribution. --- 28,36 ---- </h:selectOneMenu> <h:selectBooleanCheckbox value="#{reg.genDemoData}" /> ! <h:outputText value="Add demo to the account you create*"/> </h:panelGrid> ! <p>* If checked, a small family for a personal account or about 50 new patients will be created in a clinical account. </p> ! <h5>Clinical Account</h5> ! <p><b>This will take a few minutes.</b> You can add more patients to a clinical account later from the Account Administration page. </p> <p>The generated patients will have names and dates of birth corresponding to US population distribution. |
From: John C. <jc...@us...> - 2006-11-15 07:03:13
|
Update of /cvsroot/tolven/tolvenWEB/src/org/tolven/web In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv22689/src/org/tolven/web Modified Files: TopAction.java RegisterAction.java MenuAction.java Log Message: Update PHR menus and add a family generator when creating a PHR account Also, add Assessment behavior Index: TopAction.java =================================================================== RCS file: /cvsroot/tolven/tolvenWEB/src/org/tolven/web/TopAction.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** TopAction.java 6 Nov 2006 22:25:37 -0000 1.20 --- TopAction.java 15 Nov 2006 07:03:11 -0000 1.21 *************** *** 124,128 **** public String getServerTime( ) throws IOException { ! return "Transaction time at the server: " + getNow().toString() + ", Timezone: " + getTimeZone(); } --- 124,128 ---- public String getServerTime( ) throws IOException { ! return getNow().toString(); } Index: MenuAction.java =================================================================== RCS file: /cvsroot/tolven/tolvenWEB/src/org/tolven/web/MenuAction.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** MenuAction.java 6 Nov 2006 07:41:30 -0000 1.23 --- MenuAction.java 15 Nov 2006 07:03:11 -0000 1.24 *************** *** 379,382 **** return graphURL; } ! } \ No newline at end of file --- 379,426 ---- return graphURL; } ! ! /** ! * Temporary: Create an assessment ! * @return ! */ ! public String createAssessment() { ! // Climb the current menu path to find the patient MenuStructure node ! String patientPath = getTargetMenuPath().getSubPath("patient"); ! System.out.println( "[createAssessment] patient=" + patientPath ); ! MenuStructure patientMS = menuLocal.findMenuStructure( getAccountId(), patientPath ); ! ! // Get the patient menuData ! MenuQueryControl ctrl = new MenuQueryControl(); ! ctrl.setMenuStructure( patientMS ); ! ctrl.setNow( getNow()); ! ctrl.setRequestedPath( new MenuPath( getTargetMenuPath().getSubPathWithIds("patient")) ); ! MenuData patient = menuLocal.findMenuDataItem( ctrl ); ! if (patient==null) throw new RuntimeException( "Patient not found "); ! MenuData ass = new MenuData(); ! // Find the assessment MS ! MenuStructure msa = menuLocal.findDescendentMenuStructure(patientMS.getAccount().getId(), patientMS, "assessments:assessment"); ! ass.setMenuStructure(msa); ! ass.setAccount(patientMS.getAccount()); ! ass.setParent01(patient); ! ass.setDate01(getNow()); ! ass.setString01("GCS"); ! ass.setString02( "new"); ! menuLocal.persistMenuData(ass); ! // That should be it for an assessment but since we don't have reflexive queries ! // done yet, we have to manually att this assessment to the list of assessments ! // but in fact, this should be in a list of pending assessments but we won't ! // go there yet. ! MenuData assAll = new MenuData(); ! // MenuStructure msaa = menuLocal.findDescendentMenuStructure(patientMS.getAccount().getId(), patientMS, "assessments:all"); ! MenuStructure msaa = this.getThisMenu(); ! assAll.setMenuStructure(msaa); ! assAll.setAccount(msaa.getAccount()); ! assAll.setParent01(patient); ! assAll.setDate01(getNow()); ! assAll.setString01("GCS"); ! assAll.setString02( "incomplete"); ! assAll.setReference(ass); ! menuLocal.persistMenuData(assAll); ! return "success"; ! } } \ No newline at end of file Index: RegisterAction.java =================================================================== RCS file: /cvsroot/tolven/tolvenWEB/src/org/tolven/web/RegisterAction.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** RegisterAction.java 6 Nov 2006 07:41:30 -0000 1.23 --- RegisterAction.java 15 Nov 2006 07:03:11 -0000 1.24 *************** *** 143,147 **** public String createNewAccount() throws Exception { Account account = accountBean.createAccount2( this.getNewAccountTitle(), getNewTimeZone(), getNewAccountType() ); ! //System.out.println( "Created account: " + account.getId() + "acct type " + account.getAccountType().getKnownType()); // Note, the user automatically gets account permission because they are the only user on that new account. accountBean.addAccountUser( account, getTop().getUser(), getNow(), true); --- 143,147 ---- public String createNewAccount() throws Exception { Account account = accountBean.createAccount2( this.getNewAccountTitle(), getNewTimeZone(), getNewAccountType() ); ! System.out.println( "Created account: " + account.getId() + ", acct type " + account.getAccountType().getKnownType()); // Note, the user automatically gets account permission because they are the only user on that new account. accountBean.addAccountUser( account, getTop().getUser(), getNow(), true); *************** *** 149,155 **** menu.createDefaultMenuStructure( account ); if (this.isGenDemoData()) { ! chrGen.createPatients( getTop().getUser(), account, 100, getTop().getNow(), 1996 ); } - System.out.println("created patients"); return "success"; --- 149,161 ---- menu.createDefaultMenuStructure( account ); if (this.isGenDemoData()) { ! if (account.getAccountType().getKnownType().equals("ephr")) { ! chrGen.createFamily( getTop().getUser(), account, getTop().getNow(), 1999 ); ! System.out.println("created family"); ! } ! if (account.getAccountType().getKnownType().equals("echr")) { ! chrGen.createPatients( getTop().getUser(), account, 50, getTop().getNow(), 1996 ); ! System.out.println("created patients"); ! } } return "success"; |
Update of /cvsroot/tolven/tolvenWEB/web/five In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv22689/web/five Modified Files: bar2.xhtml providers.xhtml patActivity.xhtml protocols.xhtml Added Files: assAll.xhtml assessment.xhtml newAss.xhtml assLink.xhtml Log Message: Update PHR menus and add a family generator when creating a PHR account Also, add Assessment behavior --- NEW FILE: assAll.xhtml --- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:c="http://java.sun.com/jstl/core"> <head> <title>New activity for an account</title> </head> <body> <ui:composition> <div id="#{menu.element}pane"> <c:if test="#{menu.menuDataCount==0}"> <p> No assessments posted for this patient. </p> <br/> </c:if> <c:if test="#{menu.menuDataCount!=0}"> <script language="JavaScript" type="text/javascript"> // <![CDATA[ new Rico.LiveGrid( '#{menu.element}LG', 15, #{menu.menuDataCount}, 'menuData.ajax', {prefetchBuffer: true, tableClass: 'dataGrid', largeBufferSize: 4.0, nearLimitFactor: 0.7, requestParameters: [{name: 'element', value: visiblePage}], loadingClass: 'dataGridLoading', sortAscendImg: '../images/sort_asc.gif', sortDescendImg:'../images/sort_desc.gif'}); // ]]> </script> <div id="#{menu.element}LGDG" style="width:975px"> <table id="#{menu.element}LG_header"> <thead> <tr> <th width="175px">Date</th> <th width="250px">Assessment</th> <th width="150px">Status</th> <th width="200px">Interpretation</th> <th width="150px">Source</th> </tr> </thead> </table> <table id="#{menu.element}LG" > <tbody> <tr><td width="175px">-</td><td width="250px">-</td><td width="150px">-</td><td width="200px">-</td><td width="150px">-</td></tr> <tr><td width="175px">-</td><td width="250px">-</td><td width="150px">-</td><td width="200px">-</td><td width="150px">-</td></tr> <tr><td width="175px">-</td><td width="250px">-</td><td width="150px">-</td><td width="200px">-</td><td width="150px">-</td></tr> <tr><td width="175px">-</td><td width="250px">-</td><td width="150px">-</td><td width="200px">-</td><td width="150px">-</td></tr> <tr><td width="175px">-</td><td width="250px">-</td><td width="150px">-</td><td width="200px">-</td><td width="150px">-</td></tr> <tr><td width="175px">-</td><td width="250px">-</td><td width="150px">-</td><td width="200px">-</td><td width="150px">-</td></tr> <tr><td width="175px">-</td><td width="250px">-</td><td width="150px">-</td><td width="200px">-</td><td width="150px">-</td></tr> <tr><td width="175px">-</td><td width="250px">-</td><td width="150px">-</td><td width="200px">-</td><td width="150px">-</td></tr> <tr><td width="175px">-</td><td width="250px">-</td><td width="150px">-</td><td width="200px">-</td><td width="150px">-</td></tr> <tr><td width="175px">-</td><td width="250px">-</td><td width="150px">-</td><td width="200px">-</td><td width="150px">-</td></tr> <tr><td width="175px">-</td><td width="250px">-</td><td width="150px">-</td><td width="200px">-</td><td width="150px">-</td></tr> <tr><td width="175px">-</td><td width="250px">-</td><td width="150px">-</td><td width="200px">-</td><td width="150px">-</td></tr> <tr><td width="175px">-</td><td width="250px">-</td><td width="150px">-</td><td width="200px">-</td><td width="150px">-</td></tr> <tr><td width="175px">-</td><td width="250px">-</td><td width="150px">-</td><td width="200px">-</td><td width="150px">-</td></tr> <tr><td width="175px">-</td><td width="250px">-</td><td width="150px">-</td><td width="200px">-</td><td width="150px">-</td></tr> <tr><td width="175px">-</td><td width="250px">-</td><td width="150px">-</td><td width="200px">-</td><td width="150px">-</td></tr> </tbody> </table> </div> </c:if> <h:form id="assGen" onsubmit="return ajaxSubmit2(this);"> <h:commandButton id="assGenAction" action="#{menu.createAssessment}" value="Create Assessment"/> </h:form> <h:messages errorClass="errorMsg" infoClass="infoMsg" warnClass="warnMsg" fatalClass="fatalMsg"/> </div> </ui:composition> </body> </html> Index: patActivity.xhtml =================================================================== RCS file: /cvsroot/tolven/tolvenWEB/web/five/patActivity.xhtml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** patActivity.xhtml 7 Nov 2006 08:41:03 -0000 1.2 --- patActivity.xhtml 15 Nov 2006 07:03:11 -0000 1.3 *************** *** 10,13 **** --- 10,20 ---- <body> <ui:composition> + <c:if test="#{menu.menuDataCount==0}"> + <p> + No current actions posted for this patient. + </p> + <br/> + </c:if> + <c:if test="#{menu.menuDataCount!=0}"> <script language="JavaScript" type="text/javascript"> // <![CDATA[ *************** *** 33,38 **** <th width="150px">Action</th> <th width="150px">RequestedBy</th> ! <th width="50px">Priority</th> ! <th width="85px">Date Due</th> </tr> </thead> --- 40,45 ---- <th width="150px">Action</th> <th width="150px">RequestedBy</th> ! <th width="75px">Priority</th> ! <th width="95px">Date Due</th> </tr> </thead> *************** *** 40,63 **** <table id="#{menu.element}LG" > <tbody> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> </tbody> </table> </div> ! </ui:composition> </body> --- 47,70 ---- <table id="#{menu.element}LG" > <tbody> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="75px">-</td><td width="95px">-</td></tr> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="75px">-</td><td width="95px">-</td></tr> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="75px">-</td><td width="95px">-</td></tr> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="75px">-</td><td width="95px">-</td></tr> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="75px">-</td><td width="95px">-</td></tr> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="75px">-</td><td width="95px">-</td></tr> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="75px">-</td><td width="95px">-</td></tr> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="75px">-</td><td width="95px">-</td></tr> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="75px">-</td><td width="95px">-</td></tr> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="75px">-</td><td width="95px">-</td></tr> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="75px">-</td><td width="95px">-</td></tr> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="75px">-</td><td width="95px">-</td></tr> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="75px">-</td><td width="95px">-</td></tr> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="75px">-</td><td width="95px">-</td></tr> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="75px">-</td><td width="95px">-</td></tr> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="150px">-</td><td width="75px">-</td><td width="95px">-</td></tr> </tbody> </table> </div> ! </c:if> </ui:composition> </body> --- NEW FILE: newAss.xhtml --- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:c="http://java.sun.com/jstl/core"> <head> <title>New activity for an account</title> </head> <body> <ui:composition> <div id="#{menu.element}pane"> <p> Start a new assessment for this patient. </p> <script language="JavaScript" type="text/javascript"> // <![CDATA[ new Rico.LiveGrid( '#{menu.element}LG', 15, #{menu.menuDataCount}, 'menuData.ajax', {prefetchBuffer: true, tableClass: 'dataGrid', largeBufferSize: 4.0, nearLimitFactor: 0.7, requestParameters: [{name: 'element', value: visiblePage}], loadingClass: 'dataGridLoading', sortAscendImg: '../images/sort_asc.gif', sortDescendImg:'../images/sort_desc.gif'}); // ]]> </script> <div id="#{menu.element}LGDG" style="width:500px"> <table id="#{menu.element}LG_header"> <thead> <tr> <th width="250px">Assessment</th> <th width="150px">Status</th> </tr> </thead> </table> <table id="#{menu.element}LG" > <tbody> <tr><td width="250px">-</td><td width="150px">-</td></tr> <tr><td width="250px">-</td><td width="150px">-</td></tr> <tr><td width="250px">-</td><td width="150px">-</td></tr> <tr><td width="250px">-</td><td width="150px">-</td></tr> <tr><td width="250px">-</td><td width="150px">-</td></tr> <tr><td width="250px">-</td><td width="150px">-</td></tr> <tr><td width="250px">-</td><td width="150px">-</td></tr> <tr><td width="250px">-</td><td width="150px">-</td></tr> <tr><td width="250px">-</td><td width="150px">-</td></tr> <tr><td width="250px">-</td><td width="150px">-</td></tr> <tr><td width="250px">-</td><td width="150px">-</td></tr> <tr><td width="250px">-</td><td width="150px">-</td></tr> <tr><td width="250px">-</td><td width="150px">-</td></tr> <tr><td width="250px">-</td><td width="150px">-</td></tr> <tr><td width="250px">-</td><td width="150px">-</td></tr> <tr><td width="250px">-</td><td width="150px">-</td></tr> </tbody> </table> </div> <h:form id="assGen" onsubmit="return ajaxSubmit2(this);"> <h:commandButton id="assGenAction" action="#{menu.createAssessment}" value="Create Assessment"/> </h:form> <h:messages errorClass="errorMsg" infoClass="infoMsg" warnClass="warnMsg" fatalClass="fatalMsg"/> </div> </ui:composition> </body> </html> Index: protocols.xhtml =================================================================== RCS file: /cvsroot/tolven/tolvenWEB/web/five/protocols.xhtml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** protocols.xhtml 18 Oct 2006 15:35:57 -0000 1.2 --- protocols.xhtml 15 Nov 2006 07:03:11 -0000 1.3 *************** *** 10,16 **** <body> <ui:composition> ! <p> ! A list of the protocols for the patient for element #{param.element}, path #{menu.targetMenuPath.path}. ! </p> </ui:composition> </body> --- 10,15 ---- <body> <ui:composition> ! <iframe src="../wizard/gcs.jsf" width="100%" height="680px" frameborder="off" marginwidth="4" marginheight="4"></iframe> ! </ui:composition> </body> --- NEW FILE: assLink.xhtml --- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:c="http://java.sun.com/jstl/core"> <head> <title>Content of links referencing Assessments</title> </head> <body> <ui:composition> <h:outputText value="#{menu.menuDataItem.string01}"/> <h:outputText value=" (#{menu.menuDataItem.string02})"/> </ui:composition> </body> </html> Index: bar2.xhtml =================================================================== RCS file: /cvsroot/tolven/tolvenWEB/web/five/bar2.xhtml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** bar2.xhtml 28 Jul 2006 20:20:00 -0000 1.1 --- bar2.xhtml 15 Nov 2006 07:03:11 -0000 1.2 *************** *** 13,17 **** <ul> <c:forEach var="item" items="#{menu.thisMenu.sortedChildren}"> ! <li id="#{param.element}:#{item.node}:sel" ><a href="javascript:showPane('#{param.element}:#{item.node}');"> #{item.text} </a></li> </c:forEach> </ul> --- 13,24 ---- <ul> <c:forEach var="item" items="#{menu.thisMenu.sortedChildren}"> ! <c:if test="#{item.role=='tab' and item.visible=='true'}"> ! <li id="#{param.element}:#{item.node}:sel"> ! <a href="javascript:showPane('#{param.element}:#{item.node}');"> #{item.text}</a> ! </li> ! </c:if> ! <c:if test="#{item.role=='placeholder'}"> ! <li id="#{param.element}:#{item.node}:sel" style="display:none"></li> ! </c:if> </c:forEach> </ul> --- NEW FILE: assessment.xhtml --- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:c="http://java.sun.com/jstl/core"> <head> <title>Assessment</title> </head> <body> <ui:composition> <iframe src="../wizard/gcs.jsf" width="100%" height="680px" frameborder="off" marginwidth="4" marginheight="4"></iframe> </ui:composition> </body> </html> Index: providers.xhtml =================================================================== RCS file: /cvsroot/tolven/tolvenWEB/web/five/providers.xhtml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** providers.xhtml 30 Oct 2006 19:34:24 -0000 1.3 --- providers.xhtml 15 Nov 2006 07:03:11 -0000 1.4 *************** *** 10,18 **** <body> <ui:composition> ! <p>A full list of providers for the patient for element #{param.element}, path #{menu.targetMenuPath.path}.</p> ! <p>Experimental and incomplete: </p> ! <h:outputLink value="../wizard/bccIntake.jsf"> ! <h:outputText value="Breast cancer questionnaire"/> ! </h:outputLink> </ui:composition> </body> --- 10,14 ---- <body> <ui:composition> ! <iframe src="../wizard/bccIntake.jsf" width="100%" height="680px" frameborder="off" marginwidth="4" marginheight="4"></iframe> </ui:composition> </body> |
From: John C. <jc...@us...> - 2006-11-15 07:00:13
|
Update of /cvsroot/tolven/tolvenEJB/src/org/tolven/gen/bean In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv21579/src/org/tolven/gen/bean Modified Files: GenMedical.java CHRGeneratorBean.java Log Message: Update PHR menus and add a family generator when creating a PHR account Index: GenMedical.java =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/src/org/tolven/gen/bean/GenMedical.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** GenMedical.java 6 Nov 2006 07:41:24 -0000 1.13 --- GenMedical.java 15 Nov 2006 07:00:11 -0000 1.14 *************** *** 60,64 **** } if ("ephr".equals(patient.getAccount().getAccountType().getKnownType())) { ! msActivity = menu.findMenuStructure( patient.getAccount().getId(), patient.getAccount().getAccountType().getKnownType() + ":family:activity"); } msProblem = menu.findDescendentMenuStructure( patient.getAccount().getId(), ms, "problems"); --- 60,64 ---- } if ("ephr".equals(patient.getAccount().getAccountType().getKnownType())) { ! msActivity = menu.findMenuStructure( patient.getAccount().getId(), patient.getAccount().getAccountType().getKnownType() + ":activity:all"); } msProblem = menu.findDescendentMenuStructure( patient.getAccount().getId(), ms, "problems"); *************** *** 94,102 **** public GenMedical ( MenuLocal menu, MenuData mdCHR, MenuData mdPHR, Date now, int startYear, CHRGeneratorBean chrGen) throws JAXBException, CCRException { this.menu = menu; ! this.mdCHR = new PatientMD( menu, mdCHR ); ! this.mdPHR = new PatientMD( menu, mdPHR ); this.now = now; // We arbitrarily use the PHR patient ccd since we're just reading patient actor information ! DocCCR docCCR = (DocCCR) mdPHR.getDocument(); ccrPat = docCCR.getPatientActor(); // Figure out gender right away --- 94,113 ---- public GenMedical ( MenuLocal menu, MenuData mdCHR, MenuData mdPHR, Date now, int startYear, CHRGeneratorBean chrGen) throws JAXBException, CCRException { this.menu = menu; ! if (mdCHR!=null) { ! this.mdCHR = new PatientMD( menu, mdCHR ); ! } ! if (mdPHR!=null) { ! this.mdPHR = new PatientMD( menu, mdPHR ); ! } this.now = now; + DocCCR docCCR = null; // We arbitrarily use the PHR patient ccd since we're just reading patient actor information ! if (mdPHR!=null) { ! System.out.println( "Using mdPHR"); ! docCCR = (DocCCR) mdPHR.getDocument(); ! } else { ! System.out.println( "Using mdCHR"); ! docCCR = (DocCCR) mdCHR.getDocument(); ! } ccrPat = docCCR.getPatientActor(); // Figure out gender right away *************** *** 209,225 **** */ public void generateProblem( Date onset, String problem, String status ) { ! generateProblemDetail( this.mdCHR, onset, problem, status ); ! generateProblemDetail( this.mdPHR, onset, problem, status ); ! // Add patient to disease list ! MenuData mdd = new MenuData(); ! mdd.setMenuStructure( mdCHR.msDisease ); ! mdd.setReference(mdCHR.patient); ! mdd.setDate01( mdCHR.patient.getDate01() ); ! mdd.setDate02( onset ); ! mdd.setString01(mdCHR.patient.getString01()); ! mdd.setString02(mdCHR.patient.getString02()); ! mdd.setString03(problem); ! mdd.setString04(mdCHR.patient.getString04()); ! menu.persistMenuData( mdd); } --- 220,238 ---- */ public void generateProblem( Date onset, String problem, String status ) { ! if (mdPHR!=null) generateProblemDetail( this.mdPHR, onset, problem, status ); ! if (mdCHR!=null) { ! generateProblemDetail( this.mdCHR, onset, problem, status ); ! // Add patient to disease list ! MenuData mdd = new MenuData(); ! mdd.setMenuStructure( mdCHR.msDisease ); ! mdd.setReference(mdCHR.patient); ! mdd.setDate01( mdCHR.patient.getDate01() ); ! mdd.setDate02( onset ); ! mdd.setString01(mdCHR.patient.getString01()); ! mdd.setString02(mdCHR.patient.getString02()); ! mdd.setString03(problem); ! mdd.setString04(mdCHR.patient.getString04()); ! menu.persistMenuData( mdd); ! } } *************** *** 315,320 **** public void generateLabResult( String battery, LabTest test, int showInActivityIf) { ! generateLabResultDetail( this.mdCHR, battery, test, showInActivityIf); ! generateLabResultDetail( this.mdPHR, battery, test, showInActivityIf); } --- 328,333 ---- public void generateLabResult( String battery, LabTest test, int showInActivityIf) { ! if (mdCHR!=null) generateLabResultDetail( this.mdCHR, battery, test, showInActivityIf); ! if (mdPHR!=null) generateLabResultDetail( this.mdPHR, battery, test, showInActivityIf); } *************** *** 366,371 **** public void generateRadResult( Date effective, String test, String result, String interpretation ) { ! generateRadResultDetail( this.mdCHR, effective, test, result, interpretation ); ! generateRadResultDetail( this.mdPHR, effective, test, result, interpretation ); } --- 379,384 ---- public void generateRadResult( Date effective, String test, String result, String interpretation ) { ! if (mdCHR!=null) generateRadResultDetail( this.mdCHR, effective, test, result, interpretation ); ! if (mdPHR!=null) generateRadResultDetail( this.mdPHR, effective, test, result, interpretation ); } *************** *** 398,403 **** public void generateMedicalHistory( Date effective, String text, String status ) { ! generateMedicalHistoryDetail( this.mdCHR, effective, text, status ); ! generateMedicalHistoryDetail( this.mdPHR, effective, text, status ); } --- 411,416 ---- public void generateMedicalHistory( Date effective, String text, String status ) { ! if (mdCHR!=null) generateMedicalHistoryDetail( this.mdCHR, effective, text, status ); ! if (mdPHR!=null) generateMedicalHistoryDetail( this.mdPHR, effective, text, status ); } *************** *** 454,469 **** effective = getNow(); } ! // If it's new in the last couple days, add to new activity. ! GregorianCalendar recent = new GregorianCalendar(); ! recent.setTime(getNow()); ! recent.add(GregorianCalendar.HOUR, 24*10); ! if (effective.after(recent.getTime())) { ! MenuData mda = new MenuData(); ! mda.setMenuStructure( mdCHR.msActivity ); ! mda.setDate01( effective ); ! mda.setParent01(mdCHR.patient); ! mda.setString01(mdCHR.patient.getString02() + " " + mdCHR.patient.getString01()); ! mda.setString02("New Patient"); ! menu.persistMenuData( mda); } } --- 467,484 ---- effective = getNow(); } ! if (mdCHR!=null) { ! // If it's new in the last couple days, add to new activity. ! GregorianCalendar recent = new GregorianCalendar(); ! recent.setTime(getNow()); ! recent.add(GregorianCalendar.HOUR, 24*10); ! if (effective.after(recent.getTime())) { ! MenuData mda = new MenuData(); ! mda.setMenuStructure( mdCHR.msActivity ); ! mda.setDate01( effective ); ! mda.setParent01(mdCHR.patient); ! mda.setString01(mdCHR.patient.getString02() + " " + mdCHR.patient.getString01()); ! mda.setString02("New Patient"); ! menu.persistMenuData( mda); ! } } } *************** *** 475,478 **** --- 490,494 ---- this.now = now; } + /** * The year when this patient started with this practice/account. Index: CHRGeneratorBean.java =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/src/org/tolven/gen/bean/CHRGeneratorBean.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** CHRGeneratorBean.java 6 Nov 2006 07:41:24 -0000 1.12 --- CHRGeneratorBean.java 15 Nov 2006 07:00:11 -0000 1.13 *************** *** 80,83 **** --- 80,86 ---- private ECHRLocal echr; + // @EJB + // private EPHRLocal ephr; + @EJB private MenuLocal menu; *************** *** 131,135 **** createPatients( user, account, count, now, startYear ); } ! /** * Create patients and add them to the CHR. This provides some additional --- 134,182 ---- createPatients( user, account, count, now, startYear ); } ! /** ! * Create a family for a personal account ! * @param user ! * @param account ! * @param count ! * @param now ! * @throws Exception ! */ ! public void createFamily( TolvenUser user, Account account, Date now, int startYear) throws Exception { ! // Start a family ! FamilyUnit family = new FamilyUnit(); ! placeGenerator.generateZipCode(family); ! placeGenerator.generateAddress(family); ! String primaryGender = null; ! int primaryAge = 0; ! // Start with a primary person (we should find a suitable mom or dad in 100 tries) ! for (int c = 0; c < 100; c++) { ! VirtualPerson person = personGen.generatePerson(); ! int age = person.getAgeInYears( now ); ! if ( age < 18 ) continue; ! family.setFamilyName(person.getLast()); ! primaryGender = person.getGender(); ! primaryAge = person.getAgeInYears(now); ! MenuData mdPrimary = registerPatient( user, account, person, family, now, startYear ); ! generateMedicalData( null, mdPrimary, now, startYear, person.getDod()); ! break; ! } ! // Look for a second person (we may not find one) ! for (int c = 0; c < 10; c++) { ! VirtualPerson person = personGen.generatePerson(); ! int age = person.getAgeInYears( now ); ! if ( age < 18 ) continue; ! if (primaryGender.equals(person.getGender())) continue; ! int ageDifference = person.getAgeInYears( now )-primaryAge; ! // If too far apart in age, forget it ! if (Math.abs( ageDifference) > 10 ) continue; ! // Same last name, add to family ! person.setLast(family.getFamilyName()); ! MenuData mdPrimary = registerPatient( user, account, person, family, now, startYear ); ! generateMedicalData( null, mdPrimary, now, startYear, person.getDod()); ! break; ! } ! ! } ! /** * Create patients and add them to the CHR. This provides some additional *************** *** 338,361 **** documentLocal.persistCCRDocument(ccr, true); ! MenuData mdpat = echr.addPatient(account, ccr, account.getAccountType().getKnownType() + ":patient", null); ! if ("echr".equals(accountType)) { ! echr.addPatient(account, ccr, account.getAccountType().getKnownType() + ":patients:all", mdpat); } if ("ephr".equals(accountType)) { ! echr.addPatient(account, ccr, account.getAccountType().getKnownType() + ":family:members", mdpat); } return mdpat; - // genMed.generateProblems( ); - // genMed.generateMedications( ); - // genMed.generateFunctionalStatuses( ); - // genMed.generateLabResults( ); - // genMed.generateRadResults( ); - // genMed.generateSelfAssessments( ); - // genMed.generateMedicalHistory( ); - // genMed.generateFamilyHistory( ); - // genMed.generateImmunizations( ); - } } --- 385,400 ---- documentLocal.persistCCRDocument(ccr, true); ! MenuData mdpat = null; if ("echr".equals(accountType)) { ! mdpat = echr.addPatient(account, ccr, accountType + ":patient", null); ! echr.addPatient(account, ccr, accountType + ":patients:all", mdpat); ! return mdpat; } if ("ephr".equals(accountType)) { ! mdpat = echr.addPatient(account, ccr, accountType + ":patient", null); ! echr.addPatient(account, ccr, account.getAccountType().getKnownType() + ":family:myfam:members", mdpat); } return mdpat; } } |
From: John C. <jc...@us...> - 2006-11-15 07:00:13
|
Update of /cvsroot/tolven/tolvenEJB/src/org/tolven/app/bean In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv21579/src/org/tolven/app/bean Modified Files: MenuBean.java MenuPath.java ECHRBean.java Log Message: Update PHR menus and add a family generator when creating a PHR account Index: MenuBean.java =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/src/org/tolven/app/bean/MenuBean.java,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** MenuBean.java 6 Nov 2006 07:41:24 -0000 1.35 --- MenuBean.java 15 Nov 2006 07:00:11 -0000 1.36 *************** *** 77,80 **** --- 77,81 ---- query.setParameter("account", account ); query.setParameter("path", parent.getPath()+ ":" + path); + // System.out.println( "[MenuBean:findDescendentMenuStructure] Looking for path: " + parent.getPath()+ ":" + path ); MenuStructure item = (MenuStructure)query.getSingleResult(); // for (MenuStructure child : item.getChildren()) { // Make sure children are instantiated in the structure we return *************** *** 89,93 **** public MenuData findMenuDataItem( MenuQueryControl ctrl ) { Query query = em.createQuery( "SELECT md FROM MenuData md WHERE md.account.id = :accountId and md.id = :id" ); ! long id = ctrl.getRequestedPath().getSignificantNodeKeys()[0]; query.setParameter( "id", id ); query.setParameter( "accountId", ctrl.getMenuStructure().getAccount().getId() ); --- 90,95 ---- public MenuData findMenuDataItem( MenuQueryControl ctrl ) { Query query = em.createQuery( "SELECT md FROM MenuData md WHERE md.account.id = :accountId and md.id = :id" ); ! // long id = ctrl.getRequestedPath().getSignificantNodeKeys()[0]; ! long id = ctrl.getRequestedPath().getLeafNodeKey(); query.setParameter( "id", id ); query.setParameter( "accountId", ctrl.getMenuStructure().getAccount().getId() ); *************** *** 306,324 **** public void addFamilyTab ( MenuStructure root ) { MenuStructure family = new MenuStructure( ! root.getAccount(), root, "bar1.xhtml", null, 1, "family", "My Family", "true", null, "tab" ); em.persist( family ); ! // Family Tab ! MenuStructure allpatients = new MenuStructure( ! root.getAccount(), family, "patients.xhtml", null, 1, "members", "Members", "true", "ephr:patient", "tab" ); ! em.persist( allpatients ); ! em.persist( new MSColumn( allpatients, 1, "Name", "reference", "%s, %s", "string01,string02") ); ! em.persist( new MSColumn( allpatients, 2, "DOB", "date01", "d MMM yyyy") ); ! em.persist( new MSColumn( allpatients, 3, "Age", "date01", "age") ); ! em.persist( new MSColumn( allpatients, 4, "Sex", "string04", null) ); // New Activity Tab MenuStructure activity = new MenuStructure( ! root.getAccount(), family, "activity.xhtml", null, 2, "activity", "New Activity", "true", null, "tab" ); em.persist( activity ); em.persist( new MSColumn( activity, 1, "Date", "date01", "d MMM yyyy") ); em.persist( new MSColumn( activity, 2, "For", "parent01", "string01") ); --- 308,362 ---- public void addFamilyTab ( MenuStructure root ) { + // Family Tab MenuStructure family = new MenuStructure( ! root.getAccount(), root, "bar1.xhtml", null, 1, "family", "Family", "true", null, "tab" ); em.persist( family ); ! // My Family ! MenuStructure myFamily = new MenuStructure( ! root.getAccount(), family, "bar2.xhtml", null, 1, "myfam", "My Family", "true", null, "tab" ); ! em.persist( myFamily ); ! // Family Members ! MenuStructure allpatients = new MenuStructure( ! root.getAccount(), myFamily, "patients.xhtml", null, 1, "members", "Family Members", "true", "ephr:patient", "tab" ); ! em.persist( allpatients ); ! em.persist( new MSColumn( allpatients, 1, "Name", "reference", "%s, %s", "string01,string02") ); ! em.persist( new MSColumn( allpatients, 2, "DOB", "date01", "d MMM yyyy") ); ! em.persist( new MSColumn( allpatients, 3, "Age", "date01", "age") ); ! em.persist( new MSColumn( allpatients, 4, "Sex", "string04", null) ); ! ! MenuStructure agents = new MenuStructure( ! root.getAccount(), myFamily, "agents.xhtml", null, 2, "agents", "Agents", "true", "ephr:agent", "tab" ); ! em.persist( agents ); ! MenuStructure providers = new MenuStructure( ! root.getAccount(), myFamily, "agents.xhtml", null, 3, "providers", "Provider Preference", "true", "ephr:provider", "tab" ); ! em.persist( providers ); ! ! MenuStructure appointments = new MenuStructure( ! root.getAccount(), family, "bar2.xhtml", null, 1, "appts", "Appointments", "true", null, "tab" ); ! em.persist( appointments ); ! MenuStructure today = new MenuStructure( ! root.getAccount(), appointments, "appointments.xhtml", null, 1, "today", "Today", "true", null, "tab" ); ! em.persist( today ); ! MenuStructure tomorrow = new MenuStructure( ! root.getAccount(), appointments, "appointments.xhtml", null, 2, "tomorrow", "Tomorrow", "true", null, "tab" ); ! em.persist( tomorrow ); ! MenuStructure nextWeek = new MenuStructure( ! root.getAccount(), appointments, "appointments.xhtml", null, 3, "nextWeek", "Next Week", "true", null, "tab" ); ! em.persist( nextWeek ); ! MenuStructure allAppt = new MenuStructure( ! root.getAccount(), appointments, "appointments.xhtml", null, 4, "allAppt", "All Appointments", "true", null, "tab" ); ! em.persist( allAppt ); ! ! } ! ! public void addActivityTab ( MenuStructure root ) { // New Activity Tab MenuStructure activity = new MenuStructure( ! root.getAccount(), root, "bar1.xhtml", null, 1, "activity", "New Activity", "true", null, "tab" ); em.persist( activity ); + // All activity + MenuStructure all = new MenuStructure( + root.getAccount(), activity, "activity.xhtml", null, 2, "all", "All Activity", "true", null, "tab" ); + em.persist( all ); em.persist( new MSColumn( activity, 1, "Date", "date01", "d MMM yyyy") ); em.persist( new MSColumn( activity, 2, "For", "parent01", "string01") ); *************** *** 327,332 **** em.persist( new MSColumn( activity, 5, "Priority", "long01", null) ); em.persist( new MSColumn( activity, 6, "Due", "date02", "d MMM yyyy") ); } ! public void addPatientTab ( MenuStructure root ) { Account account = root.getAccount(); --- 365,483 ---- em.persist( new MSColumn( activity, 5, "Priority", "long01", null) ); em.persist( new MSColumn( activity, 6, "Due", "date02", "d MMM yyyy") ); + // Results + MenuStructure results = new MenuStructure( + root.getAccount(), activity, "bar2.xhtml", null, 1, "results", "Results", "true", null, "tab" ); + em.persist( results ); + MenuStructure allResults = new MenuStructure( + root.getAccount(), results, "activity.xhtml", null, 1, "all", "All Results", "true", null, "tab" ); + em.persist( allResults ); + em.persist( new MSColumn( allResults, 1, "Date", "date01", "d MMM yyyy") ); + em.persist( new MSColumn( allResults, 2, "For", "parent01", "string01") ); + em.persist( new MSColumn( allResults, 3, "Action", "parent02", "string02") ); + em.persist( new MSColumn( allResults, 4, "RequestedBy", "string03", null) ); + em.persist( new MSColumn( allResults, 5, "Priority", "long01", null) ); + em.persist( new MSColumn( allResults, 6, "Due", "date02", "d MMM yyyy") ); + MenuStructure labResults = new MenuStructure( + root.getAccount(), results, "activity.xhtml", null, 2, "lab", "Lab Results", "true", null, "tab" ); + em.persist( labResults ); + em.persist( new MSColumn( labResults, 1, "Date", "date01", "d MMM yyyy") ); + em.persist( new MSColumn( labResults, 2, "For", "parent01", "string01") ); + em.persist( new MSColumn( labResults, 3, "Action", "parent02", "string02") ); + em.persist( new MSColumn( labResults, 4, "RequestedBy", "string03", null) ); + em.persist( new MSColumn( labResults, 5, "Priority", "long01", null) ); + em.persist( new MSColumn( labResults, 6, "Due", "date02", "d MMM yyyy") ); + MenuStructure radResults = new MenuStructure( + root.getAccount(), results, "activity.xhtml", null, 3, "rad", "Radiology Results", "true", null, "tab" ); + em.persist( radResults ); + em.persist( new MSColumn( radResults, 1, "Date", "date01", "d MMM yyyy") ); + em.persist( new MSColumn( radResults, 2, "For", "parent01", "string01") ); + em.persist( new MSColumn( radResults, 3, "Action", "parent02", "string02") ); + em.persist( new MSColumn( radResults, 4, "RequestedBy", "string03", null) ); + em.persist( new MSColumn( radResults, 5, "Priority", "long01", null) ); + em.persist( new MSColumn( radResults, 6, "Due", "date02", "d MMM yyyy") ); + MenuStructure othResults = new MenuStructure( + root.getAccount(), results, "activity.xhtml", null, 4, "oth", "Other Results", "true", null, "tab" ); + em.persist( othResults ); + em.persist( new MSColumn( othResults, 1, "Date", "date01", "d MMM yyyy") ); + em.persist( new MSColumn( othResults, 2, "For", "parent01", "string01") ); + em.persist( new MSColumn( othResults, 3, "Action", "parent02", "string02") ); + em.persist( new MSColumn( othResults, 4, "RequestedBy", "string03", null) ); + em.persist( new MSColumn( othResults, 5, "Priority", "long01", null) ); + em.persist( new MSColumn( othResults, 6, "Due", "date02", "d MMM yyyy") ); + MenuStructure newResultsList = new MenuStructure( + root.getAccount(), results, "activity.xhtml", null, 4, "newList", "New Result List", "true", null, "tab" ); + em.persist( newResultsList ); + // Results + MenuStructure rx = new MenuStructure( + root.getAccount(), activity, "activity.xhtml", null, 3, "rx", "Prescriptions", "true", null, "tab" ); + em.persist( new MSColumn( rx, 1, "Date", "date01", "d MMM yyyy") ); + em.persist( new MSColumn( rx, 2, "For", "parent01", "string01") ); + em.persist( new MSColumn( rx, 3, "Action", "parent02", "string02") ); + em.persist( new MSColumn( rx, 4, "RequestedBy", "string03", null) ); + em.persist( new MSColumn( rx, 5, "Priority", "long01", null) ); + em.persist( new MSColumn( rx, 6, "Due", "date02", "d MMM yyyy") ); + em.persist( rx ); + MenuStructure req = new MenuStructure( + root.getAccount(), activity, "bar2.xhtml", null, 4, "req", "Requests", "true", null, "tab" ); + em.persist( req ); + MenuStructure chrData = new MenuStructure( + root.getAccount(), req, "activity.xhtml", null, 1, "chr", "CHR Data", "true", null, "tab" ); + em.persist( chrData ); + em.persist( new MSColumn( chrData, 1, "Date", "date01", "d MMM yyyy") ); + em.persist( new MSColumn( chrData, 2, "For", "parent01", "string01") ); + em.persist( new MSColumn( chrData, 3, "Action", "parent02", "string02") ); + em.persist( new MSColumn( chrData, 4, "RequestedBy", "string03", null) ); + em.persist( new MSColumn( chrData, 5, "Priority", "long01", null) ); + em.persist( new MSColumn( chrData, 6, "Due", "date02", "d MMM yyyy") ); + MenuStructure provider = new MenuStructure( + root.getAccount(), req, "activity.xhtml", null, 2, "prov", "Provider Requests", "true", null, "tab" ); + em.persist( provider ); + em.persist( new MSColumn( provider, 1, "Date", "date01", "d MMM yyyy") ); + em.persist( new MSColumn( provider, 2, "For", "parent01", "string01") ); + em.persist( new MSColumn( provider, 3, "Action", "parent02", "string02") ); + em.persist( new MSColumn( provider, 4, "RequestedBy", "string03", null) ); + em.persist( new MSColumn( provider, 5, "Priority", "long01", null) ); + em.persist( new MSColumn( provider, 6, "Due", "date02", "d MMM yyyy") ); + MenuStructure quest = new MenuStructure( + root.getAccount(), req, "activity.xhtml", null, 3, "quest", "Questionnaires", "true", null, "tab" ); + em.persist( quest ); + em.persist( new MSColumn( quest, 1, "Date", "date01", "d MMM yyyy") ); + em.persist( new MSColumn( quest, 2, "For", "parent01", "string01") ); + em.persist( new MSColumn( quest, 3, "Action", "parent02", "string02") ); + em.persist( new MSColumn( quest, 4, "RequestedBy", "string03", null) ); + em.persist( new MSColumn( quest, 5, "Priority", "long01", null) ); + em.persist( new MSColumn( quest, 6, "Due", "date02", "d MMM yyyy") ); + MenuStructure ass = new MenuStructure( + root.getAccount(), req, "activity.xhtml", null, 2, "ass", "Assessments", "true", null, "tab" ); + em.persist( ass ); + em.persist( new MSColumn( ass, 1, "Date", "date01", "d MMM yyyy") ); + em.persist( new MSColumn( ass, 2, "For", "parent01", "string01") ); + em.persist( new MSColumn( ass, 3, "Action", "parent02", "string02") ); + em.persist( new MSColumn( ass, 4, "RequestedBy", "string03", null) ); + em.persist( new MSColumn( ass, 5, "Priority", "long01", null) ); + em.persist( new MSColumn( ass, 6, "Due", "date02", "d MMM yyyy") ); + MenuStructure cons = new MenuStructure( + root.getAccount(), activity, "bar2.xhtml", null, 5, "cons", "Consultations", "true", null, "tab" ); + em.persist( cons ); + MenuStructure apptcons = new MenuStructure( + root.getAccount(), cons, "activity.xhtml", null, 1, "ass", "Appointment Requests", "true", null, "tab" ); + em.persist( apptcons ); + em.persist( new MSColumn( apptcons, 1, "Date", "date01", "d MMM yyyy") ); + em.persist( new MSColumn( apptcons, 2, "For", "parent01", "string01") ); + em.persist( new MSColumn( apptcons, 3, "Action", "parent02", "string02") ); + em.persist( new MSColumn( apptcons, 4, "RequestedBy", "string03", null) ); + em.persist( new MSColumn( apptcons, 5, "Priority", "long01", null) ); + em.persist( new MSColumn( apptcons, 6, "Due", "date02", "d MMM yyyy") ); + MenuStructure econs = new MenuStructure( + root.getAccount(), cons, "activity.xhtml", null, 1, "econs", "eConsultation", "true", null, "tab" ); + em.persist( econs ); + em.persist( new MSColumn( econs, 1, "Date", "date01", "d MMM yyyy") ); + em.persist( new MSColumn( econs, 2, "For", "parent01", "string01") ); + em.persist( new MSColumn( econs, 3, "Action", "parent02", "string02") ); + em.persist( new MSColumn( econs, 4, "RequestedBy", "string03", null) ); + em.persist( new MSColumn( econs, 5, "Priority", "long01", null) ); + em.persist( new MSColumn( econs, 6, "Due", "date02", "d MMM yyyy") ); } ! public void addPatientTab ( MenuStructure root ) { Account account = root.getAccount(); *************** *** 457,470 **** em.persist( medhx ); MenuStructure protocols = new MenuStructure( ! account, patient, "protocols.xhtml", null, 6, "protocols", "Protocols", "true", null, "tab" ); em.persist( protocols ); MenuStructure personal = new MenuStructure( ! account, patient, "personal.xhtml", null, 7, "personal", "Personal Info", "true", null, "tab" ); em.persist( personal ); MenuStructure providers = new MenuStructure( ! account, patient, "providers.xhtml", null, 8, "providers", "Providers", "true", null, "tab" ); em.persist( providers ); --- 608,643 ---- em.persist( medhx ); + MenuStructure asessments = new MenuStructure( + account, patient, "bar2.xhtml", null, 6, "assessments", "Assessments", "true", null, "tab" ); + em.persist( asessments ); + MenuStructure assAll = new MenuStructure( + account, asessments, "assAll.xhtml", null, 1, "all", "All", "true", null, "tab" ); + em.persist( assAll ); + em.persist( new MSColumn( assAll, 1, "Date", "date01", "MMM-dd-yyyy hh:mm") ); + em.persist( new MSColumn( assAll, 2, "Assessment", "reference", "string01") ); + em.persist( new MSColumn( assAll, 3, "Status", "string02", null) ); + em.persist( new MSColumn( assAll, 3, "Interpretation", "string03", null) ); + em.persist( new MSColumn( assAll, 4, "Source", "parent02", null) ); + MenuStructure newAss = new MenuStructure( + account, asessments, "newAss.xhtml", null, 2, "new", "New", "true", null, "tab" ); + em.persist( newAss ); + em.persist( new MSColumn( newAss, 1, "Assessment", "reference", "string01") ); + em.persist( new MSColumn( newAss, 2, "Status", "string02", null) ); + + MenuStructure assessment = new MenuStructure( + account, asessments, "assessment.xhtml", "assLink.xhtml", 2, "assessment", "Assessment", "false", "assessment", "placeholder" ); + em.persist( assessment ); + MenuStructure protocols = new MenuStructure( ! account, patient, "protocols.xhtml", null, 7, "protocols", "Protocols", "true", null, "tab" ); em.persist( protocols ); + MenuStructure personal = new MenuStructure( ! account, patient, "personal.xhtml", null, 8, "personal", "Personal Info", "true", null, "tab" ); em.persist( personal ); MenuStructure providers = new MenuStructure( ! account, patient, "providers.xhtml", null, 9, "providers", "Providers", "true", null, "tab" ); em.persist( providers ); *************** *** 552,555 **** --- 725,729 ---- em.persist( root ); addFamilyTab( root ); + addActivityTab( root ); addPatientTab( root ); addDemoTab( root ); Index: MenuPath.java =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/src/org/tolven/app/bean/MenuPath.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MenuPath.java 2 Oct 2006 05:30:08 -0000 1.4 --- MenuPath.java 15 Nov 2006 07:00:11 -0000 1.5 *************** *** 103,106 **** --- 103,107 ---- /** * Get path string. Object ids, if any, are not included in the path but are available in a parallel array. + * This is used to find MenuStructure nodes (not MenuData)/ */ public String getPath( ) { *************** *** 113,117 **** return sb.toString(); } ! /** * Get path string to the parent of the requested node --- 114,157 ---- return sb.toString(); } ! ! /** ! * Construct a path to a sub node. The node name of the desired leaf node is specified. ! * For example, if the full path says: "echr:patient-123:results:lab" and the requested node ! * is "patient", then "echr:patient" is returned (object Ids omitted). ! * This method is used to find MenuStructure nodes (not MenuData). ! * Null is returned if the named node is not found. ! */ ! public String getSubPath(String node) { ! initNodes(); ! StringBuffer sb = new StringBuffer( 100 ); ! for (int x = 0; x < nodes.length; x++ ) { ! if (sb.length()>0) sb.append(":"); ! sb.append( nodes[x] ); ! if (node.equals(nodes[x])) return sb.toString(); ! } ! return null; ! } ! ! /** ! * Construct a path to a sub node with Ids. The node name of the desired leaf node is specified. ! * For example, if the full path says: "echr:patient-123:results:lab" and the requested node ! * is "patient", then "echr:patient-123" is returned (object Ids omitted). ! * This method is used to find MenuStructure nodes (not MenuData). ! * Null is returned if the named node is not found. ! */ ! public String getSubPathWithIds(String node) { ! initNodes(); ! StringBuffer sb = new StringBuffer( 100 ); ! for (int x = 0; x < nodes.length; x++ ) { ! if (sb.length()>0) sb.append(":"); ! sb.append( nodes[x] ); ! if (nodeKeys[x]!=0) { ! sb.append("-"); ! sb.append(nodeKeys[x]); ! } ! if (node.equals(nodes[x])) return sb.toString(); ! } ! return null; ! } /** * Get path string to the parent of the requested node *************** *** 144,147 **** --- 184,198 ---- this.pathString = pathString; } + /** + * Get the key value of the most specific node, the one on the right. + * For example, + * in "echr:patient-123:lab:result-456" + * return 456. + * @return + */ + public long getLeafNodeKey( ) { + initNodes(); + return nodeKeys[nodes.length-1]; + } public long [] getSignificantNodeKeys( ) { *************** *** 160,163 **** --- 211,215 ---- return sigNodeKeys; } + @Override public String toString() { Index: ECHRBean.java =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/src/org/tolven/app/bean/ECHRBean.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ECHRBean.java 2 Oct 2006 05:30:08 -0000 1.1 --- ECHRBean.java 15 Nov 2006 07:00:11 -0000 1.2 *************** *** 46,50 **** // The generic, free-floating patient menu structure MenuStructure mspat = menu.findMenuStructure( account.getId(), path); ! // We have a live person at this point. MenuData mdpat = new MenuData(); mdpat.setMenuStructure( mspat ); --- 46,50 ---- // The generic, free-floating patient menu structure MenuStructure mspat = menu.findMenuStructure( account.getId(), path); ! // We have a person at this point. MenuData mdpat = new MenuData(); mdpat.setMenuStructure( mspat ); |
From: John C. <jc...@us...> - 2006-11-15 07:00:12
|
Update of /cvsroot/tolven/tolvenEJB/src/org/tolven/gen In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv21579/src/org/tolven/gen Modified Files: CHRGenerator.java Log Message: Update PHR menus and add a family generator when creating a PHR account Index: CHRGenerator.java =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/src/org/tolven/gen/CHRGenerator.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** CHRGenerator.java 28 Aug 2006 19:37:36 -0000 1.4 --- CHRGenerator.java 15 Nov 2006 07:00:11 -0000 1.5 *************** *** 36,38 **** --- 36,47 ---- public void createPatients( TolvenUser user, Account account, int count, Date now, int startYear ) throws Exception; + /** + * Create a family for a personal account + * @param user + * @param account + * @param count + * @param now + */ + public void createFamily( TolvenUser user, Account account, Date now, int startYear) throws Exception; + } |